[Pvfs2-cvs] commit by kunkel in pvfs2/src/kernel/linux-2.6: acl.c file.c pvfs2-kernel.h pvfs2-utils.c super.c waitqueue.c xattr-default.c xattr-trusted.c xattr.c

CVS commit program cvs at parl.clemson.edu
Tue Aug 29 06:41:23 EDT 2006


Update of /projects/cvsroot/pvfs2/src/kernel/linux-2.6
In directory parlweb1:/tmp/cvs-serv30492/src/kernel/linux-2.6

Modified Files:
      Tag: kunkel-branch
	acl.c file.c pvfs2-kernel.h pvfs2-utils.c super.c waitqueue.c 
	xattr-default.c xattr-trusted.c xattr.c 
Log Message:
Backmerge with HEAD


Index: acl.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/acl.c,v
diff -p -u -r1.13.2.3 -r1.13.2.4
--- acl.c	18 Aug 2006 05:12:12 -0000	1.13.2.3
+++ acl.c	29 Aug 2006 10:41:21 -0000	1.13.2.4
@@ -163,6 +163,7 @@ pvfs2_acl_encode(const struct posix_acl 
             case ACL_GROUP_OBJ:
             case ACL_MASK:
             case ACL_OTHER:
+                entry->p_id = htobmi32(ACL_UNDEFINED_ID);
                 e += sizeof(pvfs2_acl_entry);
                 break;
 
@@ -250,7 +251,7 @@ pvfs2_get_acl(struct inode *inode, int t
 static int
 pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
 {
-    int error;
+    int error = 0;
     void *value = NULL;
     size_t size = 0;
     const char *name = NULL;
@@ -260,7 +261,7 @@ pvfs2_set_acl(struct inode *inode, int t
     if (S_ISLNK(inode->i_mode))
     {
         gossip_err("pvfs2_set_acl: disallow on symbolic links\n");
-        return -EOPNOTSUPP;
+        return -EACCES;
     }
     /* if ACL option is not set, then we return early */
     if (get_acl_flag(inode) == 0)
@@ -329,7 +330,12 @@ pvfs2_set_acl(struct inode *inode, int t
     }
     gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_set_acl: name %s, value %p, size %d, "
             " acl %p\n", name, value, size, acl);
-    /* Go ahead and set the extended attribute now */
+    /* Go ahead and set the extended attribute now 
+     * NOTE: Suppose acl was NULL, then value will be NULL and 
+     * size will be 0 and that will xlate to a removexattr.
+     * However, we dont want removexattr complain if attributes
+     * does not exist.
+     */
     error = pvfs2_inode_setxattr(inode, "", name, value, size, 0);
     if (value) 
     {
@@ -360,7 +366,6 @@ pvfs2_xattr_get_acl(struct inode *inode,
     }
     if (acl == NULL)
     {
-        gossip_err("pvfs2_get_acl failed due to no acls!\n");
         error = -ENODATA;
         goto out;
     }
@@ -504,6 +509,7 @@ int pvfs2_init_acl(struct inode *inode, 
 
     if (dir == NULL)
         dir = inode;
+    ClearModeFlag(pvfs2_inode);
     if (!S_ISLNK(inode->i_mode))
     {
         if (get_acl_flag(inode) == 1)
@@ -519,10 +525,9 @@ int pvfs2_init_acl(struct inode *inode, 
         {
             int old_mode = inode->i_mode;
             inode->i_mode &= ~current->fs->umask;
-            gossip_debug(GOSSIP_ACL_DEBUG, "inode->i_mode before %x and "
-                    "after %x\n", old_mode, inode->i_mode);
+            gossip_debug(GOSSIP_ACL_DEBUG, "inode->i_mode before %o and "
+                    "after %o\n", old_mode, inode->i_mode);
             SetModeFlag(pvfs2_inode);
-            mark_inode_dirty_sync(inode);
         }
     }
     if (get_acl_flag(inode) == 1 && acl)
@@ -536,6 +541,7 @@ int pvfs2_init_acl(struct inode *inode, 
             if (error) {
                 gossip_err("pvfs2_set_acl (default) directory failed with "
                         "error %d\n", error);
+                ClearModeFlag(pvfs2_inode);
                 goto cleanup;
             }
         }
@@ -543,6 +549,7 @@ int pvfs2_init_acl(struct inode *inode, 
         error = -ENOMEM;
         if (!clone) {
             gossip_err("posix_acl_clone failed with ENOMEM\n");
+            ClearModeFlag(pvfs2_inode);
             goto cleanup;
         }
         mode = inode->i_mode;
@@ -550,7 +557,12 @@ int pvfs2_init_acl(struct inode *inode, 
         if (error >= 0)
         {
             gossip_debug(GOSSIP_ACL_DEBUG, "posix_acl_create_masq changed mode "
-                    "from %x to %x\n", inode->i_mode, mode);
+                    "from %o to %o\n", inode->i_mode, mode);
+            /*
+             * Dont do a needless ->setattr() if mode has not changed 
+             */
+            if (inode->i_mode != mode)
+                SetModeFlag(pvfs2_inode);
             inode->i_mode = mode;
             SetModeFlag(pvfs2_inode);
             mark_inode_dirty_sync(inode);
@@ -566,6 +578,9 @@ int pvfs2_init_acl(struct inode *inode, 
         }
         posix_acl_release(clone);
     }
+    /* If mode of the inode was changed, then do a forcible ->setattr */
+    if (ModeFlag(pvfs2_inode))
+        pvfs2_flush_inode(inode);
 cleanup:
     posix_acl_release(acl);
     return error;
@@ -592,7 +607,7 @@ int pvfs2_acl_chmod(struct inode *inode)
     if (S_ISLNK(inode->i_mode))
     {
         gossip_err("pvfs2_acl_chmod: operation not permitted on symlink!\n");
-        error = -EOPNOTSUPP;
+        error = -EACCES;
         goto out;
     }
     acl = pvfs2_get_acl(inode, ACL_TYPE_ACCESS);
@@ -631,8 +646,13 @@ static int pvfs2_check_acl(struct inode 
 
     acl = pvfs2_get_acl(inode, ACL_TYPE_ACCESS);
 
-    if (IS_ERR(acl))
-        return PTR_ERR(acl);
+    if (IS_ERR(acl)) {
+        int error = PTR_ERR(acl);
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl: pvfs2_get_acl returned error %d\n",
+                error);
+        return error;
+    }
+    
     if (acl) 
     {
         int error = posix_acl_permission(inode, acl, mask);
@@ -642,6 +662,7 @@ static int pvfs2_check_acl(struct inode 
                 (long) inode->i_ino, acl, mask, error);
         return error;
     }
+    gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl returning EAGAIN\n");
     return -EAGAIN;
 }
 
@@ -653,15 +674,25 @@ int pvfs2_permission(struct inode *inode
     ret = generic_permission(inode, mask, pvfs2_check_acl);
     if (ret != 0)
     {
-        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: inode: %ld mask = %x"
-                "mode = %x current->fsuid = %x "
-                "inode->i_uid = %x, inode->i_gid = %x  ret = %d\n",
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission failed: inode: %ld mask = %o"
+                "mode = %o current->fsuid = %d "
+                "inode->i_uid = %d, inode->i_gid = %d "
+                "in_group_p = %d "
+                "(ret = %d)\n",
                 (long) inode->i_ino, mask, inode->i_mode, current->fsuid, 
-                inode->i_uid, inode->i_gid, ret);
-        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: mode [%x] & mask [%x] "
-                " & S_IRWXO [%x] = %d == mask [%x]?\n", 
+                inode->i_uid, inode->i_gid, 
+                in_group_p(inode->i_gid),
+                ret);
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: mode [%o] & mask [%o] "
+                " & S_IRWXO [%o] = %o == mask [%o]?\n", 
                 inode->i_mode, mask, S_IRWXO, 
                 (inode->i_mode & mask & S_IRWXO), mask);
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: did we check ACL's? (mode & S_IRWXG = %d)\n",
+                inode->i_mode & S_IRWXG);
+    }
+    else {
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission succeeded on inode %ld\n",
+                (long) inode->i_ino);
     }
     return ret;
 #else
@@ -669,9 +700,13 @@ int pvfs2_permission(struct inode *inode
     int mode = inode->i_mode;
     int error;
 
-    gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: mask = %x mode = %x "
-            "current->fsuid = %x, inode->i_uid = %x\n",
-            mask, mode, current->fsuid, inode->i_uid);
+    gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: inode: %ld mask = %o"
+            "mode = %o current->fsuid = %d "
+            "inode->i_uid = %d, inode->i_gid = %d"
+            "in_group_p = %d\n", 
+            (long) inode->i_ino, mask, mode, current->fsuid,
+            inode->i_uid, inode->i_gid,
+            in_group_p(inode->i_gid));
 
     /* No write access on a rdonly FS */
     if ((mask & MAY_WRITE) && IS_RDONLY(inode) &&
@@ -699,11 +734,7 @@ int pvfs2_permission(struct inode *inode
              * Access ACL won't work if we don't have group permission bits
              * set on the file!
              */
-            gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: [ACL] mode >> 3 (%x)"
-                    " & mask (%x) & S_IRWXO (%x) [%x] != mask [%x]\n",
-                    mode >> 3, mask, S_IRWXO, ((mode >> 3) & mask & S_IRWXO),
-                    mask);
-            if (((mode >> 3) & mask & S_IRWXO) != mask)
+            if (!(mode & S_IRWXG))
             {
                 goto check_groups;
             }
@@ -733,6 +764,8 @@ check_groups:
     {
         return 0;
     }
+    gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: mode (%o) & mask (%o) & S_IRWXO (%o) = %o == mask (%o)?\n",
+            mode, mask, S_IRWXO, mode & mask & S_IRWXO, mask);
 check_capabilities:
     /* Are we allowed to override DAC */
     if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode))

Index: file.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/file.c,v
diff -p -u -r1.118.2.3 -r1.118.2.4
--- file.c	18 Aug 2006 05:12:14 -0000	1.118.2.3
+++ file.c	29 Aug 2006 10:41:21 -0000	1.118.2.4
@@ -2128,6 +2128,7 @@ static int pvfs2_precheck_file_write(str
     } else {
         if (is_read_only(inode->i_rdev)) {
             err = -EPERM;
+            gossip_err("Operation not permitted on read only file system\n");
             goto out;
         }
         if (pos >= inode->i_size) {

Index: pvfs2-kernel.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-kernel.h,v
diff -p -u -r1.120.2.1 -r1.120.2.2
--- pvfs2-kernel.h	18 Aug 2006 05:12:14 -0000	1.120.2.1
+++ pvfs2-kernel.h	29 Aug 2006 10:41:22 -0000	1.120.2.2
@@ -284,12 +284,6 @@ extern struct xattr_handler pvfs2_xattr_
 extern struct xattr_handler pvfs2_xattr_trusted_handler;
 extern struct xattr_handler pvfs2_xattr_default_handler;
 
-typedef struct {
-    int32_t p_tag;
-    uint32_t p_perm;
-    uint32_t p_id;
-} pvfs2_acl_entry;
-
 #endif
 
 static inline int convert_to_internal_xattr_flags(int setxattr_flags)
@@ -388,10 +382,9 @@ typedef struct
 #define SetCtimeFlag(pinode)   set_bit(P_CTIME_FLAG, &(pinode)->pinode_flags)
 #define CtimeFlag(pinode)      test_bit(P_CTIME_FLAG, &(pinode)->pinode_flags)
 
-#define ClearModeFlag(pinode)  clear_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
-#define SetModeFlag(pinode)    set_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
-#define ModeFlag(pinode)       test_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
-
+#define ClearModeFlag(pinode) clear_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
+#define SetModeFlag(pinode)   set_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
+#define ModeFlag(pinode)      test_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
 
 /** mount options.  only accepted mount options are listed.
  */
@@ -648,7 +641,7 @@ ssize_t pvfs2_inode_getxattr(
 int pvfs2_inode_setxattr(struct inode *inode, const char* prefix,
         const char *name, const void *value, size_t size, int flags);
 int pvfs2_inode_removexattr(struct inode *inode, const char* prefix,
-        const char *name);
+        const char *name, int flags);
 int pvfs2_inode_listxattr(struct inode *inode, char *, size_t);
 
 int pvfs2_inode_getattr(

Index: pvfs2-utils.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-utils.c,v
diff -p -u -r1.124.2.3 -r1.124.2.4
--- pvfs2-utils.c	18 Aug 2006 05:12:15 -0000	1.124.2.3
+++ pvfs2-utils.c	29 Aug 2006 10:41:22 -0000	1.124.2.4
@@ -235,6 +235,7 @@ static inline int copy_attributes_to_ino
         {
             /* special case: mark the root inode as sticky */
             inode->i_mode |= S_ISVTX;
+            gossip_debug(GOSSIP_ACL_DEBUG, "Marking inode %ld as sticky\n", (long) inode->i_ino);
         }
 
         switch (attrs->objtype)
@@ -278,13 +279,14 @@ static inline int copy_attributes_to_ino
                     gossip_debug(GOSSIP_UTILS_DEBUG, "Copied attr link target %s\n",
                                 pvfs2_inode->link_target);
                 }
+                gossip_debug(GOSSIP_UTILS_DEBUG, "symlink mode %o\n", inode->i_mode);
                 ret = 0;
                 break;
             default:
                 gossip_err("pvfs2:copy_attributes_to_inode: got invalid "
                             "attribute type %x\n", attrs->objtype);
         }
-        gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2: copy_attributes_to_inode: setting inode->i_mode to %x from %x\n",
+        gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2: copy_attributes_to_inode: setting inode->i_mode to %o from %o\n",
                 inode->i_mode, old_mode);
     }
     return ret;
@@ -536,7 +538,7 @@ int pvfs2_inode_setattr(
             new_op, "pvfs2_inode_setattr", 
             get_interruptible_flag(inode));
 
-        gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_inode_setattr: returning %d\n", ret);
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_inode_setattr: returning %d\n", ret);
 
         /* when request is serviced properly, free req op struct */
         op_release(new_op);
@@ -582,9 +584,11 @@ int pvfs2_flush_inode(struct inode *inod
     {
         wbattr.ia_mode = inode->i_mode;
         wbattr.ia_valid |= ATTR_MODE;
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_flush_inode (%ld) writing mode %o\n",
+                (long) inode->i_ino, inode->i_mode);
     }
 
-    gossip_debug(GOSSIP_UTILS_DEBUG, "*********** pvfs2_flush_mode: %ld "
+    gossip_debug(GOSSIP_UTILS_DEBUG, "*********** pvfs2_flush_inode: %ld "
             "(ia_valid %d)\n", (long) inode->i_ino, wbattr.ia_valid);
     if (wbattr.ia_valid == 0)
     {
@@ -687,6 +691,8 @@ ssize_t pvfs2_inode_getxattr(struct inod
     }
     if (inode)
     {
+        gossip_debug(GOSSIP_XATTR_DEBUG, "getxattr on inode %ld, name %s (uid %o, gid %o)\n", 
+                (long) inode->i_ino, name, current->fsuid, current->fsgid);
         pvfs2_inode = PVFS2_I(inode);
         /* obtain the xattr semaphore */
         down_read(&pvfs2_inode->xattr_sem);
@@ -766,6 +772,8 @@ ssize_t pvfs2_inode_getxattr(struct inod
         else if (ret == -ENOENT)
         {
             ret = -ENODATA; /* if no such keys exists we set this to be errno */
+            gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_inode_getxattr: inode %ld key %s does not exist!\n",
+                    (long) inode->i_ino, (char *) new_op->upcall.req.getxattr.key);
         }
 
         /* when request is serviced properly, free req op struct */
@@ -808,14 +816,22 @@ int pvfs2_inode_setxattr(struct inode *i
     if (size == 0 && value == NULL)
     {
         gossip_debug(GOSSIP_XATTR_DEBUG, "removing xattr (%s%s)\n", prefix, name);
-        return pvfs2_inode_removexattr(inode, prefix, name);
+        return pvfs2_inode_removexattr(inode, prefix, name, flags);
     }
     if (inode)
     {
+        gossip_debug(GOSSIP_XATTR_DEBUG, "setxattr on inode %ld, name %s\n", 
+                (long) inode->i_ino, name);
         if (IS_RDONLY(inode))
+        {
+            gossip_err("pvfs2_inode_setxattr: Read-only file system\n");
             return -EROFS;
+        }
         if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+        {
+            gossip_err("pvfs2_inode_setxattr: Immutable inode or append-only inode; operation not permitted\n");
             return -EPERM;
+        }
         pvfs2_inode = PVFS2_I(inode);
 
         down_write(&pvfs2_inode->xattr_sem);
@@ -843,7 +859,7 @@ int pvfs2_inode_setxattr(struct inode *i
         new_op->upcall.req.setxattr.keyval.val_sz = size + 1;
 
         gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_inode_setxattr: key %s, key_sz %d "
-                " value size %d\n", 
+                " value size %zd\n", 
                  (char*)new_op->upcall.req.setxattr.keyval.key, 
                  (int) new_op->upcall.req.setxattr.keyval.key_sz,
                  size + 1);
@@ -862,7 +878,7 @@ int pvfs2_inode_setxattr(struct inode *i
 }
 
 int pvfs2_inode_removexattr(struct inode *inode, const char* prefix, 
-    const char *name)
+    const char *name, int flags)
 {
     int ret = -ENOMEM;
     pvfs2_kernel_op_t *new_op = NULL;
@@ -906,9 +922,15 @@ int pvfs2_inode_removexattr(struct inode
 
         if (ret == -ENOENT)
         {
-            ret = -ENODATA;
+            /* Request to replace a non-existent attribute is an error */
+            if (flags & XATTR_REPLACE)
+                ret = -ENODATA;
+            else
+                ret = 0;
         }
-        gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_inode_removexattr: returning %d\n", ret);
+
+        gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_inode_removexattr: returning %d\n",
+                ret);
 
         /* when request is serviced properly, free req op struct */
         op_release(new_op);
@@ -1080,7 +1102,7 @@ static inline struct inode *pvfs2_create
         new_op, "pvfs2_create_file", 
         get_interruptible_flag(dir));
 
-    gossip_debug(GOSSIP_UTILS_DEBUG, "Create Got PVFS2 handle %llu on fsid %d (ret=%d)\n",
+    gossip_debug(GOSSIP_ACL_DEBUG, "Create Got PVFS2 handle %llu on fsid %d (ret=%d)\n",
                 llu(new_op->downcall.resp.create.refn.handle),
                 new_op->downcall.resp.create.refn.fs_id, ret);
 
@@ -1110,12 +1132,14 @@ static inline struct inode *pvfs2_create
 
         dentry->d_op = &pvfs2_dentry_operations;
         d_instantiate(dentry, inode);
+        gossip_debug(GOSSIP_ACL_DEBUG, "Inode (Regular File) %ld -> %s\n",
+                (long) inode->i_ino, dentry->d_name.name);
     }
     else
     {
         *error_code = ret;
 
-        gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_create_file: failed with error code %d\n",
+        gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_create_file: failed with error code %d\n",
                     *error_code);
     }
 
@@ -1195,6 +1219,8 @@ static inline struct inode *pvfs2_create
 
         dentry->d_op = &pvfs2_dentry_operations;
         d_instantiate(dentry, inode);
+        gossip_debug(GOSSIP_ACL_DEBUG, "Inode (Directory) %ld -> %s\n",
+                (long) inode->i_ino, dentry->d_name.name);
     }
     else
     {
@@ -1282,6 +1308,8 @@ static inline struct inode *pvfs2_create
 
         dentry->d_op = &pvfs2_dentry_operations;
         d_instantiate(dentry, inode);
+        gossip_debug(GOSSIP_ACL_DEBUG, "Inode (Symlink) %ld -> %s\n",
+                (long) inode->i_ino, dentry->d_name.name);
     }
     else
     {
@@ -1440,7 +1468,7 @@ int pvfs2_flush_mmap_racache(struct inod
     }
     new_op->upcall.req.ra_cache_flush.refn = pvfs2_inode->refn;
 
-    ret = service_operation(new_op, "pvfs2_flush_mmap_racache", 0,
+    ret = service_operation(new_op, "pvfs2_flush_mmap_racache",
                       get_interruptible_flag(inode));
 
     gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_flush_mmap_racache got return "

Index: super.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/super.c,v
diff -p -u -r1.74.2.3 -r1.74.2.4
--- super.c	18 Aug 2006 05:12:15 -0000	1.74.2.3
+++ super.c	29 Aug 2006 10:41:22 -0000	1.74.2.4
@@ -218,7 +218,7 @@ static void pvfs2_read_inode(
 
     if (inode->u.generic_ip)
     {
-        pvfs2_panic("Found an initialized inode in pvfs2_read_inode! "
+        gossip_err("ERROR! Found an initialized inode in pvfs2_read_inode! "
                     "Should not have been initialized?\n");
         return;
     }
@@ -767,7 +767,7 @@ struct super_block *pvfs2_get_sb(
 {
     int ret = -EINVAL;
     struct super_block *sb = ERR_PTR(-EINVAL);
-    pvfs2_kernel_op_t *new_op = NULL;
+    pvfs2_kernel_op_t *new_op;
     pvfs2_mount_sb_info_t mount_sb_info;
 
     gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_get_sb: called with devname %s\n", devname);
@@ -852,13 +852,13 @@ struct super_block *pvfs2_get_sb(
             ret = -EINVAL;
             gossip_err("Invalid superblock obtained from get_sb_nodev (%p)\n", sb);
         }
+        op_release(new_op);
     }
     else
     {
         gossip_err("ERROR: device name not specified.\n");
     }
 
-    op_release(new_op);
 #ifdef HAVE_VFSMOUNT_GETSB
     return ret;
 #else

Index: waitqueue.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/waitqueue.c,v
diff -p -u -r1.23.2.5 -r1.23.2.6
--- waitqueue.c	22 Aug 2006 10:54:19 -0000	1.23.2.5
+++ waitqueue.c	29 Aug 2006 10:41:22 -0000	1.23.2.6
@@ -131,8 +131,8 @@ retry_servicing:
         /* failed to get matching downcall */
         if(ret == -ETIMEDOUT)
         { 
-            gossip_err("pvfs2: %s -- wait timed out;. "
-                        "aborting attempt.\n", op_name);
+            gossip_err("pvfs2: %s -- wait timed out; aborting attempt.\n",
+                       op_name);
         }
         op->downcall.status = ret;
     }

Index: xattr-default.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/xattr-default.c,v
diff -p -u -r1.1.18.2 -r1.1.18.3
--- xattr-default.c	24 Jul 2006 17:20:53 -0000	1.1.18.2
+++ xattr-default.c	29 Aug 2006 10:41:22 -0000	1.1.18.3
@@ -26,6 +26,7 @@ int pvfs2_xattr_set_default(struct inode
 
     if (strcmp(name, "") == 0)
         return -EINVAL;
+    gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_setxattr_default %s\n", name);
     internal_flag = convert_to_internal_xattr_flags(flags);
     return pvfs2_inode_setxattr(inode, PVFS2_XATTR_NAME_DEFAULT_PREFIX,
         name, buffer, size, internal_flag);
@@ -36,6 +37,7 @@ int pvfs2_xattr_get_default(struct inode
 {
     if (strcmp(name, "") == 0)
         return -EINVAL;
+    gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_getxattr_default %s\n", name);
     return pvfs2_inode_getxattr(inode, PVFS2_XATTR_NAME_DEFAULT_PREFIX,
         name, buffer, size);
 }

Index: xattr-trusted.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/xattr-trusted.c,v
diff -p -u -r1.1.18.2 -r1.1.18.3
--- xattr-trusted.c	24 Jul 2006 17:20:53 -0000	1.1.18.2
+++ xattr-trusted.c	29 Aug 2006 10:41:22 -0000	1.1.18.3
@@ -22,10 +22,15 @@ int pvfs2_xattr_set_trusted(struct inode
 {
     int internal_flag = 0;
 
+    gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_xattr_set_trusted: name %s, buffer_size %zd\n",
+            name, size);
     if (strcmp(name, "") == 0)
         return -EINVAL;
     if(!capable(CAP_SYS_ADMIN))
+    {
+        gossip_err("pvfs2_xattr_set_trusted: operation not permitted\n");
         return -EPERM;
+    }
     internal_flag = convert_to_internal_xattr_flags(flags);
     return pvfs2_inode_setxattr(inode, PVFS2_XATTR_NAME_TRUSTED_PREFIX,
         name, buffer, size, internal_flag);
@@ -34,10 +39,15 @@ int pvfs2_xattr_set_trusted(struct inode
 int pvfs2_xattr_get_trusted(struct inode *inode,
     const char *name, void *buffer, size_t size)
 {
+    gossip_debug(GOSSIP_XATTR_DEBUG, "pvfs2_xattr_get_trusted: name %s, buffer_size %zd\n",
+            name, size);
     if (strcmp(name, "") == 0)
         return -EINVAL;
     if(!capable(CAP_SYS_ADMIN))
+    {
+        gossip_err("pvfs2_xattr_get_trusted: operation not permitted\n");
         return -EPERM;
+    }
     return pvfs2_inode_getxattr(inode, PVFS2_XATTR_NAME_TRUSTED_PREFIX,
         name, buffer, size);
 }

Index: xattr.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/xattr.c,v
diff -p -u -r1.10.12.2 -r1.10.12.3
--- xattr.c	24 Jul 2006 17:20:53 -0000	1.10.12.2
+++ xattr.c	29 Aug 2006 10:41:22 -0000	1.10.12.3
@@ -129,7 +129,7 @@ ssize_t pvfs2_listxattr(struct dentry *d
 int pvfs2_removexattr(struct dentry *dentry, const char *name)
 {
     struct inode *inode = dentry->d_inode;
-    return pvfs2_inode_removexattr(inode, NULL, name);
+    return pvfs2_inode_removexattr(inode, NULL, name, XATTR_REPLACE);
 }
 
 #endif



More information about the Pvfs2-cvs mailing list