diff options
author | Andrew Morton <akpm@osdl.org> | 2006-12-10 02:19:31 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 09:55:41 -0800 |
commit | e08748ce01e02f0ec154b141f392ccb9555333f4 (patch) | |
tree | 9fa9d9f8fb468997f7f6fbcb28e243724d1fdda6 /fs/buffer.c | |
parent | 55e829af06681e5d731c03ba04febbd1c76ca293 (diff) | |
download | blackbird-op-linux-e08748ce01e02f0ec154b141f392ccb9555333f4.tar.gz blackbird-op-linux-e08748ce01e02f0ec154b141f392ccb9555333f4.zip |
[PATCH] io-accounting: write-cancel accounting
Account for the number of byte writes which this process caused to not happen
after all.
Cc: Jay Lan <jlan@sgi.com>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Chris Sturtivant <csturtiv@sgi.com>
Cc: Tony Ernst <tee@sgi.com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: David Wright <daw@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 904d59d1eb8e..d1f1b54d3108 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2853,8 +2853,13 @@ int try_to_free_buffers(struct page *page) * could encounter a non-uptodate page, which is unresolvable. * This only applies in the rare case where try_to_free_buffers * succeeds but the page is not freed. + * + * Also, during truncate, discard_buffer will have marked all + * the page's buffers clean. We discover that here and clean + * the page also. */ - clear_page_dirty(page); + if (test_clear_page_dirty(page)) + task_io_account_cancelled_write(PAGE_CACHE_SIZE); } out: if (buffers_to_free) { |