* xattr namespace question
@ 2006-03-21 12:06 Steven Whitehouse
2006-03-21 12:21 ` Andreas Dilger
0 siblings, 1 reply; 8+ messages in thread
From: Steven Whitehouse @ 2006-03-21 12:06 UTC (permalink / raw)
To: a.gruenbacher; +Cc: linux-fsdevel
Hi,
In order to remove the final ioctl() call in the GFS2 filesystem its
been suggested that we use xattrs as a replacement interface. Mostly
this is self-explanatory however there is one question that I've not
been able to resolve 100% satisfactorily, which is what the namespace
should look like.
We have a bunch of boolean flags, so (using the example of the journaled
data flag) should our xattrs be called something along the lines of
system.gfs2.jdata (this seems to be most popular suggestion amoung those
I've asked privately), or perhaps system.fs.gfs2.jdata or indeed is the
system namespace reserved for something special so that we should use a
special gfs2 namespace instead?
I've googled around and read all I can find, but I've not been able to
find a definitive answer to this question. Any pointers that you can
give would be very helpful,
Thanks,
Steve.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-21 12:06 xattr namespace question Steven Whitehouse
@ 2006-03-21 12:21 ` Andreas Dilger
2006-03-21 23:58 ` Nathan Scott
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Dilger @ 2006-03-21 12:21 UTC (permalink / raw)
To: Steven Whitehouse; +Cc: a.gruenbacher, linux-fsdevel
On Mar 21, 2006 12:06 +0000, Steven Whitehouse wrote:
> In order to remove the final ioctl() call in the GFS2 filesystem its
> been suggested that we use xattrs as a replacement interface. Mostly
> this is self-explanatory however there is one question that I've not
> been able to resolve 100% satisfactorily, which is what the namespace
> should look like.
>
> We have a bunch of boolean flags, so (using the example of the journaled
> data flag) should our xattrs be called something along the lines of
> system.gfs2.jdata (this seems to be most popular suggestion amoung those
> I've asked privately), or perhaps system.fs.gfs2.jdata or indeed is the
> system namespace reserved for something special so that we should use a
> special gfs2 namespace instead?
If your extra flags can be mapped onto the EXT2_IOC_GETFLAGS equivalent,
then you may want to (also) consider that. This allows the flags to be
got/set by lsattr and chattr, respectively, and have been in linux for ages.
It also happens that ext2/ext3/reiserfs all share this same API.
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-21 12:21 ` Andreas Dilger
@ 2006-03-21 23:58 ` Nathan Scott
2006-03-22 9:07 ` Steven Whitehouse
0 siblings, 1 reply; 8+ messages in thread
From: Nathan Scott @ 2006-03-21 23:58 UTC (permalink / raw)
To: Steven Whitehouse, a.gruenbacher, linux-fsdevel
On Tue, Mar 21, 2006 at 05:21:19AM -0700, Andreas Dilger wrote:
> On Mar 21, 2006 12:06 +0000, Steven Whitehouse wrote:
> > In order to remove the final ioctl() call in the GFS2 filesystem its
> > been suggested that we use xattrs as a replacement interface. Mostly
> > this is self-explanatory however there is one question that I've not
> > been able to resolve 100% satisfactorily, which is what the namespace
> > should look like.
> >
> > We have a bunch of boolean flags, so (using the example of the journaled
> > data flag) should our xattrs be called something along the lines of
"boolean flags" sounds alot more like the lsattr/chattr inode flags
as Andreas points out. There is already a data journalling (j) flag
there too.
> > system.gfs2.jdata (this seems to be most popular suggestion amoung those
> > I've asked privately), or perhaps system.fs.gfs2.jdata or indeed is the
> > system namespace reserved for something special so that we should use a
> > special gfs2 namespace instead?
The choice typically depends on what the permissions model for
access to the attribute needs to be. See attr(5).
> If your extra flags can be mapped onto the EXT2_IOC_GETFLAGS equivalent,
> then you may want to (also) consider that. This allows the flags to be
> got/set by lsattr and chattr, respectively, and have been in linux for ages.
> It also happens that ext2/ext3/reiserfs all share this same API.
And XFS, and hfsplus too from the look of it.
cheers.
--
Nathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-21 23:58 ` Nathan Scott
@ 2006-03-22 9:07 ` Steven Whitehouse
2006-03-22 8:59 ` Christoph Hellwig
0 siblings, 1 reply; 8+ messages in thread
From: Steven Whitehouse @ 2006-03-22 9:07 UTC (permalink / raw)
To: Nathan Scott; +Cc: a.gruenbacher, linux-fsdevel
Hi,
On Wed, 2006-03-22 at 10:58 +1100, Nathan Scott wrote:
> On Tue, Mar 21, 2006 at 05:21:19AM -0700, Andreas Dilger wrote:
> > On Mar 21, 2006 12:06 +0000, Steven Whitehouse wrote:
> > > In order to remove the final ioctl() call in the GFS2 filesystem its
> > > been suggested that we use xattrs as a replacement interface. Mostly
> > > this is self-explanatory however there is one question that I've not
> > > been able to resolve 100% satisfactorily, which is what the namespace
> > > should look like.
> > >
> > > We have a bunch of boolean flags, so (using the example of the journaled
> > > data flag) should our xattrs be called something along the lines of
>
> "boolean flags" sounds alot more like the lsattr/chattr inode flags
> as Andreas points out. There is already a data journalling (j) flag
> there too.
>
Yes, and for flags which are supported by ext2/3 this seems a sensible
route to take and I've already made a start to supporting that ioctl().
However there are still some other flags which don't fit in with the
existing ext2 flags, so for those we'll have to look for a different
method for those.
> > > system.gfs2.jdata (this seems to be most popular suggestion amoung those
> > > I've asked privately), or perhaps system.fs.gfs2.jdata or indeed is the
> > > system namespace reserved for something special so that we should use a
> > > special gfs2 namespace instead?
>
> The choice typically depends on what the permissions model for
> access to the attribute needs to be. See attr(5).
>
Well from that it would appear that system is the right namespace to
choose. So the current plan is to make all the flags available via
xattrs and those compatible with ext2, via the ext2 compatible ioctl()
interface as well.
Thanks for the pointing me in the right direction,
Steve.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-22 9:07 ` Steven Whitehouse
@ 2006-03-22 8:59 ` Christoph Hellwig
2006-03-22 21:43 ` Nathan Scott
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2006-03-22 8:59 UTC (permalink / raw)
To: Steven Whitehouse; +Cc: Nathan Scott, a.gruenbacher, linux-fsdevel
On Wed, Mar 22, 2006 at 09:07:06AM +0000, Steven Whitehouse wrote:
> Yes, and for flags which are supported by ext2/3 this seems a sensible
> route to take and I've already made a start to supporting that ioctl().
> However there are still some other flags which don't fit in with the
> existing ext2 flags, so for those we'll have to look for a different
> method for those.
there's flags only supported on xfs or jfs aswell, so adding new ones for
gfs is fine. we'll need to make sure they don't overlap, though. I have
long planned to have a common header for all flags and some shared utility
code but never got to it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-22 8:59 ` Christoph Hellwig
@ 2006-03-22 21:43 ` Nathan Scott
2006-03-23 12:04 ` Christoph Hellwig
0 siblings, 1 reply; 8+ messages in thread
From: Nathan Scott @ 2006-03-22 21:43 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Steven Whitehouse, a.gruenbacher, linux-fsdevel
On Wed, Mar 22, 2006 at 08:59:49AM +0000, Christoph Hellwig wrote:
> On Wed, Mar 22, 2006 at 09:07:06AM +0000, Steven Whitehouse wrote:
> > Yes, and for flags which are supported by ext2/3 this seems a sensible
> > route to take and I've already made a start to supporting that ioctl().
> > However there are still some other flags which don't fit in with the
> > existing ext2 flags, so for those we'll have to look for a different
> > method for those.
>
> there's flags only supported on xfs or jfs aswell, so adding new ones for
re: JFS - yeah I thought that too, but yesterday looking at
mainline there doesn't seem to be an ioctl handler in their
file_operations struct...?
cheers.
--
Nathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-22 21:43 ` Nathan Scott
@ 2006-03-23 12:04 ` Christoph Hellwig
2006-03-23 14:13 ` Dave Kleikamp
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2006-03-23 12:04 UTC (permalink / raw)
To: Nathan Scott
Cc: Christoph Hellwig, Steven Whitehouse, a.gruenbacher,
linux-fsdevel
On Thu, Mar 23, 2006 at 08:43:31AM +1100, Nathan Scott wrote:
> re: JFS - yeah I thought that too, but yesterday looking at
> mainline there doesn't seem to be an ioctl handler in their
> file_operations struct...?
the patches are very recent, looks like they're not in mainline yet.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xattr namespace question
2006-03-23 12:04 ` Christoph Hellwig
@ 2006-03-23 14:13 ` Dave Kleikamp
0 siblings, 0 replies; 8+ messages in thread
From: Dave Kleikamp @ 2006-03-23 14:13 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Nathan Scott, Steven Whitehouse, a.gruenbacher, linux-fsdevel
On Thu, 2006-03-23 at 12:04 +0000, Christoph Hellwig wrote:
> On Thu, Mar 23, 2006 at 08:43:31AM +1100, Nathan Scott wrote:
> > re: JFS - yeah I thought that too, but yesterday looking at
> > mainline there doesn't seem to be an ioctl handler in their
> > file_operations struct...?
>
> the patches are very recent, looks like they're not in mainline yet.
Right. Very recent. They are in the mainline post-2.6.16, and have
been in the last few -mm kernels (since 2.6.16-rc4-mm2)
Shagy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-03-23 14:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-21 12:06 xattr namespace question Steven Whitehouse
2006-03-21 12:21 ` Andreas Dilger
2006-03-21 23:58 ` Nathan Scott
2006-03-22 9:07 ` Steven Whitehouse
2006-03-22 8:59 ` Christoph Hellwig
2006-03-22 21:43 ` Nathan Scott
2006-03-23 12:04 ` Christoph Hellwig
2006-03-23 14:13 ` Dave Kleikamp
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).