Author: pluto                        Date: Thu Oct 23 22:42:45 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- there were so much changes in xfs/ during 2.6.27-rcX cycle.
  we must temporarily drop this feature and wait for updated patch.

---- Files affected:
SOURCES:
   linux-2.6-vs2.3.patch (1.2.4.11.2.42 -> 1.2.4.11.2.43) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-vs2.3.patch
diff -u SOURCES/linux-2.6-vs2.3.patch:1.2.4.11.2.42 
SOURCES/linux-2.6-vs2.3.patch:1.2.4.11.2.43
--- SOURCES/linux-2.6-vs2.3.patch:1.2.4.11.2.42 Thu Oct 23 20:04:08 2008
+++ SOURCES/linux-2.6-vs2.3.patch       Fri Oct 24 00:42:38 2008
@@ -8083,771 +8083,6 @@
  #include <asm/uaccess.h>
  
  
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_ioctl.c 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_ioctl.c
---- linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_ioctl.c      2008-09-22 
17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_ioctl.c      
2008-09-22 18:41:53.000000000 +0200
-@@ -806,6 +806,10 @@ xfs_merge_ioc_xflags(
-               xflags |= XFS_XFLAG_IMMUTABLE;
-       else
-               xflags &= ~XFS_XFLAG_IMMUTABLE;
-+      if (flags & FS_IXUNLINK_FL)
-+              xflags |= XFS_XFLAG_IXUNLINK;
-+      else
-+              xflags &= ~XFS_XFLAG_IXUNLINK;
-       if (flags & FS_APPEND_FL)
-               xflags |= XFS_XFLAG_APPEND;
-       else
-@@ -828,12 +832,16 @@ xfs_merge_ioc_xflags(
- 
- STATIC unsigned int
- xfs_di2lxflags(
--      __uint16_t      di_flags)
-+      __uint16_t      di_flags,
-+      __uint16_t      di_vflags)
- {
-       unsigned int    flags = 0;
- 
-       if (di_flags & XFS_DIFLAG_IMMUTABLE)
-               flags |= FS_IMMUTABLE_FL;
-+      if (di_flags & XFS_DIFLAG_IXUNLINK)
-+              flags |= FS_IXUNLINK_FL;
-+
-       if (di_flags & XFS_DIFLAG_APPEND)
-               flags |= FS_APPEND_FL;
-       if (di_flags & XFS_DIFLAG_SYNC)
-@@ -842,6 +850,11 @@ xfs_di2lxflags(
-               flags |= FS_NOATIME_FL;
-       if (di_flags & XFS_DIFLAG_NODUMP)
-               flags |= FS_NODUMP_FL;
-+
-+      if (di_vflags & XFS_DIVFLAG_BARRIER)
-+              flags |= FS_BARRIER_FL;
-+      if (di_vflags & XFS_DIVFLAG_COW)
-+              flags |= FS_COW_FL;
-       return flags;
- }
- 
-@@ -892,6 +905,8 @@ xfs_set_diflags(
-       di_flags = (ip->i_d.di_flags & XFS_DIFLAG_PREALLOC);
-       if (xflags & XFS_XFLAG_IMMUTABLE)
-               di_flags |= XFS_DIFLAG_IMMUTABLE;
-+      if (xflags & XFS_XFLAG_IXUNLINK)
-+              di_flags |= XFS_DIFLAG_IXUNLINK;
-       if (xflags & XFS_XFLAG_APPEND)
-               di_flags |= XFS_DIFLAG_APPEND;
-       if (xflags & XFS_XFLAG_SYNC)
-@@ -920,6 +935,10 @@ xfs_set_diflags(
-                       di_flags |= XFS_DIFLAG_EXTSIZE;
-       }
- 
-+      if (xflags & XFS_XFLAG_BARRIER)
-+              di_flags |= XFS_DIFLAG_BARRIER;
-+      if (xflags & XFS_XFLAG_COW)
-+              di_flags |= XFS_DIFLAG_COW;
-       ip->i_d.di_flags = di_flags;
- }
- 
-@@ -934,6 +953,10 @@ xfs_diflags_to_linux(
-               inode->i_flags |= S_IMMUTABLE;
-       else
-               inode->i_flags &= ~S_IMMUTABLE;
-+      if (xflags & XFS_XFLAG_IXUNLINK)
-+              inode->i_flags |= S_IXUNLINK;
-+      else
-+              inode->i_flags &= ~S_IXUNLINK;
-       if (xflags & XFS_XFLAG_APPEND)
-               inode->i_flags |= S_APPEND;
-       else
-@@ -946,6 +969,15 @@ xfs_diflags_to_linux(
-               inode->i_flags |= S_NOATIME;
-       else
-               inode->i_flags &= ~S_NOATIME;
-+
-+      if (xflags & XFS_XFLAG_BARRIER)
-+              inode->i_vflags |= V_BARRIER;
-+      else
-+              inode->i_vflags &= ~V_BARRIER;
-+      if (xflags & XFS_XFLAG_COW)
-+              inode->i_vflags |= V_COW;
-+      else
-+              inode->i_vflags &= ~V_COW;
- }
- 
- #define FSX_PROJID    1
-@@ -1223,7 +1255,8 @@ xfs_ioc_getxflags(
- {
-       unsigned int            flags;
- 
--      flags = xfs_di2lxflags(ip->i_d.di_flags);
-+      flags = xfs_di2lxflags(ip->i_d.di_flags, ip->i_d.di_vflags);
-+      flags &= ~(XFS_XFLAG_BARRIER | XFS_XFLAG_COW);
-       if (copy_to_user(arg, &flags, sizeof(flags)))
-               return -EFAULT;
-       return 0;
-@@ -1392,10 +1425,18 @@ xfs_ioctl(
-       case XFS_IOC_FSGETXATTRA:
-               return xfs_ioc_fsgetxattr(ip, 1, arg);
-       case XFS_IOC_FSSETXATTR:
-+              if (IS_BARRIER(inode)) {
-+                      vxwprintk_task(1, "messing with the barrier.");
-+                      return -XFS_ERROR(EACCES);
-+              }
-               return xfs_ioc_fssetxattr(ip, filp, arg);
-       case XFS_IOC_GETXFLAGS:
-               return xfs_ioc_getxflags(ip, arg);
-       case XFS_IOC_SETXFLAGS:
-+              if (IS_BARRIER(inode)) {
-+                      vxwprintk_task(1, "messing with the barrier.");
-+                      return -XFS_ERROR(EACCES);
-+              }
-               return xfs_ioc_setxflags(ip, filp, arg);
- 
-       case XFS_IOC_FSSETDM: {
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_iops.c 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_iops.c       2008-09-22 
17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_iops.c       
2008-09-22 18:15:12.000000000 +0200
-@@ -53,6 +53,7 @@
- #include <linux/namei.h>
- #include <linux/security.h>
- #include <linux/falloc.h>
-+#include <linux/vs_tag.h>
- 
- /*
-  * Bring the atime in the XFS inode uptodate.
-@@ -379,6 +380,7 @@ xfs_vn_link(
-               iput(inode);
-               return -error;
-       }
-+      dx_propagate_tag(nd, vn_to_inode(cvp));
- 
-       xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
-       d_instantiate(dentry, inode);
-@@ -558,6 +560,7 @@ xfs_vn_getattr(
-       stat->nlink = ip->i_d.di_nlink;
-       stat->uid = ip->i_d.di_uid;
-       stat->gid = ip->i_d.di_gid;
-+      stat->tag = ip->i_d.di_tag;
-       stat->ino = ip->i_ino;
- #if XFS_BIG_INUMS
-       stat->ino += mp->m_inoadd;
-@@ -596,6 +599,57 @@ xfs_vn_getattr(
-       return 0;
- }
- 
-+/* Propagate flags from i_flags to XFS_I(inode)->di_flags */
-+STATIC void
-+xfs_get_inode_flags(struct inode *inode)
-+{
-+      xfs_inode_t *ip = XFS_I(inode);
-+      unsigned int flags = inode->i_flags;
-+      unsigned int vflags = inode->i_vflags;
-+
-+      if (flags & S_IMMUTABLE)
-+              ip->i_d.di_flags |= XFS_DIFLAG_IMMUTABLE;
-+      else
-+              ip->i_d.di_flags &= ~XFS_DIFLAG_IMMUTABLE;
-+      if (flags & S_IXUNLINK)
-+              ip->i_d.di_flags |= XFS_DIFLAG_IXUNLINK;
-+      else
-+              ip->i_d.di_flags &= ~XFS_DIFLAG_IXUNLINK;
-+
-+      if (vflags & V_BARRIER)
-+              ip->i_d.di_vflags |= XFS_DIVFLAG_BARRIER;
-+      else
-+              ip->i_d.di_vflags &= ~XFS_DIVFLAG_BARRIER;
-+      if (vflags & V_COW)
-+              ip->i_d.di_vflags |= XFS_DIVFLAG_COW;
-+      else
-+              ip->i_d.di_vflags &= ~XFS_DIVFLAG_COW;
-+}
-+
-+STATIC int
-+xfs_vn_sync_flags(struct inode *inode)
-+{
-+      xfs_inode_t *ip = XFS_I(inode);
-+      struct bhv_vattr *vattr;
-+      int error;
-+
-+      vattr = kmalloc(sizeof(*vattr), GFP_KERNEL);
-+      if (unlikely(!vattr))
-+              return -ENOMEM;
-+
-+      xfs_get_inode_flags(inode);
-+
-+      vattr->va_mask = XFS_AT_XFLAGS;
-+      vattr->va_xflags = xfs_ip2xflags(ip);
-+
-+      error = -xfs_setattr(ip, vattr, 0, NULL);
-+      if (likely(!error))
-+              vn_revalidate(XFS_ITOV(ip));    /* update flags */
-+
-+      kfree(vattr);
-+      return error;
-+}
-+
- STATIC int
- xfs_vn_setattr(
-       struct dentry   *dentry,
-@@ -671,6 +725,7 @@ static const struct inode_operations xfs
-       .removexattr            = generic_removexattr,
-       .listxattr              = xfs_vn_listxattr,
-       .fallocate              = xfs_vn_fallocate,
-+      .sync_flags             = xfs_vn_sync_flags,
- };
- 
- static const struct inode_operations xfs_dir_inode_operations = {
-@@ -745,6 +800,10 @@ xfs_diflags_to_iflags(
-               inode->i_flags |= S_IMMUTABLE;
-       else
-               inode->i_flags &= ~S_IMMUTABLE;
-+      if (ip->i_d.di_flags & XFS_DIFLAG_IXUNLINK)
-+              inode->i_flags |= S_IXUNLINK;
-+      else
-+              inode->i_flags &= ~S_IXUNLINK;
-       if (ip->i_d.di_flags & XFS_DIFLAG_APPEND)
-               inode->i_flags |= S_APPEND;
-       else
-@@ -757,6 +816,15 @@ xfs_diflags_to_iflags(
-               inode->i_flags |= S_NOATIME;
-       else
-               inode->i_flags &= ~S_NOATIME;
-+
-+      if (ip->i_d.di_vflags & XFS_DIVFLAG_BARRIER)
-+              inode->i_vflags |= V_BARRIER;
-+      else
-+              inode->i_vflags &= ~V_BARRIER;
-+      if (ip->i_d.di_vflags & XFS_DIVFLAG_COW)
-+              inode->i_vflags |= V_COW;
-+      else
-+              inode->i_vflags &= ~V_COW;
- }
- 
- /*
-@@ -777,6 +845,7 @@ xfs_setup_inode(
-       inode->i_nlink  = ip->i_d.di_nlink;
-       inode->i_uid    = ip->i_d.di_uid;
-       inode->i_gid    = ip->i_d.di_gid;
-+      inode->i_tag    = ip->i_d.di_tag;
- 
-       switch (inode->i_mode & S_IFMT) {
-       case S_IFBLK:
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_linux.h 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_linux.h
---- linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_linux.h      2008-09-22 
17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_linux.h      
2008-09-22 18:05:11.000000000 +0200
-@@ -126,6 +126,7 @@
- 
- #define current_cpu()         (raw_smp_processor_id())
- #define current_pid()         (current->pid)
-+#define current_fstag(cred,vp)        
(dx_current_fstag(vn_to_inode(vp)->i_sb))
- #define current_test_flags(f) (current->flags & (f))
- #define current_set_flags_nested(sp, f)               \
-               (*(sp) = current->flags, current->flags |= (f))
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_super.c 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_super.c
---- linux-2.6.27-rc7/fs/xfs/linux-2.6/xfs_super.c      2008-09-22 
17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/linux-2.6/xfs_super.c      
2008-09-22 18:18:36.000000000 +0200
-@@ -147,6 +147,9 @@ xfs_args_allocate(
- #define MNTOPT_DMAPI  "dmapi"         /* DMI enabled (DMAPI / XDSM) */
- #define MNTOPT_XDSM   "xdsm"          /* DMI enabled (DMAPI / XDSM) */
- #define MNTOPT_DMI    "dmi"           /* DMI enabled (DMAPI / XDSM) */
-+#define MNTOPT_TAGXID "tagxid"        /* context tagging for inodes */
-+#define MNTOPT_TAGGED "tag"           /* context tagging for inodes */
-+#define MNTOPT_NOTAGTAG       "notag"         /* do not use context tagging */
- 
- /*
-  * Table driven mount option parser.
-@@ -383,6 +386,19 @@ xfs_parseargs(
-               } else if (!strcmp(this_char, "irixsgid")) {
-                       cmn_err(CE_WARN,
-       "XFS: irixsgid is now a sysctl(2) variable, option is deprecated.");
-+#ifndef CONFIG_TAGGING_NONE
-+              } else if (!strcmp(this_char, MNTOPT_TAGGED)) {
-+                      args->flags2 |= XFSMNT2_TAGGED;
-+              } else if (!strcmp(this_char, MNTOPT_NOTAGTAG)) {
-+                      args->flags2 &= ~XFSMNT2_TAGGED;
-+              } else if (!strcmp(this_char, MNTOPT_TAGXID)) {
-+                      args->flags2 |= XFSMNT2_TAGGED;
-+#endif
-+#ifdef CONFIG_PROPAGATE
-+              } else if (!strcmp(this_char, MNTOPT_TAGGED)) {
-+                      /* use value */
-+                      args->flags2 |= XFSMNT2_TAGGED;
-+#endif
-               } else {
-                       cmn_err(CE_WARN,
-                               "XFS: unknown mount option [%s].", this_char);
-@@ -1301,6 +1317,14 @@ xfs_fs_remount(
-               case Opt_nobarrier:
-                       mp->m_flags &= ~XFS_MOUNT_BARRIER;
-                       break;
-+              case Opt_tag:
-+              case Opt_notag:
-+                      /*
-+                       * !(sb->s_flags & MS_TAGGED)) {
-+                       *      printk("XFS: %s: tagging not permitted on 
remount.\n",
-+                       *          sb->s_id);
-+                       *  error = EINVAL; */
-+                      break;
-               default:
-                       /*
-                        * Logically we would return an error here to prevent
-@@ -1555,6 +1579,9 @@ xfs_start_flags(
- 
-       if (ap->flags & XFSMNT_DMAPI)
-               mp->m_flags |= XFS_MOUNT_DMAPI;
-+
-+      if (ap->flags2 & XFSMNT2_TAGGED)
-+              mp->m_flags |= XFS_MOUNT_TAGGED;
-       return 0;
- 
- 
-@@ -1749,6 +1776,9 @@ xfs_fs_fill_super(
- 
-       XFS_SEND_MOUNT(mp, DM_RIGHT_NULL, args->mtpt, args->fsname);
- 
-+      if (mp->m_flags & XFS_MOUNT_TAGGED)
-+              sb->s_flags |= MS_TAGGED;
-+
-       sb->s_dirt = 1;
-       sb->s_magic = XFS_SB_MAGIC;
-       sb->s_blocksize = mp->m_sb.sb_blocksize;
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/quota/xfs_qm_syscalls.c 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/quota/xfs_qm_syscalls.c
---- linux-2.6.27-rc7/fs/xfs/quota/xfs_qm_syscalls.c    2008-09-22 
17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/quota/xfs_qm_syscalls.c    
2008-09-22 17:44:24.000000000 +0200
-@@ -17,6 +17,7 @@
-  */
- 
- #include <linux/capability.h>
-+#include <linux/vs_context.h>
- 
- #include "xfs.h"
- #include "xfs_fs.h"
-@@ -205,7 +206,7 @@ xfs_qm_scall_quotaoff(
-       xfs_qoff_logitem_t      *qoffstart;
-       int                     nculprits;
- 
--      if (!force && !capable(CAP_SYS_ADMIN))
-+      if (!force && !vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL))
-               return XFS_ERROR(EPERM);
-       /*
-        * No file system can have quotas enabled on disk but not in core.
-@@ -383,7 +384,7 @@ xfs_qm_scall_trunc_qfiles(
-       int             error = 0, error2 = 0;
-       xfs_inode_t     *qip;
- 
--      if (!capable(CAP_SYS_ADMIN))
-+      if (!vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL))
-               return XFS_ERROR(EPERM);
-       if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) {
-               qdprintk("qtrunc flags=%x m_qflags=%x\n", flags, mp->m_qflags);
-@@ -426,7 +427,7 @@ xfs_qm_scall_quotaon(
-       uint            accflags;
-       __int64_t       sbflags;
- 
--      if (!capable(CAP_SYS_ADMIN))
-+      if (!vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL))
-               return XFS_ERROR(EPERM);
- 
-       flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
-@@ -595,7 +596,7 @@ xfs_qm_scall_setqlim(
-       int                     error;
-       xfs_qcnt_t              hard, soft;
- 
--      if (!capable(CAP_SYS_ADMIN))
-+      if (!vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL))
-               return XFS_ERROR(EPERM);
- 
-       if ((newlim->d_fieldmask &
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/xfs_clnt.h 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_clnt.h
---- linux-2.6.27-rc7/fs/xfs/xfs_clnt.h 2008-09-22 17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_clnt.h 2008-09-22 
17:44:24.000000000 +0200
-@@ -101,5 +101,6 @@ struct xfs_mount_args {
-                                                * I/O size in stat(2) */
- #define XFSMNT2_FILESTREAMS   0x00000002      /* enable the filestreams
-                                                * allocator */
-+#define XFSMNT2_TAGGED                0x10000000      /* context tagging */
- 
- #endif        /* __XFS_CLNT_H__ */
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/xfs_dinode.h 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_dinode.h
---- linux-2.6.27-rc7/fs/xfs/xfs_dinode.h       2008-07-13 23:51:29.000000000 
+0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_dinode.h       2008-09-22 
17:44:24.000000000 +0200
-@@ -53,7 +53,9 @@ typedef struct xfs_dinode_core {
-       __be32          di_gid;         /* owner's group id */
-       __be32          di_nlink;       /* number of links to file */
-       __be16          di_projid;      /* owner's project id */
--      __u8            di_pad[8];      /* unused, zeroed space */
-+      __be16          di_tag;         /* context tagging */
-+      __be16          di_vflags;      /* vserver specific flags */
-+      __u8            di_pad[4];      /* unused, zeroed space */
-       __be16          di_flushiter;   /* incremented on flush */
-       xfs_timestamp_t di_atime;       /* time last accessed */
-       xfs_timestamp_t di_mtime;       /* time last modified */
-@@ -136,7 +138,9 @@ typedef struct xfs_dinode
- #define       XFS_DI_NEXT_UNLINKED    0x1000000
- #define       XFS_DI_U                0x2000000
- #define       XFS_DI_A                0x4000000
--#define       XFS_DI_NUM_BITS         27
-+#define       XFS_DI_TAG              0x8000000
-+#define       XFS_DI_VFLAGS           0x10000000
-+#define       XFS_DI_NUM_BITS         29
- #define       XFS_DI_ALL_BITS         ((1 << XFS_DI_NUM_BITS) - 1)
- #define       XFS_DI_CORE_BITS        (XFS_DI_ALL_BITS & ~(XFS_DI_U|XFS_DI_A))
- 
-@@ -223,6 +227,8 @@ typedef enum xfs_dinode_fmt
- #define XFS_DIFLAG_EXTSZINHERIT_BIT 12        /* inherit inode extent size */
- #define XFS_DIFLAG_NODEFRAG_BIT     13        /* do not reorganize/defragment 
*/
- #define XFS_DIFLAG_FILESTREAM_BIT   14  /* use filestream allocator */
-+#define XFS_DIFLAG_IXUNLINK_BIT     15        /* Immutable inver on unlink */
-+
- #define XFS_DIFLAG_REALTIME      (1 << XFS_DIFLAG_REALTIME_BIT)
- #define XFS_DIFLAG_PREALLOC      (1 << XFS_DIFLAG_PREALLOC_BIT)
- #define XFS_DIFLAG_NEWRTBM       (1 << XFS_DIFLAG_NEWRTBM_BIT)
-@@ -238,6 +244,7 @@ typedef enum xfs_dinode_fmt
- #define XFS_DIFLAG_EXTSZINHERIT  (1 << XFS_DIFLAG_EXTSZINHERIT_BIT)
- #define XFS_DIFLAG_NODEFRAG      (1 << XFS_DIFLAG_NODEFRAG_BIT)
- #define XFS_DIFLAG_FILESTREAM    (1 << XFS_DIFLAG_FILESTREAM_BIT)
-+#define XFS_DIFLAG_IXUNLINK      (1 << XFS_DIFLAG_IXUNLINK_BIT)
- 
- #ifdef CONFIG_XFS_RT
- #define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME)
-@@ -250,6 +257,10 @@ typedef enum xfs_dinode_fmt
-        XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \
-        XFS_DIFLAG_NOATIME | XFS_DIFLAG_NODUMP | XFS_DIFLAG_RTINHERIT | \
-        XFS_DIFLAG_PROJINHERIT | XFS_DIFLAG_NOSYMLINKS | XFS_DIFLAG_EXTSIZE | \
--       XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM)
-+       XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM 
| \
-+       XFS_DIFLAG_IXUNLINK)
-+
-+#define XFS_DIVFLAG_BARRIER   0x01
-+#define XFS_DIVFLAG_COW               0x02
- 
- #endif        /* __XFS_DINODE_H__ */
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/xfs_fs.h 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_fs.h
---- linux-2.6.27-rc7/fs/xfs/xfs_fs.h   2008-09-22 17:40:42.000000000 +0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_fs.h   2008-09-22 
17:44:24.000000000 +0200
-@@ -67,6 +67,9 @@ struct fsxattr {
- #define XFS_XFLAG_EXTSZINHERIT        0x00001000      /* inherit inode extent 
size */
- #define XFS_XFLAG_NODEFRAG    0x00002000      /* do not defragment */
- #define XFS_XFLAG_FILESTREAM  0x00004000      /* use filestream allocator */
-+#define XFS_XFLAG_IXUNLINK    0x00008000      /* immutable invert on unlink */
-+#define XFS_XFLAG_BARRIER     0x10000000      /* chroot() barrier */
-+#define XFS_XFLAG_COW         0x20000000      /* copy on write mark */
- #define XFS_XFLAG_HASATTR     0x80000000      /* no DIFLAG for this   */
- 
- /*
-@@ -297,7 +300,8 @@ typedef struct xfs_bstat {
-       __s32           bs_extents;     /* number of extents            */
-       __u32           bs_gen;         /* generation count             */
-       __u16           bs_projid;      /* project id                   */
--      unsigned char   bs_pad[14];     /* pad space, unused            */
-+      __u16           bs_tag;         /* context tagging              */
-+      unsigned char   bs_pad[12];     /* pad space, unused            */
-       __u32           bs_dmevmask;    /* DMIG event mask              */
-       __u16           bs_dmstate;     /* DMIG state info              */
-       __u16           bs_aextents;    /* attribute number of extents  */
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/xfs_ialloc.c 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_ialloc.c
---- linux-2.6.27-rc7/fs/xfs/xfs_ialloc.c       2008-07-13 23:51:29.000000000 
+0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_ialloc.c       2008-09-22 
17:44:24.000000000 +0200
-@@ -84,6 +84,8 @@ xfs_ialloc_log_di(
-               offsetof(xfs_dinode_t, di_next_unlinked),
-               offsetof(xfs_dinode_t, di_u),
-               offsetof(xfs_dinode_t, di_a),
-+              offsetof(xfs_dinode_core_t, di_tag),
-+              offsetof(xfs_dinode_core_t, di_vflags),
-               sizeof(xfs_dinode_t)
-       };
- 
-diff -NurpP --minimal linux-2.6.27-rc7/fs/xfs/xfs_inode.c 
linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_inode.c
---- linux-2.6.27-rc7/fs/xfs/xfs_inode.c        2008-09-22 17:40:42.000000000 
+0200
-+++ linux-2.6.27-rc7-vs2.3.0.35.6pre/fs/xfs/xfs_inode.c        2008-09-22 
18:42:40.000000000 +0200
-@@ -249,6 +249,7 @@ xfs_inotobp(
-       return 0;
- }
- 
-+#include <linux/vs_tag.h>
- 
- /*
-  * This routine is called to map an inode to the buffer containing
-@@ -660,15 +661,25 @@ xfs_iformat_btree(
- void
- xfs_dinode_from_disk(
-       xfs_icdinode_t          *to,
--      xfs_dinode_core_t       *from)
-+      xfs_dinode_core_t       *from,
-+      int tagged)
- {
-+      uint32_t uid, gid, tag;
-+
-       to->di_magic = be16_to_cpu(from->di_magic);
-       to->di_mode = be16_to_cpu(from->di_mode);
-       to->di_version = from ->di_version;
-       to->di_format = from->di_format;
-       to->di_onlink = be16_to_cpu(from->di_onlink);
--      to->di_uid = be32_to_cpu(from->di_uid);
--      to->di_gid = be32_to_cpu(from->di_gid);
-+
-+      uid = be32_to_cpu(from->di_uid);
-+      gid = be32_to_cpu(from->di_gid);
-+      tag = be16_to_cpu(from->di_tag);
-+
-+      to->di_uid = INOTAG_UID(tagged, uid, gid);
-+      to->di_gid = INOTAG_GID(tagged, uid, gid);
-+      to->di_tag = INOTAG_TAG(tagged, uid, gid, tag);
-+
-       to->di_nlink = be32_to_cpu(from->di_nlink);
-       to->di_projid = be16_to_cpu(from->di_projid);
-       memcpy(to->di_pad, from->di_pad, sizeof(to->di_pad));
-@@ -689,21 +700,26 @@ xfs_dinode_from_disk(
-       to->di_dmevmask = be32_to_cpu(from->di_dmevmask);
-       to->di_dmstate  = be16_to_cpu(from->di_dmstate);
-       to->di_flags    = be16_to_cpu(from->di_flags);
-+      to->di_vflags   = be16_to_cpu(from->di_vflags);
-       to->di_gen      = be32_to_cpu(from->di_gen);
- }
- 
- void
- xfs_dinode_to_disk(
-       xfs_dinode_core_t       *to,
--      xfs_icdinode_t          *from)
-+      xfs_icdinode_t          *from,
-+      int tagged)
- {
-       to->di_magic = cpu_to_be16(from->di_magic);
-       to->di_mode = cpu_to_be16(from->di_mode);
-       to->di_version = from ->di_version;
-       to->di_format = from->di_format;
-       to->di_onlink = cpu_to_be16(from->di_onlink);
--      to->di_uid = cpu_to_be32(from->di_uid);
--      to->di_gid = cpu_to_be32(from->di_gid);
-+
-+      to->di_uid = cpu_to_be32(TAGINO_UID(tagged, from->di_uid, 
from->di_tag));
-+      to->di_gid = cpu_to_be32(TAGINO_GID(tagged, from->di_gid, 
from->di_tag));
-+      to->di_tag = cpu_to_be16(TAGINO_TAG(tagged, from->di_tag));
-+
-       to->di_nlink = cpu_to_be32(from->di_nlink);
-       to->di_projid = cpu_to_be16(from->di_projid);
-       memcpy(to->di_pad, from->di_pad, sizeof(to->di_pad));
-@@ -724,12 +740,14 @@ xfs_dinode_to_disk(
-       to->di_dmevmask = cpu_to_be32(from->di_dmevmask);
-       to->di_dmstate = cpu_to_be16(from->di_dmstate);
-       to->di_flags = cpu_to_be16(from->di_flags);
-+      to->di_vflags = cpu_to_be16(from->di_vflags);
-       to->di_gen = cpu_to_be32(from->di_gen);
- }
- 
- STATIC uint
- _xfs_dic2xflags(
--      __uint16_t              di_flags)
-+      __uint16_t              di_flags,
-+      __uint16_t              di_vflags)
- {
-       uint                    flags = 0;
- 
-@@ -740,6 +758,8 @@ _xfs_dic2xflags(
-                       flags |= XFS_XFLAG_PREALLOC;
-               if (di_flags & XFS_DIFLAG_IMMUTABLE)
-                       flags |= XFS_XFLAG_IMMUTABLE;
-+              if (di_flags & XFS_DIFLAG_IXUNLINK)
-+                      flags |= XFS_XFLAG_IXUNLINK;
-               if (di_flags & XFS_DIFLAG_APPEND)
-                       flags |= XFS_XFLAG_APPEND;
-               if (di_flags & XFS_DIFLAG_SYNC)
-@@ -763,7 +783,10 @@ _xfs_dic2xflags(
-               if (di_flags & XFS_DIFLAG_FILESTREAM)
-                       flags |= XFS_XFLAG_FILESTREAM;
-       }
--
-+      if (di_vflags & XFS_DIVFLAG_BARRIER)
-+              flags |= XFS_XFLAG_BARRIER;
-+      if (di_vflags & XFS_DIVFLAG_COW)
-+              flags |= XFS_XFLAG_COW;
-       return flags;
- }
- 
-@@ -773,7 +796,7 @@ xfs_ip2xflags(
- {
-       xfs_icdinode_t          *dic = &ip->i_d;
- 
--      return _xfs_dic2xflags(dic->di_flags) |
-+      return _xfs_dic2xflags(dic->di_flags, dic->di_vflags) |
-                               (XFS_IFORK_Q(ip) ? XFS_XFLAG_HASATTR : 0);
- }
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/linux-2.6-vs2.3.patch?r1=1.2.4.11.2.42&r2=1.2.4.11.2.43&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to