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

Add fid_to_string and string_to_fid functions

XMLWordPrintable

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

      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 ( ...

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

              Created:
              Updated: