diff options
author | Felix Blyakher <felixb@sgi.com> | 2009-04-09 15:12:07 -0400 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-04-09 15:12:07 -0400 |
commit | dc2a5536d633dd2318f82f3d5ad3c9e43cfc21d7 (patch) | |
tree | 20b68d90d175eb9f07cf19b2e8be4011a8e8e6e5 /fs/xfs/linux-2.6/xfs_aops.c | |
parent | f36345ff9a4a77f2cc576a2777b6256d5c8798fa (diff) | |
parent | 8de2bf937a6bea8f0f775fd5399ba20c1a0c3d77 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index c13f67300fe7..7ec89fc05b2b 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -153,23 +153,6 @@ xfs_find_bdev_for_inode( | |||
153 | } | 153 | } |
154 | 154 | ||
155 | /* | 155 | /* |
156 | * Schedule IO completion handling on a xfsdatad if this was | ||
157 | * the final hold on this ioend. If we are asked to wait, | ||
158 | * flush the workqueue. | ||
159 | */ | ||
160 | STATIC void | ||
161 | xfs_finish_ioend( | ||
162 | xfs_ioend_t *ioend, | ||
163 | int wait) | ||
164 | { | ||
165 | if (atomic_dec_and_test(&ioend->io_remaining)) { | ||
166 | queue_work(xfsdatad_workqueue, &ioend->io_work); | ||
167 | if (wait) | ||
168 | flush_workqueue(xfsdatad_workqueue); | ||
169 | } | ||
170 | } | ||
171 | |||
172 | /* | ||
173 | * We're now finished for good with this ioend structure. | 156 | * We're now finished for good with this ioend structure. |
174 | * Update the page state via the associated buffer_heads, | 157 | * Update the page state via the associated buffer_heads, |
175 | * release holds on the inode and bio, and finally free | 158 | * release holds on the inode and bio, and finally free |
@@ -310,6 +293,27 @@ xfs_end_bio_read( | |||
310 | } | 293 | } |
311 | 294 | ||
312 | /* | 295 | /* |
296 | * Schedule IO completion handling on a xfsdatad if this was | ||
297 | * the final hold on this ioend. If we are asked to wait, | ||
298 | * flush the workqueue. | ||
299 | */ | ||
300 | STATIC void | ||
301 | xfs_finish_ioend( | ||
302 | xfs_ioend_t *ioend, | ||
303 | int wait) | ||
304 | { | ||
305 | if (atomic_dec_and_test(&ioend->io_remaining)) { | ||
306 | struct workqueue_struct *wq = xfsdatad_workqueue; | ||
307 | if (ioend->io_work.func == xfs_end_bio_unwritten) | ||
308 | wq = xfsconvertd_workqueue; | ||
309 | |||
310 | queue_work(wq, &ioend->io_work); | ||
311 | if (wait) | ||
312 | flush_workqueue(wq); | ||
313 | } | ||
314 | } | ||
315 | |||
316 | /* | ||
313 | * Allocate and initialise an IO completion structure. | 317 | * Allocate and initialise an IO completion structure. |
314 | * We need to track unwritten extent write completion here initially. | 318 | * We need to track unwritten extent write completion here initially. |
315 | * We'll need to extend this for updating the ondisk inode size later | 319 | * We'll need to extend this for updating the ondisk inode size later |