You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
904 B
29 lines
904 B
4 years ago
|
From c94aec3123293ed2288bd0bf5536d9bf16ecd07b Mon Sep 17 00:00:00 2001
|
||
|
From: Theodore Ts'o <tytso@mit.edu>
|
||
|
Date: Tue, 25 Oct 2016 13:18:14 -0400
|
||
|
Subject: [PATCH] resize2fs: fix resizing large file systems when block size !=
|
||
|
page size
|
||
|
|
||
|
Reported by: Jerry Lee <jerrylee@qnap.com>
|
||
|
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||
|
---
|
||
|
resize/main.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/resize/main.c b/resize/main.c
|
||
|
index 3951b09..cf86a23 100644
|
||
|
--- a/resize/main.c
|
||
|
+++ b/resize/main.c
|
||
|
@@ -406,7 +406,7 @@ int main (int argc, char ** argv)
|
||
|
new_size = max_size;
|
||
|
/* Round down to an even multiple of a pagesize */
|
||
|
if (sys_page_size > fs->blocksize)
|
||
|
- new_size &= ~((sys_page_size / fs->blocksize)-1);
|
||
|
+ new_size &= ~((blk64_t)((sys_page_size / fs->blocksize)-1));
|
||
|
}
|
||
|
if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
|
||
|
EXT4_FEATURE_INCOMPAT_64BIT)) {
|
||
|
--
|
||
|
2.21.0
|
||
|
|