[LU-14188] rw_semaphore in the iam_container structure that never been used Created: 07/Dec/20  Updated: 30/Nov/21  Resolved: 30/Nov/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.15.0

Type: Bug Priority: Minor
Reporter: Artem Blagodarenko (Inactive) Assignee: Artem Blagodarenko (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-12265 LustreError: 141027:0:(osd_iam_lfix.c... Reopened
is related to LU-12265 LustreError: 141027:0:(osd_iam_lfix.c... Reopened
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

There is an rw_semaphore

struct iam_container {
    ...
        /*
         * read-write lock protecting index consistency.
         */
        struct rw_semaphore     ic_sem;   <<<<<<
        struct dynlock       ic_tree_lock;
        /* Protect ic_idle_bh */
        struct mutex         ic_idle_mutex;
     ...
};

There is initialization

 2    234  lustre/osd-ldiskfs/osd_iam.c <<iam_container_init>>
             init_rwsem(&c->ic_sem);

There are wrappers

 3    622  lustre/osd-ldiskfs/osd_iam.c <<iam_container_write_lock>>
             down_write(&ic->ic_sem);
   4    627  lustre/osd-ldiskfs/osd_iam.c <<iam_container_write_unlock>>
             up_write(&ic->ic_sem);
   5    632  lustre/osd-ldiskfs/osd_iam.c <<iam_container_read_lock>>
             down_read(&ic->ic_sem);
   6    637  lustre/osd-ldiskfs/osd_iam.c <<iam_container_read_unlock>>
             up_read(&ic->ic_sem);

But this wrappers are not used. And, based on the git history, never been used.

Let's delete them.



 Comments   
Comment by Gerrit Updater [ 07/Dec/20 ]

Artem Blagodarenko (artem.blagodarenko@hpe.com) uploaded a new patch: https://review.whamcloud.com/40890
Subject: LU-14188 osd: remove not used iam_container lock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b47f3b8dd761d9c7cf20ee004d401540ebb218ba

Comment by Gerrit Updater [ 30/Nov/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/40890/
Subject: LU-14188 osd: remove not used iam_container lock
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4afdbf9dfd3b33510bf9f1d8a74c8655de5b086e

Comment by Peter Jones [ 30/Nov/21 ]

Landed for 2.15

Generated at Sat Feb 10 03:07:36 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.