tags 471977 +pending
thanks

On Fri, Mar 21, 2008 at 03:34:45PM +0100, Michael Banck wrote:
> I wonder whether it would be possible to tell mk2fs to use different
> defaults for block and inode size if a Hurd-owned partition (i.e., the
> user passed -o hurd) is requested.  The ext2fs server in the Debian
> GNU/Hurd distribution can only deal with a blocksize of 4096 right now,
> and it requires an inode-size of 128, it apparently does not boot with
> anything else.  As mke2fs recently changed the default inode-size in
> unstable, we get reports from users (plus sometimes users create really
> small partitions which get a smaller block size than 4096).

The following patch will be in e2fsprogs 1.41.

Regards,

                                                        - Ted

Date: Thu, 10 Jul 2008 09:24:25 -0400
Subject: [PATCH] mke2fs: Dumb down filesystems for GNU Hurd

The Hurd only supports filesystems with a blocksize of 4096 bytes, and
128 byte inodes.  It also doesn't understand the journal.  So force
the defaults to be something which the Hurd can handle if "-o hurd" is
specified on the command line.

Addresses-Debian-Bug: #471977

Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>
---
 misc/mke2fs.c    |    9 +++++++++
 misc/mke2fs.conf |    4 ++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 352e66b..960f67b 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -927,12 +927,19 @@ static char **parse_fs_type(const char *fs_type,
        const char      *size_type;
        struct str_list list;
        unsigned long   meg;
+       int             is_hurd = 0;
 
        if (init_list(&list))
                return 0;
 
+       if (creator_os && (!strcasecmp(creator_os, "GNU") ||
+                          !strcasecmp(creator_os, "hurd")))
+               is_hurd = 1;
+
        if (fs_type)
                ext_type = fs_type;
+       else if (is_hurd)
+               ext_type = "ext2";
        else if (progname) {
                ext_type = strrchr(progname, '/');
                if (ext_type)
@@ -997,6 +1004,8 @@ static char **parse_fs_type(const char *fs_type,
        free(parse_str);
        if (profile_type)
                free(profile_type);
+       if (is_hurd)
+               push_string(&list, "hurd");
        return (list.list);
 }
 
diff --git a/misc/mke2fs.conf b/misc/mke2fs.conf
index ea6d7bf..2eb4352 100644
--- a/misc/mke2fs.conf
+++ b/misc/mke2fs.conf
@@ -38,3 +38,7 @@
                inode_ratio = 4194304
                blocksize = -1
        }
+       hurd = {
+            blocksize = 4096
+            inode_size = 128
+       }
-- 
1.5.6.1.205.ge2c7.dirty




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to