diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-09-25 18:07:46 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-25 18:10:40 -0400 |
commit | a72bfd4dea053bb8e2233902c3f1893ef5485802 (patch) | |
tree | 1246fc000adfee6d2874b9324eaf7383ad4413bb /fs/fs-writeback.c | |
parent | 6d7f18f6ea3a13af95bdf507fc54d42b165e1712 (diff) |
writeback: pass in super_block to bdi_start_writeback()
Sometimes we only want to write pages from a specific super_block,
so allow that to be passed in.
This fixes a problem with commit 56a131dcf7ed36c3c6e36bea448b674ea85ed5bb
causing writeback on all super_blocks on a bdi, where we only really
want to sync a specific sb from writeback_inodes_sb().
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index fb61178c86e3..9d5360c4c2af 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -250,9 +250,11 @@ static void bdi_sync_writeback(struct backing_dev_info *bdi, | |||
250 | * completion. Caller need not hold sb s_umount semaphore. | 250 | * completion. Caller need not hold sb s_umount semaphore. |
251 | * | 251 | * |
252 | */ | 252 | */ |
253 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages) | 253 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, |
254 | long nr_pages) | ||
254 | { | 255 | { |
255 | struct wb_writeback_args args = { | 256 | struct wb_writeback_args args = { |
257 | .sb = sb, | ||
256 | .sync_mode = WB_SYNC_NONE, | 258 | .sync_mode = WB_SYNC_NONE, |
257 | .nr_pages = nr_pages, | 259 | .nr_pages = nr_pages, |
258 | .range_cyclic = 1, | 260 | .range_cyclic = 1, |
@@ -1206,7 +1208,7 @@ void writeback_inodes_sb(struct super_block *sb) | |||
1206 | nr_to_write = nr_dirty + nr_unstable + | 1208 | nr_to_write = nr_dirty + nr_unstable + |
1207 | (inodes_stat.nr_inodes - inodes_stat.nr_unused); | 1209 | (inodes_stat.nr_inodes - inodes_stat.nr_unused); |
1208 | 1210 | ||
1209 | bdi_start_writeback(sb->s_bdi, nr_to_write); | 1211 | bdi_start_writeback(sb->s_bdi, sb, nr_to_write); |
1210 | } | 1212 | } |
1211 | EXPORT_SYMBOL(writeback_inodes_sb); | 1213 | EXPORT_SYMBOL(writeback_inodes_sb); |
1212 | 1214 | ||