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

Change DLM lock encoding to put FID version into lock res[1]

    XMLWordPrintable

Details

    • 1
    • 4693

    Description

      The FID version is currently being stored in LDLM res[2]:

      struct ldlm_res_id *fid_build_reg_res_name(const struct lu_fid *f,
                                                 struct ldlm_res_id *name)
      {
              memset(name, 0, sizeof *name);
              name->name[LUSTRE_RES_ID_SEQ_OFF] = fid_seq(f);
              name->name[LUSTRE_RES_ID_OID_OFF] = fid_oid(f);
              name->name[LUSTRE_RES_ID_VER_OFF] = fid_ver(f);
              return name;
      }
      

      However, both the OID and VER are 32-bit values, and there is a need for quota to have 2x64 bit DLM fields for addressing per-directory quota. It is possible to move the FID VER field into the high bits of res[1] without any conflict, because the FID VER is always zero today, and there are no plans to use it in the near future. Any changes that utilize the FID VER would need client-side changes, so there is no danger that clients using the old encoding will be able to interoperate with servers using the new encoding.

      Attachments

        Issue Links

          Activity

            People

              adilger Andreas Dilger
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: