Commit 7fb17eb7 authored by Andreas Dilger's avatar Andreas Dilger Committed by Oleg Drokin
Browse files

LU-13687 llite: return -ENODATA if no default layout

Don't return -ENOENT if fetching the default layout from the root
directory fails.  Otherwise, "lfs find" will print an error message
for every directory scanned in the filesystem:

     lfs find: /myth/tmp does not exist: No such file or directory

Fixes: 3e8fa8a7

 ("LU-11656 llite: fetch default layout for a directory")
Signed-off-by: default avatarAndreas Dilger <>
Change-Id: I5e082c5d425c44ca7770d3b24cbb13bb7d2540e5

Tested-by: default avatarjenkins <>
Tested-by: default avatarMaloo <>
Reviewed-by: default avatarJian Yu <>
Reviewed-by: default avatarLai Siyao <>
Reviewed-by: default avatarJames Simmons <>
Reviewed-by: default avatarOleg Drokin <>
parent 6900a9c6
......@@ -750,10 +750,13 @@ int ll_dir_getstripe_default(struct inode *inode, void **plmm, int *plmm_size,
rc = ll_dir_get_default_layout(inode, (void **)&lmm, &lmm_size,
&req, valid, 0);
if (rc == -ENODATA && !fid_is_root(ll_inode2fid(inode)) &&
!(valid & (OBD_MD_MEA|OBD_MD_DEFAULT_MEA)) && root_request != NULL)
rc = ll_dir_get_default_layout(inode, (void **)&lmm, &lmm_size,
&root_req, valid,
!(valid & (OBD_MD_MEA|OBD_MD_DEFAULT_MEA)) && root_request != NULL){
int rc2 = ll_dir_get_default_layout(inode, (void **)&lmm,
&lmm_size, &root_req, valid,
if (rc2 == 0)
rc = 0;
*plmm = lmm;
*plmm_size = lmm_size;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment