Whamcloud - gitweb
LU-16518 osc: remove osc_lock_at(), osc_is_object(), and more 13/58413/2
authorTimothy Day <timday@amazon.com>
Sat, 15 Mar 2025 05:14:44 +0000 (01:14 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:04:27 +0000 (04:04 +0000)
These functions no longer have any callers.

Fixes: 036d987c6d71 ("LU-3285 osc: prepare OSC code to be used from MDC")
Fixes: 5ad00e36eca1 ("LU-14838 osc: Remove client contention support")
Fixes: 9fe4b52ad2ff ("LU-1030 osc: new IO engine implementation")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I3273031227b894f751584241a6fc6f04dcd915af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58413
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_osc.h
lustre/osc/osc_internal.h

index 1e32634..fd4aaa2 100644 (file)
@@ -235,11 +235,7 @@ struct osc_object_operations {
 struct osc_object {
        struct cl_object        oo_cl;
        struct lov_oinfo        *oo_oinfo;
-       /**
-        * True if locking against this stripe got -EUSERS.
-        */
-       int                     oo_contended;
-       ktime_t                 oo_contention_time;
+
 #ifdef CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK
        /**
         * IO context used for invariant checks in osc_lock_has_pages().
@@ -316,11 +312,6 @@ static inline void osc_object_lock(struct osc_object *obj)
        spin_lock(&obj->oo_lock);
 }
 
-static inline int osc_object_trylock(struct osc_object *obj)
-{
-       return spin_trylock(&obj->oo_lock);
-}
-
 static inline void osc_object_unlock(struct osc_object *obj)
 {
        spin_unlock(&obj->oo_lock);
@@ -329,18 +320,6 @@ static inline void osc_object_unlock(struct osc_object *obj)
 #define assert_osc_object_is_locked(obj)       \
        assert_spin_locked(&obj->oo_lock)
 
-static inline void osc_object_set_contended(struct osc_object *obj)
-{
-       obj->oo_contention_time = ktime_get();
-       /* mb(); */
-       obj->oo_contended = 1;
-}
-
-static inline void osc_object_clear_contended(struct osc_object *obj)
-{
-       obj->oo_contended = 0;
-}
-
 /*
  * Lock "micro-states" for osc layer.
  */
index 30c60c9..0380c43 100644 (file)
@@ -91,16 +91,6 @@ static inline struct cl_io *osc_env_new_io(const struct lu_env *env)
        return io;
 }
 
-static inline int osc_is_object(const struct lu_object *obj)
-{
-       return obj->lo_dev->ld_type == &osc_device_type;
-}
-
-static inline struct osc_lock *osc_lock_at(const struct cl_lock *lock)
-{
-       return cl2osc_lock(cl_lock_at(lock, &osc_device_type));
-}
-
 int osc_lock_init(const struct lu_env *env, struct cl_object *obj,
                  struct cl_lock *lock, const struct cl_io *io);
 int osc_io_init(const struct lu_env *env, struct cl_object *obj,