Blame SOURCES/e2fsprogs-1.42.9-resize2fs-fix-resizing-large-file-systems-when-block.patch

3bfba3
From c94aec3123293ed2288bd0bf5536d9bf16ecd07b Mon Sep 17 00:00:00 2001
3bfba3
From: Theodore Ts'o <tytso@mit.edu>
3bfba3
Date: Tue, 25 Oct 2016 13:18:14 -0400
3bfba3
Subject: [PATCH] resize2fs: fix resizing large file systems when block size !=
3bfba3
 page size
3bfba3
3bfba3
Reported by: Jerry Lee <jerrylee@qnap.com>
3bfba3
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
3bfba3
---
3bfba3
 resize/main.c | 2 +-
3bfba3
 1 file changed, 1 insertion(+), 1 deletion(-)
3bfba3
3bfba3
diff --git a/resize/main.c b/resize/main.c
3bfba3
index 3951b09..cf86a23 100644
3bfba3
--- a/resize/main.c
3bfba3
+++ b/resize/main.c
3bfba3
@@ -406,7 +406,7 @@ int main (int argc, char ** argv)
3bfba3
 		new_size = max_size;
3bfba3
 		/* Round down to an even multiple of a pagesize */
3bfba3
 		if (sys_page_size > fs->blocksize)
3bfba3
-			new_size &= ~((sys_page_size / fs->blocksize)-1);
3bfba3
+			new_size &= ~((blk64_t)((sys_page_size / fs->blocksize)-1));
3bfba3
 	}
3bfba3
 	if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
3bfba3
 				       EXT4_FEATURE_INCOMPAT_64BIT)) {
3bfba3
-- 
3bfba3
2.21.0
3bfba3