Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / llite / xattr.c
index e2835d9..b8bb7f1 100644 (file)
 
 #include "llite_internal.h"
 
-#define XATTR_USER_PREFIX       "user."
-#define XATTR_TRUSTED_PREFIX    "trusted."
-#define XATTR_SECURITY_PREFIX   "security."
-#define XATTR_LUSTRE_PREFIX     "lustre."
-
 #define XATTR_USER_T            (1)
 #define XATTR_TRUSTED_T         (2)
 #define XATTR_SECURITY_T        (3)
@@ -224,6 +219,12 @@ int ll_setxattr(struct dentry *dentry, const char *name,
                 struct lov_user_md *lump = (struct lov_user_md *)value;
                 int rc = 0;
 
+                /* Attributes that are saved via getxattr will always have
+                 * the stripe_offset as 0.  Instead, the MDS should be
+                 * allowed to pick the starting OST index.   b=17846 */
+                if (lump->lmm_stripe_offset == 0)
+                        lump->lmm_stripe_offset = -1;
+
                 if (S_ISREG(inode->i_mode)) {
                         struct file f;
                         int flags = FMODE_WRITE;
@@ -238,7 +239,10 @@ int ll_setxattr(struct dentry *dentry, const char *name,
                 }
 
                 return rc;
-        }
+
+        } else if (strcmp(name, XATTR_NAME_LMA) == 0 ||
+                   strcmp(name, XATTR_NAME_LINK) == 0)
+                return 0;
 
         return ll_setxattr_common(inode, name, value, size, flags,
                                   OBD_MD_FLXATTR);