linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mke2fs: Disallow bigalloc with with bs < 4096
@ 2013-04-03 13:51 Lukas Czerner
  2013-04-03 14:35 ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Czerner @ 2013-04-03 13:51 UTC (permalink / raw)
  To: linux-ext4; +Cc: Lukas Czerner

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mke2fs: Disallow bigalloc with with bs < 4096
  2013-04-03 13:51 [PATCH] mke2fs: Disallow bigalloc with with bs < 4096 Lukas Czerner
@ 2013-04-03 14:35 ` Theodore Ts'o
  2013-04-03 14:47   ` Lukáš Czerner
  0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2013-04-03 14:35 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: linux-ext4

On Wed, Apr 03, 2013 at 03:51:39PM +0200, Lukas Czerner wrote:
> 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.

This makes sense by default but I do see a point in allowing it for
testing purposes --- specifically, it allows us to verify that
bigalloc works on architectures such as PowerPC and Itanium where page
size is greater than the 4k block size.  So maybe a developer mode set
via mke2fs.conf?

Another option would be to enforce that we only support bigalloc file
systems where the blocksize == pagesize, but that means we wouldn't be
able to mount 4k bigalloc file systems on architectures with a 8k or
16k page size.

						- Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mke2fs: Disallow bigalloc with with bs < 4096
  2013-04-03 14:35 ` Theodore Ts'o
@ 2013-04-03 14:47   ` Lukáš Czerner
  0 siblings, 0 replies; 3+ messages in thread
From: Lukáš Czerner @ 2013-04-03 14:47 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Lukas Czerner, linux-ext4

On Wed, 3 Apr 2013, Theodore Ts'o wrote:

> Date: Wed, 3 Apr 2013 10:35:54 -0400
> From: Theodore Ts'o <tytso@mit.edu>
> To: Lukas Czerner <lczerner@redhat.com>
> Cc: linux-ext4@vger.kernel.org
> Subject: Re: [PATCH] mke2fs: Disallow bigalloc with with bs < 4096
> 
> On Wed, Apr 03, 2013 at 03:51:39PM +0200, Lukas Czerner wrote:
> > 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.
> 
> This makes sense by default but I do see a point in allowing it for
> testing purposes --- specifically, it allows us to verify that
> bigalloc works on architectures such as PowerPC and Itanium where page
> size is greater than the 4k block size.  So maybe a developer mode set
> via mke2fs.conf?

Yes, I though about that and I wanted to know what the general
opinion is. I'll prepare the patch which makes this tunable,
but restricted by default.

> 
> Another option would be to enforce that we only support bigalloc file
> systems where the blocksize == pagesize, but that means we wouldn't be
> able to mount 4k bigalloc file systems on architectures with a 8k or
> 16k page size.

Unfortunately we can't do that for the reasons you mentioned.

Thanks!
-Lukas

> 
> 						- Ted
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-03 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 13:51 [PATCH] mke2fs: Disallow bigalloc with with bs < 4096 Lukas Czerner
2013-04-03 14:35 ` Theodore Ts'o
2013-04-03 14:47   ` Lukáš Czerner

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).