Re: writing a plugin for reiserfs compression

From: Andreas Dilger (adilger@turbolabs.com)
Date: Fri Nov 09 2001 - 18:27:19 EST


Nikita <nikita@namesys.com> writes:
> Andreas Dilger writes:
> > As a note to whoever at namesys created the reiserfs patch to add the
> > "notail" flag (overloading the "nodump" flag). I would much rather
>
> It was me. Agree completely that allocating new flag would be better. I
> just wanted "notail" to actually work and be accessible through standard
> utilities, because it's really useful. "nodump" looked like least useful
> of flags for me, because dump(8) doesn't work with reiserfs (not that it
> worked with ext2 reliably either). I actually tried to contact Remy Card
> and Theodore Tso, to discuss how [ls|ch]attr can be modified to support
> different file-systems, but to no avail.
>
> > that a new "notail" flag be allocated for this. I will contact Ted
> > Ted Ts'o to get a flag assigned. This will avoid any problems in the
> > future, and may also be useful at some time for ext2.

OK, FYI Nikita, Ted has allocated a EXT2_NOTAIL_FL flag for chattr/lsattr
(value 0x00008000) which can be used for setting files/directories to be
permanently notail. It is obviously up to the reiserfs code to handle
this flag and inherit it for files created in a directory (e.g. /boot),
but starting with e2fsprogs 1.26 chattr/lsattr it will be able to set/get
this flag on ext2/ext3 (and reiserfs with your attributes patch).

> I would rather like to see lsattr/chattr to become file-system
> independent. This requires that all file-systems use the same ioctl cmds
> to set and get bitmasks associated with inodes and provide somehow a
> mapping between symbolic name of an attribute and bitmask. Support for
> octal bitmask (a la chmod) in chattr is also an option.

There is nothing really ext2-specific to the chattr/lsattr programs. Yes,
they use an ioctl and flag values assigned to ext2, but as you have shown
it is also possible to use this ioctl on reiserfs without any problems.
These commands are for simple file attributes only. If reiserfs has a need
for specific attributes, then Ted can probably allocate a fs-specific range.
If you want to store the values in a different format, you can always map in
the ioctl, although I don't see a real need for that right now.

For more complex extended attributes, there are [gs]etextattr and [gs]etacl
commands (I think) which the ext2 EA/ACL code uses, but again this
is not ext2 specific. The author (Andreas Gruenbacher) is working
with the XFS folks to support a common kernel API and allow the same
user-space tools to work, even if the fs-internal and on-disk EA/ACL formats
are different. However, I know for extended attributes that Hans has
other plans (reiser4/sandbox syscall) so I don't know if this will be
useful to you. Maybe still yes, if the same user programs can interface
with the reiserfs syscall, and it may still be useful for ACL support.

Cheers, Andreas

--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:23 EST