From ff3faf5deca0d3c40206e712736e807b65470aeb Mon Sep 17 00:00:00 2001 From: girish Date: Thu, 26 Feb 2009 06:19:42 +0000 Subject: [PATCH] b=17846 i=girish i=h.huang o=adilger ignore stripe index 0 when setting striping via setxattr --- lustre/llite/xattr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 0957d09..b8bb7f1 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -219,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; -- 1.8.3.1