xfs
[Top] [All Lists]

Re: to compare journalised file systems

To: Ethan Benson <erbenson@xxxxxxxxxx>
Subject: Re: to compare journalised file systems
From: Stephen Lord <lord@xxxxxxx>
Date: 16 Oct 2002 16:48:22 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20021016214759.GI27982@xxxxxxxxxxxxxxx>
References: <20021016203853.GH27982@xxxxxxxxxxxxxxx> <Pine.LNX.4.44.0210161738120.5976-100000@xxxxxxxxxxxxxxxxxxxxxx> <20021016214759.GI27982@xxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Wed, 2002-10-16 at 16:47, 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. 

And setting them is a slightly different matter, but basically
this chunk of code in xfs_setattr would need extending with
different flags, and we would need to map the setting of the
bits down into a VOP_SETATTR in xfs with the AT_XFLAGS set:

                if (mask & AT_XFLAGS) {
                        ip->i_d.di_flags = 0;
                        if (vap->va_xflags & XFS_XFLAG_REALTIME) {
                                ip->i_d.di_flags |= XFS_DIFLAG_REALTIME;
                                /* This is replicated in the io core for
                                 * CXFS use
                                 */
                                ip->i_iocore.io_flags |= XFS_IOCORE_RT;
                        }
                        /* can't set PREALLOC this way, just ignore it */
                }


Steve



<Prev in Thread] Current Thread [Next in Thread>