xfs
[Top] [All Lists]

Re: [PATCH] use vfs-defined file attribute flags

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] use vfs-defined file attribute flags
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 14 Dec 2006 12:21:36 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20061214181500.GA13856@infradead.org>
References: <45819221.70502@sandeen.net> <20061214181500.GA13856@infradead.org>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (X11/20061107)
Christoph Hellwig wrote:

>> -#define LINUX_XFLAG_SYNC    0x00000008 /* Synchronous updates */
>> -#define LINUX_XFLAG_IMMUTABLE       0x00000010 /* Immutable file */
>> -#define LINUX_XFLAG_APPEND  0x00000020 /* writes to file may only append */
>> -#define LINUX_XFLAG_NODUMP  0x00000040 /* do not dump file */
>> -#define LINUX_XFLAG_NOATIME 0x00000080 /* do not update atime */
>> +#define LINUX_XFLAG_SYNC    FS_SYNC_FL      /* Synchronous updates */
>> +#define LINUX_XFLAG_IMMUTABLE       FS_IMMUTABLE_FL /* Immutable file */
>> +#define LINUX_XFLAG_APPEND  FS_APPEND_FL    /* writes may only append */
>> +#define LINUX_XFLAG_NODUMP  FS_NODUMP_FL    /* do not dump file */
>> +#define LINUX_XFLAG_NOATIME FS_NOATIME_FL   /* do not update atime */
>>     
>
> Just kill the defines completly and use the FS_ flags
>   
 1 file changed, 5 insertions(+), 10 deletions(-)

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Index: linux-2.6.19/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================
--- linux-2.6.19.orig/fs/xfs/linux-2.6/xfs_ioctl.c
+++ linux-2.6.19/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -1095,11 +1095,6 @@ xfs_ioc_fsgeometry(
 /*
  * Linux extended inode flags interface.
  */
-#define LINUX_XFLAG_SYNC       0x00000008 /* Synchronous updates */
-#define LINUX_XFLAG_IMMUTABLE  0x00000010 /* Immutable file */
-#define LINUX_XFLAG_APPEND     0x00000020 /* writes to file may only append */
-#define LINUX_XFLAG_NODUMP     0x00000040 /* do not dump file */
-#define LINUX_XFLAG_NOATIME    0x00000080 /* do not update atime */
 
 STATIC unsigned int
 xfs_merge_ioc_xflags(
@@ -1108,23 +1103,23 @@ xfs_merge_ioc_xflags(
 {
        unsigned int    xflags = start;
 
-       if (flags & LINUX_XFLAG_IMMUTABLE)
+       if (flags & FS_IMMUTABLE_FL)
                xflags |= XFS_XFLAG_IMMUTABLE;
        else
                xflags &= ~XFS_XFLAG_IMMUTABLE;
-       if (flags & LINUX_XFLAG_APPEND)
+       if (flags & FS_APPEND_FL)
                xflags |= XFS_XFLAG_APPEND;
        else
                xflags &= ~XFS_XFLAG_APPEND;
-       if (flags & LINUX_XFLAG_SYNC)
+       if (flags & FS_SYNC_FL)
                xflags |= XFS_XFLAG_SYNC;
        else
                xflags &= ~XFS_XFLAG_SYNC;
-       if (flags & LINUX_XFLAG_NOATIME)
+       if (flags & FS_NOATIME_FL)
                xflags |= XFS_XFLAG_NOATIME;
        else
                xflags &= ~XFS_XFLAG_NOATIME;
-       if (flags & LINUX_XFLAG_NODUMP)
+       if (flags & FS_NODUMP_FL)
                xflags |= XFS_XFLAG_NODUMP;
        else
                xflags &= ~XFS_XFLAG_NODUMP;



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