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

lfs getstripe should avoid opening regular files

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.14.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      lfs getstripe uses an ioctl on the parent directory to get the file striping but still opens the file to call the OBD_IOC_GETNAME ioctl in get_mds_md_size(). Rather than doing this we should just use a large enough size for the lum buffer. This avoids interfering with existing file locks and leases on the file.

      Attachments

        Issue Links

          Activity

            [LU-13693] lfs getstripe should avoid opening regular files

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39159/
            Subject: LU-13693 lfs: check early for MDS_OPEN_DIRECTORY
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 3ea729fe822d3c39df6d8a5fb530dd8a6901c91c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39159/ Subject: LU-13693 lfs: check early for MDS_OPEN_DIRECTORY Project: fs/lustre-release Branch: master Current Patch Set: Commit: 3ea729fe822d3c39df6d8a5fb530dd8a6901c91c

            John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39159
            Subject: LU-13693 lfs: check early for MDS_OPEN_DIRECTORY
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 9f9de2072416a3f66583c4cbfb3d405abe2f3f13

            gerrit Gerrit Updater added a comment - John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39159 Subject: LU-13693 lfs: check early for MDS_OPEN_DIRECTORY Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 9f9de2072416a3f66583c4cbfb3d405abe2f3f13
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38979/
            Subject: LU-13693 lfs: avoid opening regular files for getstripe
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 3eff6bada2bc789fe6089e792e4043ef7ec8396f

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38979/ Subject: LU-13693 lfs: avoid opening regular files for getstripe Project: fs/lustre-release Branch: master Current Patch Set: Commit: 3eff6bada2bc789fe6089e792e4043ef7ec8396f

            Does it make sense to check in ll_lov_getstripe_ea_info() if the filename is already in the client dcache and get the xattr directly from the client cache, something like:

                    qstr = QSTR_INIT(filename, strlen(filename));
                    dchild = d_lookup(dparent, &qstr);
            

            (dparent can be passed from the caller). The benefit of this would depend on whether the file is typically already present on the client when "lfs getstripe" is called or not, but the dcache lookup would be much lower overhead than an RPC (an O(1) lockless hash table lookup for the dcache these days).

            adilger Andreas Dilger added a comment - Does it make sense to check in ll_lov_getstripe_ea_info() if the filename is already in the client dcache and get the xattr directly from the client cache, something like: qstr = QSTR_INIT(filename, strlen(filename)); dchild = d_lookup(dparent, &qstr); ( dparent can be passed from the caller). The benefit of this would depend on whether the file is typically already present on the client when " lfs getstripe " is called or not, but the dcache lookup would be much lower overhead than an RPC (an O(1) lockless hash table lookup for the dcache these days).

            John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38979
            Subject: LU-13693 lfs: avoid opening regular files for getstripe
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 9f8dce9f48ec3078fc798393e75ccd276bc30948

            gerrit Gerrit Updater added a comment - John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38979 Subject: LU-13693 lfs: avoid opening regular files for getstripe Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 9f8dce9f48ec3078fc798393e75ccd276bc30948

            People

              jhammond John Hammond
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: