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

Allow parallel rename of regular files

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.15.0
    • None
    • None
    • 9223372036854775807

    Description

      In theory it should be possible to relax renaming rules and allow parallel renaming of regular (or non-directory) files.

      • the easiest and most common case would be rename of files within the same parent directory, like "mv foo foo.old" where we would only need to lock the DLM resources of the source and target name hashes
      • the next case would be to allow rename of files between directories

      Probably the easiest is to order such locks by DLM resource (FID+hash) to avoid deadlocks between multiple threads doing renames. For directory renames, they still need to be serialized by the BFL and also take the name hash locks in the source and target dirs to avoid conflict with regular file renames. In theory it would also be possible to allow concurrent rename of directories within the same parent, but that could be done in a separate step.

      For renames across shards within a single DNE striped directory they would be treated as renames across directories.

      Attachments

        Issue Links

          Activity

            [LU-12125] Allow parallel rename of regular files
            pjones Peter Jones added a comment -

            Looks like everything has landed for 2.15

            pjones Peter Jones added a comment - Looks like everything has landed for 2.15

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41231/
            Subject: LU-12125 tests: allow racer to specify extra tasks
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: fe2663f18e50023ad5cfe5e07b695378dd27a68e

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41231/ Subject: LU-12125 tests: allow racer to specify extra tasks Project: fs/lustre-release Branch: master Current Patch Set: Commit: fe2663f18e50023ad5cfe5e07b695378dd27a68e

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41230/
            Subject: LU-12125 mds: allow parallel directory rename
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 90979ab390a72a084f6a77cf7fdc29a4329adb41

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41230/ Subject: LU-12125 mds: allow parallel directory rename Project: fs/lustre-release Branch: master Current Patch Set: Commit: 90979ab390a72a084f6a77cf7fdc29a4329adb41

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41186/
            Subject: LU-12125 mds: allow parallel regular file rename
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d76cc65d5d68ed3e04bfbd9b7527f64ab0ee0ca7

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41186/ Subject: LU-12125 mds: allow parallel regular file rename Project: fs/lustre-release Branch: master Current Patch Set: Commit: d76cc65d5d68ed3e04bfbd9b7527f64ab0ee0ca7

            Further improvements in this area beyond the patches already pushed for same-dir rename operations:

            • instead of locking whole parent directory, just lock parent FID+source/target hash to allow parallel file (or directory) rename within a single directory
            • allow rename between shards of a striped directory, given that we know source and target shards are not child/ancestor of each other (though there would still need to ordering for locking of individual shards)
            • allow regular file rename between different source/target directories, which will need to get a fixed locking order to avoid deadlocks. That code already exists, so may be "only" a matter of dropping the BFL once the source/target are locked. With only regular file rename, there is no strong requirement to know the parent/child relationship of the parent directories, but the consistent locking order is still required to avoid AB/BA deadlocks with other concurrent operations.

            I think the benefit of allowing arbitrary parallel directory rename is pretty small, and probably not worthwhile pursuing in the context of this ticket.

            adilger Andreas Dilger added a comment - Further improvements in this area beyond the patches already pushed for same-dir rename operations: instead of locking whole parent directory, just lock parent FID+source/target hash to allow parallel file (or directory) rename within a single directory allow rename between shards of a striped directory, given that we know source and target shards are not child/ancestor of each other (though there would still need to ordering for locking of individual shards) allow regular file rename between different source/target directories, which will need to get a fixed locking order to avoid deadlocks. That code already exists, so may be "only" a matter of dropping the BFL once the source/target are locked. With only regular file rename, there is no strong requirement to know the parent/child relationship of the parent directories, but the consistent locking order is still required to avoid AB/BA deadlocks with other concurrent operations. I think the benefit of allowing arbitrary parallel directory rename is pretty small, and probably not worthwhile pursuing in the context of this ticket.

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41184/
            Subject: LU-12125 llite: send file mode with rename RPC
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 47576dc68cd90068cd5cbd5c889f04531fe6e682

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41184/ Subject: LU-12125 llite: send file mode with rename RPC Project: fs/lustre-release Branch: master Current Patch Set: Commit: 47576dc68cd90068cd5cbd5c889f04531fe6e682

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41231
            Subject: LU-12125 tests: allow racer to specify extra tasks
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 4a12916a0375d97fa67bdcdcf860fcf9b88f4192

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41231 Subject: LU-12125 tests: allow racer to specify extra tasks Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 4a12916a0375d97fa67bdcdcf860fcf9b88f4192

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41230
            Subject: LU-12125 mds: allow parallel directory rename
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 8f50962fb02463d620163f9444a430ceca693368

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41230 Subject: LU-12125 mds: allow parallel directory rename Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 8f50962fb02463d620163f9444a430ceca693368

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41229
            Subject: LU-12125 mds: allow parallel directory rename
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 8ba0a64c75dbc69bf9de774b67a7e49419f3ba7d

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41229 Subject: LU-12125 mds: allow parallel directory rename Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 8ba0a64c75dbc69bf9de774b67a7e49419f3ba7d

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41186
            Subject: LU-12125 mds: allow parallel regular file rename
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: bc1e773b4364dde14df17645dd4d27b1143d1ccf

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41186 Subject: LU-12125 mds: allow parallel regular file rename Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: bc1e773b4364dde14df17645dd4d27b1143d1ccf

            People

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

              Dates

                Created:
                Updated:
                Resolved: