On Wed, Oct 16, 2002 at 01:47:59PM -0800, Ethan Benson wrote:
> On Wed, Oct 16, 2002 at 05:41:20PM -0400, TJ Easter wrote:
> > I'm far from an expert level C programmer, but I will examine the code and
> > see if I am able to come up with anything and submit patches.
>
> im fine with C, its just finding my way around the XFS source is quite
> a challenge, unless your familier with its internals its quite easy to
> get lost.
>
> i believe the right place for them is the di_flags, defined in
> xfs_dinode.h (at the bottom).
>
> basically as i understand it you need check for these bits in the xfs
> diflags and fill the VFS inode flags, the VFS defines bits for
> immutable/append-only in a generic way, all XFS needs to do is
> inform the VFS that an inode is immutable, it will handle all the
> enforcment.
No that's not true. The VFS doesn't know about these flags as far as
I know. You have to handle them in fs specific code.
Even more interesting looking at the source and testing it at least append only
is broken for ext2/ext3 - generic_file_llseek doesn't check for it
so while you're required to open such a file O_APPEND lseek still works fine.
It has probably bitrotted long ago.
So if you want to implement it for XFS it may be a good idea to fix it
in ext2 first.
-Andi
|