From: Shantanu Goel <sgoel01@yahoo.com>
To: Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] ext4: Fix up range_end offset in range cyclic writeback
Date: Sat, 7 Jan 2012 19:23:32 -0800 (PST) [thread overview]
Message-ID: <1325993012.29526.YahooMailNeo@web38004.mail.mud.yahoo.com> (raw)
Hi,
The patch below fixes the range_end calculation which should be a byte offset and not a page index. Also, the patch updates the `end' index as well when looping again in range cyclic mode.
Signed-off-by: Shantanu Goel <sgoel01@yahoo.com>
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2324,9 +2324,10 @@ retry:
blk_finish_plug(&plug);
if (!io_done && !cycled) {
cycled = 1;
+ end = index - 1;
index = 0;
- wbc->range_start = index << PAGE_CACHE_SHIFT;
- wbc->range_end = mapping->writeback_index - 1;
+ wbc->range_start = 0;
+ wbc->range_end = ((loff_t)(end + 1) << PAGE_CACHE_SHIFT) - 1;
goto retry;
}
next reply other threads:[~2012-01-08 3:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-08 3:23 Shantanu Goel [this message]
2012-01-09 15:17 ` [PATCH] ext4: Fix up range_end offset in range cyclic writeback Ted Ts'o
2012-01-09 15:49 ` Shantanu Goel
[not found] ` <1326123988.9602.YahooMailNeo@web38004.mail.mud.yahoo.com>
2012-01-09 15:50 ` Ted Ts'o
2012-01-09 16:20 ` Shantanu Goel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1325993012.29526.YahooMailNeo@web38004.mail.mud.yahoo.com \
--to=sgoel01@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox