diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-09-02 02:58:38 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-09-02 02:58:38 -0400 |
commit | 51c91ed52b8a9a30fcb2a465b40c20a1f11735ba (patch) | |
tree | edebb01cbfe550a2edb066d5b4185445cfff11ba /fs/xfs/linux-2.6/xfs_aops.c | |
parent | 592cb26bda6fe69838529acf71e50a6dee7acbb4 (diff) |
[XFS] add infrastructure for waiting on I/O completion at inode reclaim
time
SGI-PV: 934766
SGI-Modid: xfs-linux:xfs-kern:196854a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index bd9aba1f2353..b55cb7f02e88 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -139,7 +139,7 @@ linvfs_unwritten_convert( | |||
139 | XFS_BUF_SET_FSPRIVATE(bp, NULL); | 139 | XFS_BUF_SET_FSPRIVATE(bp, NULL); |
140 | XFS_BUF_CLR_IODONE_FUNC(bp); | 140 | XFS_BUF_CLR_IODONE_FUNC(bp); |
141 | XFS_BUF_UNDATAIO(bp); | 141 | XFS_BUF_UNDATAIO(bp); |
142 | iput(LINVFS_GET_IP(vp)); | 142 | vn_iowake(vp); |
143 | pagebuf_iodone(bp, 0, 0); | 143 | pagebuf_iodone(bp, 0, 0); |
144 | } | 144 | } |
145 | 145 | ||
@@ -448,14 +448,7 @@ xfs_map_unwritten( | |||
448 | if (!pb) | 448 | if (!pb) |
449 | return -EAGAIN; | 449 | return -EAGAIN; |
450 | 450 | ||
451 | /* Take a reference to the inode to prevent it from | 451 | atomic_inc(&LINVFS_GET_VP(inode)->v_iocount); |
452 | * being reclaimed while we have outstanding unwritten | ||
453 | * extent IO on it. | ||
454 | */ | ||
455 | if ((igrab(inode)) != inode) { | ||
456 | pagebuf_free(pb); | ||
457 | return -EAGAIN; | ||
458 | } | ||
459 | 452 | ||
460 | /* Set the count to 1 initially, this will stop an I/O | 453 | /* Set the count to 1 initially, this will stop an I/O |
461 | * completion callout which happens before we have started | 454 | * completion callout which happens before we have started |