提交 50ccd16e 编写于 作者: H Hongchao Zhang 提交者: Greg Kroah-Hartman

staging: lustre: llite: set dir LOV xattr length variable

the LOV xattr of directory could be either lov_user_md_v1
(size is 32) or lov_user_md_v3 (size is 48), then the actual
size of the LOV xattr should be return.
Signed-off-by: NHongchao Zhang <hongchao.zhang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5100
Reviewed-on: http://review.whamcloud.com/10453Reviewed-by: NJames Simmons <uja.ornl@gmail.com>
Reviewed-by: NAlex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Njacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
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>
上级 f7aafa7c
...@@ -379,14 +379,6 @@ static int ll_xattr_get(const struct xattr_handler *handler, ...@@ -379,14 +379,6 @@ static int ll_xattr_get(const struct xattr_handler *handler,
if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
return -ENODATA; return -ENODATA;
if (size == 0 && S_ISDIR(inode->i_mode)) {
/* XXX directory EA is fix for now, optimize to save
* RPC transfer
*/
rc = sizeof(struct lov_user_md);
goto out;
}
lsm = ccc_inode_lsm_get(inode); lsm = ccc_inode_lsm_get(inode);
if (!lsm) { if (!lsm) {
if (S_ISDIR(inode->i_mode)) { if (S_ISDIR(inode->i_mode)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册