Whamcloud - gitweb
LU-10405 lov: fill no-extent fiemap on object with no stripe.
[fs/lustre-release.git] / lustre / lov / lov_object.c
index 9b56d84..3628b7a 100644 (file)
@@ -1805,8 +1805,11 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
        ENTRY;
 
        lsm = lov_lsm_addref(cl2lov(obj));
-       if (lsm == NULL)
-               RETURN(-ENODATA);
+       if (lsm == NULL) {
+               /* no extent: there is no object for mapping */
+               fiemap->fm_mapped_extents = 0;
+               return 0;
+       }
 
        if (!(fiemap->fm_flags & FIEMAP_FLAG_DEVICE_ORDER)) {
                /**