Whamcloud - gitweb
LU-17848 osd: purge key_rec() from dt API 99/55099/2
authorTimothy Day <timday@amazon.com>
Tue, 14 May 2024 02:19:28 +0000 (02:19 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 04:52:05 +0000 (04:52 +0000)
This is a pointless function pointer field that has
spawned a number of pointless function implementations.
Even the documentation has no idea why this exists.

Remove everything to do with key_rec().

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I7f84853a3fa285bf2ac53661b30384d099be1b91
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55099
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Documentation/osd-api.txt
lustre/include/dt_object.h
lustre/lfsck/lfsck_layout.c
lustre/lod/lod_object.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-zfs/osd_scrub.c
lustre/osp/osp_internal.h
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c

index 59eea26..2c004d4 100644 (file)
@@ -929,7 +929,6 @@ int   (*rec)(const struct lu_env *, const struct dt_it *, struct dt_rec *,
             __u32);
 __u64 (*store)(const struct lu_env *, const struct dt_it *);
 int   (*load)(const struct lu_env *, const struct dt_it *, __u64);
-int   (*key_rec)(const struct lu_env *, const struct dt_it *, void *);
 
 init
        is called to allocate and initialize an instance of "iterator" which
@@ -970,8 +969,6 @@ load
        cookie ->store() method returns. these two methods allow to implement
        functionality like POSIX readdir where current position is stored as an
        integer.
-key_rec
-       is not used currently
 
 3. Transactions
 ===============
index 20f61ca..3b15bf3 100644 (file)
@@ -1842,13 +1842,6 @@ struct dt_index_operations {
                int           (*load)(const struct lu_env *env,
                                      const struct dt_it *di,
                                      __u64 hash);
-
-               /**
-                * Not used
-                */
-               int        (*key_rec)(const struct lu_env *env,
-                                     const struct dt_it *di,
-                                     void *key_rec);
        } dio_it;
 };
 
index 29ca64f..af7409f 100644 (file)
@@ -7770,13 +7770,6 @@ static int lfsck_orphan_it_load(const struct lu_env *env,
        return rc;
 }
 
-static int lfsck_orphan_it_key_rec(const struct lu_env *env,
-                                  const struct dt_it *di,
-                                  void *key_rec)
-{
-       return 0;
-}
-
 static const struct dt_index_operations lfsck_orphan_index_ops = {
        .dio_lookup             = lfsck_orphan_index_lookup,
        .dio_declare_insert     = lfsck_orphan_index_declare_insert,
@@ -7794,6 +7787,5 @@ static const struct dt_index_operations lfsck_orphan_index_ops = {
                .rec            = lfsck_orphan_it_rec,
                .store          = lfsck_orphan_it_store,
                .load           = lfsck_orphan_it_load,
-               .key_rec        = lfsck_orphan_it_key_rec,
        }
 };
index 03e9a92..1b5c88e 100644 (file)
@@ -327,23 +327,6 @@ static int lod_it_load(const struct lu_env *env, const struct dt_it *di,
        return it->lit_obj->do_index_ops->dio_it.load(env, it->lit_it, hash);
 }
 
-/**
- * Implementation of dt_it_ops::key_rec.
- *
- * Used with regular (non-striped) objects.
- *
- * \see dt_it_ops::rec() in the API description for details.
- */
-static int lod_it_key_rec(const struct lu_env *env, const struct dt_it *di,
-                         void *key_rec)
-{
-       const struct lod_it *it = (const struct lod_it *)di;
-
-       LOD_CHECK_IT(env, it);
-       return it->lit_obj->do_index_ops->dio_it.key_rec(env, it->lit_it,
-                                                        key_rec);
-}
-
 static const struct dt_index_operations lod_index_ops = {
        .dio_lookup             = lod_lookup,
        .dio_declare_insert     = lod_declare_insert,
@@ -362,7 +345,6 @@ static const struct dt_index_operations lod_index_ops = {
                .rec_size       = lod_it_rec_size,
                .store          = lod_it_store,
                .load           = lod_it_load,
-               .key_rec        = lod_it_key_rec,
        }
 };
 
index e68c738..47164f8 100644 (file)
@@ -2962,12 +2962,6 @@ static int osd_otable_it_load(const struct lu_env *env,
        RETURN(rc);
 }
 
-static int osd_otable_it_key_rec(const struct lu_env *env,
-                                const struct dt_it *di, void *key_rec)
-{
-       return 0;
-}
-
 const struct dt_index_operations osd_otable_ops = {
        .dio_it = {
                .init     = osd_otable_it_init,
@@ -2980,7 +2974,6 @@ const struct dt_index_operations osd_otable_ops = {
                .rec      = osd_otable_it_rec,
                .store    = osd_otable_it_store,
                .load     = osd_otable_it_load,
-               .key_rec  = osd_otable_it_key_rec,
        }
 };
 
index b418397..bddf41c 100644 (file)
@@ -1754,12 +1754,6 @@ static int osd_otable_it_load(const struct lu_env *env,
        RETURN(rc);
 }
 
-static int osd_otable_it_key_rec(const struct lu_env *env,
-                                const struct dt_it *di, void *key_rec)
-{
-       return 0;
-}
-
 const struct dt_index_operations osd_otable_ops = {
        .dio_it = {
                .init     = osd_otable_it_init,
@@ -1772,7 +1766,6 @@ const struct dt_index_operations osd_otable_ops = {
                .rec      = osd_otable_it_rec,
                .store    = osd_otable_it_store,
                .load     = osd_otable_it_load,
-               .key_rec  = osd_otable_it_key_rec,
        }
 };
 
index f0eb673..cb8a143 100644 (file)
@@ -790,8 +790,6 @@ int osp_it_get(const struct lu_env *env, struct dt_it *di,
               const struct dt_key *key);
 void osp_it_put(const struct lu_env *env, struct dt_it *di);
 __u64 osp_it_store(const struct lu_env *env, const struct dt_it *di);
-int osp_it_key_rec(const struct lu_env *env, const struct dt_it *di,
-                  void *key_rec);
 int osp_it_next_page(const struct lu_env *env, struct dt_it *di);
 /* osp_md_object.c */
 int osp_md_declare_create(const struct lu_env *env, struct dt_object *dt,
index 089046e..5525b4e 100644 (file)
@@ -831,7 +831,6 @@ const struct dt_index_operations osp_md_index_ops = {
                .rec      = osp_md_index_it_rec,
                .store    = osp_it_store,
                .load     = osp_it_load,
-               .key_rec  = osp_it_key_rec,
        }
 };
 
index 0baae90..ccf5875 100644 (file)
@@ -2213,12 +2213,6 @@ static int osp_orphan_it_load(const struct lu_env *env, const struct dt_it *di,
        return rc;
 }
 
-int osp_it_key_rec(const struct lu_env *env, const struct dt_it *di,
-                  void *key_rec)
-{
-       return 0;
-}
-
 static const struct dt_index_operations osp_orphan_index_ops = {
        .dio_lookup             = osp_orphan_index_lookup,
        .dio_declare_insert     = osp_orphan_index_declare_insert,
@@ -2236,7 +2230,6 @@ static const struct dt_index_operations osp_orphan_index_ops = {
                .rec            = osp_orphan_it_rec,
                .store          = osp_it_store,
                .load           = osp_orphan_it_load,
-               .key_rec        = osp_it_key_rec,
        }
 };