diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 15:52:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 15:52:24 -0500 |
commit | ee89f81252179dcbf6cd65bd48299f5e52292d88 (patch) | |
tree | 805846cd12821f84cfe619d44c9e3e36e0b0f9e6 /fs/fs-writeback.c | |
parent | 21f3b24da9328415792efc780f50b9f434c12465 (diff) | |
parent | de33127d8d3f1d570aad8c2223cd81b206636bc1 (diff) |
Merge branch 'for-3.9/core' of git://git.kernel.dk/linux-block
Pull block IO core bits from Jens Axboe:
"Below are the core block IO bits for 3.9. It was delayed a few days
since my workstation kept crashing every 2-8h after pulling it into
current -git, but turns out it is a bug in the new pstate code (divide
by zero, will report separately). In any case, it contains:
- The big cfq/blkcg update from Tejun and and Vivek.
- Additional block and writeback tracepoints from Tejun.
- Improvement of the should sort (based on queues) logic in the plug
flushing.
- _io() variants of the wait_for_completion() interface, using
io_schedule() instead of schedule() to contribute to io wait
properly.
- Various little fixes.
You'll get two trivial merge conflicts, which should be easy enough to
fix up"
Fix up the trivial conflicts due to hlist traversal cleanups (commit
b67bfe0d42ca: "hlist: drop the node parameter from iterators").
* 'for-3.9/core' of git://git.kernel.dk/linux-block: (39 commits)
block: remove redundant check to bd_openers()
block: use i_size_write() in bd_set_size()
cfq: fix lock imbalance with failed allocations
drivers/block/swim3.c: fix null pointer dereference
block: don't select PERCPU_RWSEM
block: account iowait time when waiting for completion of IO request
sched: add wait_for_completion_io[_timeout]
writeback: add more tracepoints
block: add block_{touch|dirty}_buffer tracepoint
buffer: make touch_buffer() an exported function
block: add @req to bio_{front|back}_merge tracepoints
block: add missing block_bio_complete() tracepoint
block: Remove should_sort judgement when flush blk_plug
block,elevator: use new hashtable implementation
cfq-iosched: add hierarchical cfq_group statistics
cfq-iosched: collect stats from dead cfqgs
cfq-iosched: separate out cfqg_stats_reset() from cfq_pd_reset_stats()
blkcg: make blkcg_print_blkgs() grab q locks instead of blkcg lock
block: RCU free request_queue
blkcg: implement blkg_[rw]stat_recursive_sum() and blkg_[rw]stat_merge()
...
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 310972b72a66..359494ea1bde 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -318,8 +318,14 @@ static void queue_io(struct bdi_writeback *wb, struct wb_writeback_work *work) | |||
318 | 318 | ||
319 | static int write_inode(struct inode *inode, struct writeback_control *wbc) | 319 | static int write_inode(struct inode *inode, struct writeback_control *wbc) |
320 | { | 320 | { |
321 | if (inode->i_sb->s_op->write_inode && !is_bad_inode(inode)) | 321 | int ret; |
322 | return inode->i_sb->s_op->write_inode(inode, wbc); | 322 | |
323 | if (inode->i_sb->s_op->write_inode && !is_bad_inode(inode)) { | ||
324 | trace_writeback_write_inode_start(inode, wbc); | ||
325 | ret = inode->i_sb->s_op->write_inode(inode, wbc); | ||
326 | trace_writeback_write_inode(inode, wbc); | ||
327 | return ret; | ||
328 | } | ||
323 | return 0; | 329 | return 0; |
324 | } | 330 | } |
325 | 331 | ||
@@ -450,6 +456,8 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) | |||
450 | 456 | ||
451 | WARN_ON(!(inode->i_state & I_SYNC)); | 457 | WARN_ON(!(inode->i_state & I_SYNC)); |
452 | 458 | ||
459 | trace_writeback_single_inode_start(inode, wbc, nr_to_write); | ||
460 | |||
453 | ret = do_writepages(mapping, wbc); | 461 | ret = do_writepages(mapping, wbc); |
454 | 462 | ||
455 | /* | 463 | /* |
@@ -1150,8 +1158,12 @@ void __mark_inode_dirty(struct inode *inode, int flags) | |||
1150 | * dirty the inode itself | 1158 | * dirty the inode itself |
1151 | */ | 1159 | */ |
1152 | if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) { | 1160 | if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) { |
1161 | trace_writeback_dirty_inode_start(inode, flags); | ||
1162 | |||
1153 | if (sb->s_op->dirty_inode) | 1163 | if (sb->s_op->dirty_inode) |
1154 | sb->s_op->dirty_inode(inode, flags); | 1164 | sb->s_op->dirty_inode(inode, flags); |
1165 | |||
1166 | trace_writeback_dirty_inode(inode, flags); | ||
1155 | } | 1167 | } |
1156 | 1168 | ||
1157 | /* | 1169 | /* |