public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Fix up range_end offset in range cyclic writeback
@ 2012-01-08  3:23 Shantanu Goel
  2012-01-09 15:17 ` Ted Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Shantanu Goel @ 2012-01-08  3:23 UTC (permalink / raw)
  To: Kernel



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;
        }

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-09 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-08  3:23 [PATCH] ext4: Fix up range_end offset in range cyclic writeback Shantanu Goel
2012-01-09 15:17 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox