public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Theodore Ts'o <tytso@mit.edu>, linux-ext4@vger.kernel.org
Cc: Kalpak Shah <kalpak@clusterfs.com>
Subject: Re: [PATCH 1/2] e2fsprogs: allow more than 32000 subdirectories
Date: Wed, 21 Mar 2007 22:00:16 -0600	[thread overview]
Message-ID: <20070322040016.GK5967@schatzie.adilger.int> (raw)
In-Reply-To: <1174512908.3080.1.camel@garfield>

On Mar 21, 2007  19:42 +0530, Kalpak Shah wrote:
> Index: e2fsprogs-1.40/lib/ext2fs/ext2_fs.h
> ===================================================================
> --- e2fsprogs-1.40.orig/lib/ext2fs/ext2_fs.h
> +++ e2fsprogs-1.40/lib/ext2fs/ext2_fs.h
> @@ -635,6 +635,7 @@ struct ext2_super_block {
>  #define EXT2_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE)
>  #define EXT2_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
>  					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
> +					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
>  					 EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
>  
>  /*
> Index: e2fsprogs-1.40/lib/ext2fs/ext2fs.h
> ===================================================================
> --- e2fsprogs-1.40.orig/lib/ext2fs/ext2fs.h
> +++ e2fsprogs-1.40/lib/ext2fs/ext2fs.h
> @@ -460,7 +463,8 @@ typedef struct ext2_icount *ext2_icount_
>  					 EXT3_FEATURE_INCOMPAT_RECOVER)
>  #endif
>  #define EXT2_LIB_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
> -					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE)
> +					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\
> +					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK)

Ted, can you give a bit of clarification for these different masks.
For EXT2_LIB_SOFTSUPP_RO_COMPAT, it says "These features are only allowed
if EXT2_FLAG_SOFTSUPP_FEATURES is passed to ext2fs_openfs()".  If the patch
from Kalpak adds DIR_NLINK to EXT2_LIB_FEATURE_RO_COMPAT_SUPP, does that
mean we should remove it from EXT2_FLAG_SOFTSUPP_FEATURES?

Also, I notice in ext2fs_open2() that there is a bit of code:

#ifdef EXT2_LIB_SOFTSUPP_RO_COMPAT
	if (flags & EXT2_FLAG_SOFTSUPP_FEATURES)
		features &= !EXT2_LIB_SOFTSUPP_RO_COMPAT;
#endif

But what does "!EXT2_LIB_SOFTSUPP_RO_COMPAT" really mean?  Should this be
~EXT2_LIB_SOFTSUPP_RO_COMPAT?  Should it be instead:

     features &= ~(EXT2_LIB_SOFTSUPP_RO_COMPAT|EXT2_LIB_FEATURE_RO_COMPAT_SUPP)
     
so that we don't mask out all of the features that are NOT in
SOFTSUPP_RO_COMPAT?  Otherwise we've just broken e2fsprogs feature compat
support badly I think.  A similar hunk exists for EXT2_LIB_SOFTSUPP_INCOMPAT.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

      parent reply	other threads:[~2007-03-22  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 14:12 [PATCH 1/2] e2fsprogs: allow more than 32000 subdirectories Kalpak Shah
     [not found] ` <20070321200208.GG5967@schatzie.adilger.int>
     [not found]   ` <1174512908.3080.1.camel@garfield>
2007-03-22  4:00     ` Andreas Dilger [this message]

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=20070322040016.GK5967@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=kalpak@clusterfs.com \
    --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