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

convert scrub irreparable list to rhashtable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      As Andreas mentioned about the following code in osd_handler.c of https://review.whamcloud.com/46852:
      Does it make sense to add a counter here and print a warning if the list is too long (eg. over 5000 items?) so that we know if this needs to be converted to a hash instead of a list?

      /**
       * Is object in scrub inconsistent/stale list.
       *
       * \a scrub has two lists, os_inconsistent_items contains mappings to fix, while
       * os_stale_items contains mappings failed to fix.
       */
      static bool fid_in_scrub_list(struct lustre_scrub *scrub,
      			      const struct list_head *list,
      			      const struct lu_fid *fid)
      {
      	struct osd_inconsistent_item *oii;
      
      	if (list_empty(list))
      		return false;
      
      	spin_lock(&scrub->os_lock);
      	list_for_each_entry(oii, list, oii_list) {
      		if (lu_fid_eq(fid, &oii->oii_cache.oic_fid)) {
      			spin_unlock(&scrub->os_lock);
      			return true;
      		}
      	}
      	spin_unlock(&scrub->os_lock);
      
      	return false;
      }
      

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              hxing Xing Huang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: