Whamcloud - gitweb
LU-1812 ext4: ec_type has been dropped from ext4_ext_cache
[fs/lustre-release.git] / lustre / osd-zfs / osd_object.c
index 96eca39..ac6b52d 100644 (file)
@@ -364,6 +364,12 @@ static int osd_object_init(const struct lu_env *env, struct lu_object *l,
 
        LASSERT(osd_invariant(obj));
 
+       if (fid_is_otable_it(&l->lo_header->loh_fid)) {
+               obj->oo_dt.do_ops = &osd_obj_otable_it_ops;
+               l->lo_header->loh_attr |= LOHA_EXISTS;
+               RETURN(0);
+       }
+
        rc = osd_fid_lookup(env, osd, lu_object_fid(l), &oid);
        if (rc == 0) {
                LASSERT(obj->oo_db == NULL);
@@ -377,11 +383,6 @@ static int osd_object_init(const struct lu_env *env, struct lu_object *l,
                               osd->od_svname, PFID(lu_object_fid(l)), oid, rc);
                }
        } else if (rc == -ENOENT) {
-               if (fid_is_otable_it(&l->lo_header->loh_fid)) {
-                       obj->oo_dt.do_ops = &osd_obj_otable_it_ops;
-                       /* LFSCK iterator object is special without inode */
-                       l->lo_header->loh_attr |= LOHA_EXISTS;
-                }
                rc = 0;
        }
        LASSERT(osd_invariant(obj));