Whamcloud - gitweb
LU-17848 osd: remove osd_check_stale() for ldiskfs/ZFS 06/55606/3
authorTimothy Day <timday@amazon.com>
Tue, 2 Jul 2024 22:54:20 +0000 (22:54 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Jul 2024 20:55:20 +0000 (20:55 +0000)
This is implemented as a stub function that returns false.
Remove the implementations from the OSD and add a check into
dt_check_stale().

Test-Parameters: trivial
Test-Parameters: trivial fstype=zfs
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id7fb2c1d1600a3dcc5d278cb2dab5d65a10bdefd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55606
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/dt_object.h
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_object.c

index 1c0238b..b969bbb 100644 (file)
@@ -2375,7 +2375,9 @@ static inline bool dt_object_stale(struct dt_object *dt)
 {
        LASSERT(dt);
        LASSERT(dt->do_ops);
-       LASSERT(dt->do_ops->do_check_stale);
+
+       if (!dt->do_ops->do_check_stale)
+               return false;
 
        return dt->do_ops->do_check_stale(dt);
 }
index d252df3..3812399 100644 (file)
@@ -5306,10 +5306,6 @@ static int osd_invalidate(const struct lu_env *env, struct dt_object *dt)
        return 0;
 }
 
-static bool osd_check_stale(struct dt_object *dt)
-{
-       return false;
-}
 /*
  * Index operations.
  */
@@ -5498,7 +5494,6 @@ static const struct dt_object_operations osd_obj_ops = {
        .do_xattr_list          = osd_xattr_list,
        .do_object_sync         = osd_object_sync,
        .do_invalidate          = osd_invalidate,
-       .do_check_stale         = osd_check_stale,
 };
 
 static const struct dt_object_operations osd_obj_otable_it_ops = {
index 57260ee..8491981 100644 (file)
@@ -2183,11 +2183,6 @@ static int osd_invalidate(const struct lu_env *env, struct dt_object *dt)
        return 0;
 }
 
-static bool osd_check_stale(struct dt_object *dt)
-{
-       return false;
-}
-
 static const struct dt_object_operations osd_obj_ops = {
        .do_read_lock           = osd_read_lock,
        .do_write_lock          = osd_write_lock,
@@ -2215,7 +2210,6 @@ static const struct dt_object_operations osd_obj_ops = {
        .do_xattr_list          = osd_xattr_list,
        .do_object_sync         = osd_object_sync,
        .do_invalidate          = osd_invalidate,
-       .do_check_stale         = osd_check_stale,
 };
 
 static const struct lu_object_operations osd_lu_obj_ops = {