summaryrefslogtreecommitdiff
path: root/resize/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'resize/main.c')
-rw-r--r--resize/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/resize/main.c b/resize/main.c
index 7d8b287c..28a49ba2 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -392,6 +392,14 @@ int main (int argc, char ** argv)
exit(1);
}
} else {
+ /* Take down devices exactly 16T to 2^32-1 blocks */
+ if (max_size == (1ULL << 32))
+ max_size--;
+ else if (max_size > (1ULL << 32)) {
+ com_err(program_name, 0, _("New size too large to be "
+ "expressed in 32 bits\n"));
+ exit(1);
+ }
new_size = max_size;
/* Round down to an even multiple of a pagesize */
if (sys_page_size > fs->blocksize)