linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] mke2fs: fix filesystem size calculation, if an offset is specified
@ 2016-05-12 16:22 Marcus Huewe
  0 siblings, 0 replies; only message in thread
From: Marcus Huewe @ 2016-05-12 16:22 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4

If a filesystem size is explicitly specified, it should be used without
subtracting the offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
---
 misc/mke2fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index dd5bb35..e0a98e7 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1874,6 +1874,8 @@ profile_error:
 		flags |= VERBOSE_CREATE;
 	if (fs_blocks_count == 0)
 		flags |= NO_SIZE;
+	else
+		explicit_fssize = 1;
 	if (!check_plausibility(device_name, flags, &is_device) && !force)
 		proceed_question(proceed_delay);
 
@@ -1881,7 +1883,6 @@ profile_error:
 
 	/* Determine the size of the device (if possible) */
 	if (noaction && fs_blocks_count) {
-		explicit_fssize = 1;
 		dev_size = fs_blocks_count;
 		retval = 0;
 	} else
-- 
2.6.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-12 16:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 16:22 [PATCH 2/2] mke2fs: fix filesystem size calculation, if an offset is specified Marcus Huewe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).