linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ma <tm@tao.ma>
To: Ted Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Unify inode flags bit and inode flags.
Date: Mon, 12 Dec 2011 10:41:41 +0800	[thread overview]
Message-ID: <4EE569E5.40805@tao.ma> (raw)
In-Reply-To: <20111212024000.GA12433@thunk.org>

On 12/12/2011 10:40 AM, Ted Ts'o wrote:
> On Mon, Dec 12, 2011 at 09:59:49AM +0800, Tao Ma wrote:
>> From: Tao Ma <boyu.mt@taobao.com>
>>
>> In order to make atomic set/get of inode flags, we create a enum of
>> different inode flags. Now when we add a new inode flag(e.g inline data),
>> we have to add both the 'enum' and the 'define' and calculate the value
>> of 'define' by ourselves. This is a bit boring and error-prune.
>> So this patch just unify these 2 fields.
> 
> This was deliberate.  The problem is these flags also have to be in
> sync with the hex values defined in include/linux/fs.h (and in some
> other file systems' header files), not to mention the definitions in
> e2fsprogs.
> 
> This is because the lsattr and chattr command was originally defined
> originally for ext2/3, but then other file systems (reiserfs, xfs,
> btrfs, etc) decided they would also use the same ioctls and userspace
> commands.  So we have partial overlap of these flags, and when we
> define new flags we have to be a little careful to make sure we
> coordinate between all of the places where these flags are defined.
> 
> So the fact that this is also an ABI is why I don't want to use an
> enum and to calculate the values from that.
Fair enough.
Thanks for the detailed explanation.

Tao

      reply	other threads:[~2011-12-12  2:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12  1:59 [PATCH] ext4: Unify inode flags bit and inode flags Tao Ma
2011-12-12  2:40 ` Ted Ts'o
2011-12-12  2:41   ` Tao Ma [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=4EE569E5.40805@tao.ma \
    --to=tm@tao.ma \
    --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).