Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14188

rw_semaphore in the iam_container structure that never been used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.15.0
    • None
    • 3
    • 9223372036854775807

      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.

            artem_blagodarenko Artem Blagodarenko (Inactive)
            artem_blagodarenko Artem Blagodarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: