提交 e7291a6d 编写于 作者: L Lai Siyao 提交者: Greg Kroah-Hartman

staging: lustre: dne: setdirstripe should fail if not supported

If MDS doesn't support striped directory, creating striped directory
from a userland utility such as 'lfs setdirstripe' should fail.
Signed-off-by: NLai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6661
Reviewed-on: http://review.whamcloud.com/15123Reviewed-by: NJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: NOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: NJames Simmons <jsimmons@infradead.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 84078adb
...@@ -419,6 +419,10 @@ static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump, ...@@ -419,6 +419,10 @@ static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump,
PFID(ll_inode2fid(parent)), parent, dirname, PFID(ll_inode2fid(parent)), parent, dirname,
(int)lump->lum_stripe_offset, lump->lum_stripe_count); (int)lump->lum_stripe_offset, lump->lum_stripe_count);
if (lump->lum_stripe_count > 1 &&
!(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_DIR_STRIPE))
return -EINVAL;
if (lump->lum_magic != cpu_to_le32(LMV_USER_MAGIC)) if (lump->lum_magic != cpu_to_le32(LMV_USER_MAGIC))
lustre_swab_lmv_user_md(lump); lustre_swab_lmv_user_md(lump);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册