* [PATCH][13/15] e2fsprogs-i_size-corruption.patch
@ 2008-10-06 10:31 Kalpak Shah
0 siblings, 0 replies; only message in thread
From: Kalpak Shah @ 2008-10-06 10:31 UTC (permalink / raw)
To: TheodoreTso; +Cc: linux-ext4
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
Fix handling of block preallocation support in cases where the kernel
PAGE_SIZE is larger than the filesystem blocksize.
Signed-off-by: Kalpak Shah <kalpak.shah@sun.com>
Signed-off-by: Andreas Dilger <adilger@sun.com>
[-- Attachment #2: e2fsprogs-i_size-corruption.patch --]
[-- Type: text/x-patch, Size: 892 bytes --]
Fix handling of block preallocation support in cases where the kernel
PAGE_SIZE is larger than the filesystem blocksize.
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Index: e2fsprogs-1.40.2/e2fsck/pass1.c
===================================================================
--- e2fsprogs-1.40.2.orig/e2fsck/pass1.c
+++ e2fsprogs-1.40.2/e2fsck/pass1.c
@@ -2103,7 +2103,7 @@ static void check_blocks(e2fsck_t ctx, s
if ((pb.last_block >= 0) &&
/* allow allocated blocks to end of PAGE_SIZE */
(size < (__u64)pb.last_block * fs->blocksize) &&
- (pb.last_block / blkpg * blkpg != pb.last_block ||
+ ((pb.last_block+1) / blkpg * blkpg != (pb.last_block+1) ||
size < (__u64)(pb.last_block & ~(blkpg-1)) *fs->blocksize))
bad_size = 3;
else if (size > ext2_max_sizes[fs->super->s_log_block_size])
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-06 10:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 10:31 [PATCH][13/15] e2fsprogs-i_size-corruption.patch Kalpak Shah
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox