Whamcloud - gitweb
LU-1303 fld: verify support for range lookups
[fs/lustre-release.git] / lustre / osd-zfs / osd_index.c
index 0cb3bca..d9195a5 100644 (file)
@@ -536,7 +536,7 @@ static int osd_dir_insert(const struct lu_env *env, struct dt_object *dt,
         * zfs_readdir() generates ./.. on fly, but
         * we want own entries (.. at least) with a fid
         */
-#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 3, 53, 0)
+#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 3, 55, 0)
 #warning "fix '.' and '..' handling"
 #endif
 
@@ -902,7 +902,7 @@ int osd_index_try(const struct lu_env *env, struct dt_object *dt,
        struct osd_object *obj = osd_dt_obj(dt);
        ENTRY;
 
-       LASSERT(obj->oo_db != NULL);
+       LASSERT(dt_object_exists(dt));
 
        /*
         * XXX: implement support for fixed-size keys sorted with natural
@@ -911,6 +911,11 @@ int osd_index_try(const struct lu_env *env, struct dt_object *dt,
        if (feat->dif_flags & DT_IND_RANGE)
                RETURN(-ERANGE);
 
+       if (unlikely(feat == &dt_otable_features))
+               /* do not support oi scrub yet. */
+               RETURN(-ENOTSUPP);
+
+       LASSERT(obj->oo_db != NULL);
        if (likely(feat == &dt_directory_features)) {
                if (udmu_object_is_zap(obj->oo_db))
                        dt->do_index_ops = &osd_dir_ops;