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

Test-Parameters: trivial
Test-Parameters: trivial fstype=zfs
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ieee086218dc83c3129bc572689a14c79c981bcb7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55607
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 b969bbb..33891e1 100644 (file)
@@ -2845,7 +2845,9 @@ static inline int dt_invalidate(const struct lu_env *env, struct dt_object *dt)
 {
        LASSERT(dt);
        LASSERT(dt->do_ops);
-       LASSERT(dt->do_ops->do_invalidate);
+
+       if (!dt->do_ops->do_invalidate)
+               return 0;
 
        return dt->do_ops->do_invalidate(env, dt);
 }
index 3812399..c2f9a7d 100644 (file)
@@ -5301,11 +5301,6 @@ static int osd_object_sync(const struct lu_env *env, struct dt_object *dt,
        RETURN(rc);
 }
 
-static int osd_invalidate(const struct lu_env *env, struct dt_object *dt)
-{
-       return 0;
-}
-
 /*
  * Index operations.
  */
@@ -5493,7 +5488,6 @@ static const struct dt_object_operations osd_obj_ops = {
        .do_xattr_del           = osd_xattr_del,
        .do_xattr_list          = osd_xattr_list,
        .do_object_sync         = osd_object_sync,
-       .do_invalidate          = osd_invalidate,
 };
 
 static const struct dt_object_operations osd_obj_otable_it_ops = {
index 8491981..a09e785 100644 (file)
@@ -2178,11 +2178,6 @@ static int osd_object_sync(const struct lu_env *env, struct dt_object *dt,
        RETURN(0);
 }
 
-static int osd_invalidate(const struct lu_env *env, struct dt_object *dt)
-{
-       return 0;
-}
-
 static const struct dt_object_operations osd_obj_ops = {
        .do_read_lock           = osd_read_lock,
        .do_write_lock          = osd_write_lock,
@@ -2209,7 +2204,6 @@ static const struct dt_object_operations osd_obj_ops = {
        .do_xattr_del           = osd_xattr_del,
        .do_xattr_list          = osd_xattr_list,
        .do_object_sync         = osd_object_sync,
-       .do_invalidate          = osd_invalidate,
 };
 
 static const struct lu_object_operations osd_lu_obj_ops = {