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

Add fid_to_string and string_to_fid functions

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      Add fid_to_string and string_to_fid functions for more readable print/scan statements. Allow for error checking, defaults, etc.

      Example print statement:

      Original: C_DEBUG(D_PAGE, "%lu@"DFID" %p %lx %d\n",
      idx, PFID(&hdr->coh_lu.loh_fid), vmpage, vmpage->private, type);

      New: C_DEBUG(D_PAGE, "%lu@%s %p %lx %d\n",
      idx, fid_to_string(hdr->coh_lu.loh_fid), vmpage, vmpage->private, type);

      Example scan:

      Original: if (sscanf(opt.o_src, SFID, RFID(&old_fid)) != 3 || ...

      New:
      old_fid = string_to_fid(opt.o_src);
      if ( ...

      Attachments

        Activity

          People

            bevans Ben Evans (Inactive)
            bevans Ben Evans (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: