diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 12:17:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 12:17:05 -0400 |
commit | a12e4d304ce701844c639541d90df86e165d03f9 (patch) | |
tree | 6ad7314b63a3303d9aa36f1c7eeb68abf64d3592 /fs/sync.c | |
parent | 89af571ca633ada14d17746519a179553a732d31 (diff) | |
parent | 500b067c5e6ceea49cf280a02597b1169320e08c (diff) |
Merge branch 'writeback' of git://git.kernel.dk/linux-2.6-block
* 'writeback' of git://git.kernel.dk/linux-2.6-block:
writeback: check for registered bdi in flusher add and inode dirty
writeback: add name to backing_dev_info
writeback: add some debug inode list counters to bdi stats
writeback: get rid of pdflush completely
writeback: switch to per-bdi threads for flushing data
writeback: move dirty inodes from super_block to backing_dev_info
writeback: get rid of generic_sync_sb_inodes() export
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -19,20 +19,22 @@ | |||
19 | SYNC_FILE_RANGE_WAIT_AFTER) | 19 | SYNC_FILE_RANGE_WAIT_AFTER) |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Do the filesystem syncing work. For simple filesystems sync_inodes_sb(sb, 0) | 22 | * Do the filesystem syncing work. For simple filesystems |
23 | * just dirties buffers with inodes so we have to submit IO for these buffers | 23 | * writeback_inodes_sb(sb) just dirties buffers with inodes so we have to |
24 | * via __sync_blockdev(). This also speeds up the wait == 1 case since in that | 24 | * submit IO for these buffers via __sync_blockdev(). This also speeds up the |
25 | * case write_inode() functions do sync_dirty_buffer() and thus effectively | 25 | * wait == 1 case since in that case write_inode() functions do |
26 | * write one block at a time. | 26 | * sync_dirty_buffer() and thus effectively write one block at a time. |
27 | */ | 27 | */ |
28 | static int __sync_filesystem(struct super_block *sb, int wait) | 28 | static int __sync_filesystem(struct super_block *sb, int wait) |
29 | { | 29 | { |
30 | /* Avoid doing twice syncing and cache pruning for quota sync */ | 30 | /* Avoid doing twice syncing and cache pruning for quota sync */ |
31 | if (!wait) | 31 | if (!wait) { |
32 | writeout_quota_sb(sb, -1); | 32 | writeout_quota_sb(sb, -1); |
33 | else | 33 | writeback_inodes_sb(sb); |
34 | } else { | ||
34 | sync_quota_sb(sb, -1); | 35 | sync_quota_sb(sb, -1); |
35 | sync_inodes_sb(sb, wait); | 36 | sync_inodes_sb(sb); |
37 | } | ||
36 | if (sb->s_op->sync_fs) | 38 | if (sb->s_op->sync_fs) |
37 | sb->s_op->sync_fs(sb, wait); | 39 | sb->s_op->sync_fs(sb, wait); |
38 | return __sync_blockdev(sb->s_bdev, wait); | 40 | return __sync_blockdev(sb->s_bdev, wait); |
@@ -118,7 +120,7 @@ restart: | |||
118 | */ | 120 | */ |
119 | SYSCALL_DEFINE0(sync) | 121 | SYSCALL_DEFINE0(sync) |
120 | { | 122 | { |
121 | wakeup_pdflush(0); | 123 | wakeup_flusher_threads(0); |
122 | sync_filesystems(0); | 124 | sync_filesystems(0); |
123 | sync_filesystems(1); | 125 | sync_filesystems(1); |
124 | if (unlikely(laptop_mode)) | 126 | if (unlikely(laptop_mode)) |