From: Marcus Huewe <suse-tux@gmx.de>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH 2/2] mke2fs: fix filesystem size calculation, if an offset is specified
Date: Thu, 12 May 2016 18:22:50 +0200 [thread overview]
Message-ID: <20160512162250.GA4662@linux> (raw)
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
reply other threads:[~2016-05-12 16:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160512162250.GA4662@linux \
--to=suse-tux@gmx.de \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).