linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH] mke2fs: Disallow bigalloc with with bs < 4096
Date: Wed,  3 Apr 2013 15:51:39 +0200	[thread overview]
Message-ID: <1364997099-22590-1-git-send-email-lczerner@redhat.com> (raw)

Currently there is nothing preventing user to create file system with
bigalloc feature enabled and block size smaller than 4096 Bytes. However
such combination does not make much sense at all because the whole point
of bigalloc is to have bigger allocation units.

This patch disallow such combination.

Thanks!
-Lukas
---
 misc/mke2fs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index bbf477a..1f33a20 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1924,6 +1924,12 @@ profile_error:
 				  "smaller than the block size.\n"));
 			exit(1);
 		}
+		if (EXT2_BLOCK_SIZE(&fs_param) < 4096) {
+			com_err(program_name, 0,
+				_("Bigalloc feature is not supported with "
+				  "block size smaller than 4096 B"));
+			exit(1);
+		}
 	} else if (cluster_size) {
 		com_err(program_name, 0,
 			_("specifying a cluster size requires the "
-- 
1.7.7.6


             reply	other threads:[~2013-04-03 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 13:51 Lukas Czerner [this message]
2013-04-03 14:35 ` [PATCH] mke2fs: Disallow bigalloc with with bs < 4096 Theodore Ts'o
2013-04-03 14:47   ` Lukáš Czerner

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=1364997099-22590-1-git-send-email-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).