public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION
Date: Tue, 21 Apr 2009 23:30:54 +0200	[thread overview]
Message-ID: <49EE3B0E.90706@gmail.com> (raw)
In-Reply-To: <20090420154725.GA14284@lst.de>

Christoph Hellwig wrote:
> On Fri, Apr 17, 2009 at 12:11:55PM +0200, Edward Shishkin wrote:
>   
>> Christoph Hellwig wrote:
>>     
>>> Add support for the standard attributes set via chattr and read vis
>>> lsattr.  Currently we store the attributes in the flags value in
>>> the btrfs inode, but I wonder whether we should split it into two so
>>> that we don't have to keep converting between the two formats.
>>>  
>>>       
>> Imho, since inode items are of fixed size, is won't be possible
>> to avoid such workarounds like conversion between formats.
>> No?
>>     
>
> While the inode format is fixed it has 256 spare bits for expansion.
>   

Ah, I meant the case when the spare bits are exhausted..

> But what I mean with the above is to split the current 64bit flags value
> into a a 32 bit internal flags and a 32bit user visible flags value
> and store the ioctl flags in the latter.
>
> OTOH every filesystem but extN seem to need some conversion so btrfs
> wouldn't be unusual at that.

Not sure about extN, but one of the techniques is to represent
inode item as a set of (optional) "extensions", so that every
such extension includes it's version number (think of it as
release date). If file system driver is older, then some encountered
extension, init_inode() returns error. OTOH, if some extension
is missed, then some featured operations can be undefined (i.e.
read(), or write(), etc.. will return error). No conversion is
needed, however such approach requires more sophisticated fsck.

>   And the GETFLAGS/SETFLAGS flags value
> are pretty ugly anyway as they mix up flags for user visible behaviour
> with extN implementation details that shouldn't really need to be
> exposed to userspace.
>
>
>   


  reply	other threads:[~2009-04-21 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  8:37 [PATCH] btrfs: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION Christoph Hellwig
2009-04-17 10:11 ` Edward Shishkin
2009-04-20 15:47   ` Christoph Hellwig
2009-04-21 21:30     ` Edward Shishkin [this message]
2009-04-23 14:00 ` Chris Ball
2009-04-23 18:01   ` Christoph Hellwig
2009-04-23 19:56 ` Chris Mason
2009-04-25 19:13 ` Andi Kleen

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=49EE3B0E.90706@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-btrfs@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