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

Add layout lock for striped directories.

Details

    • Improvement
    • Resolution: Won't Do
    • Major
    • None
    • Lustre 2.8.0
    • 9223372036854775807

    Description

      Currently DNE2 doesn't handle layout locks to revoke the layout if it is changed. When performing an migration on a striped directory the layout lock needs to be invalidated so the client can refresh the layout.

      Attachments

        Issue Links

          Activity

            [LU-7357] Add layout lock for striped directories.
            adilger Andreas Dilger made changes -
            Resolution New: Won't Do [ 10200 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            laisiyao Lai Siyao added a comment -

            Andreas, yes, https://review.whamcloud.com/10110 can be abandoned and this can be closed.

            laisiyao Lai Siyao added a comment - Andreas, yes, https://review.whamcloud.com/10110 can be abandoned and this can be closed.
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-14448 [ LU-14448 ]

            Lai, with the changes in patch https://review.whamcloud.com/45370 "LU-14448 lod: verify LOV early in lod_get_default_striping" and patch https://review.whamcloud.com/45237 "LU-15070 llite: update default LMV upon any change" is there anything left to be done here?

            If not, then the patch https://review.whamcloud.com/10110 "LU-7357 lmv: add layout lock to striped directory" could be abandoned and this ticket closed.

            adilger Andreas Dilger added a comment - Lai, with the changes in patch https://review.whamcloud.com/45370 " LU-14448 lod: verify LOV early in lod_get_default_striping " and patch https://review.whamcloud.com/45237 " LU-15070 llite: update default LMV upon any change " is there anything left to be done here? If not, then the patch https://review.whamcloud.com/10110 " LU-7357 lmv: add layout lock to striped directory " could be abandoned and this ticket closed.
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-15070 [ LU-15070 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is duplicated by OSF-192 [ OSF-192 ]
            laisiyao Lai Siyao added a comment -

            Now directory layout is protected by LOOKUP lock, since directory layout is revoked only by directory migration/shrink and LFSCK layout recreate, put it under LOOKUP lock won't cause too many lock revoke.

            laisiyao Lai Siyao added a comment - Now directory layout is protected by LOOKUP lock, since directory layout is revoked only by directory migration/shrink and LFSCK layout recreate, put it under LOOKUP lock won't cause too many lock revoke.
            laisiyao Lai Siyao added a comment -

            Directory migration will migrate directory to a new fid, so the inode is different after migration. But there is one place that directory layout may change: after all sub files migration the parent directory will be shrunk to contain new layout only.

            But I don't see the benefit of introducing this bit, because it can't eleminate race: client can't hold ibit lock, its layout can be stale at any moment with or without this bit lock. But this race is not serious, because https://review.whamcloud.com/#/c/31504/ adds rules to access migrating directory, operations through old layout may fail, but they won't corrupt the directory.

            Directory layout will be updated after each lookup, getattr, setattr, setdirstripe and open, I'd say it's protected by UPDATE bit, but it's used by MDT to serialize operations, client won't clear its directory layout upon UPDATE bit revoke, because it needs layout information to access directory (just like fid), and I think we've kept it up-to-date already.

            laisiyao Lai Siyao added a comment - Directory migration will migrate directory to a new fid, so the inode is different after migration. But there is one place that directory layout may change: after all sub files migration the parent directory will be shrunk to contain new layout only. But I don't see the benefit of introducing this bit, because it can't eleminate race: client can't hold ibit lock, its layout can be stale at any moment with or without this bit lock. But this race is not serious, because https://review.whamcloud.com/#/c/31504/ adds rules to access migrating directory, operations through old layout may fail, but they won't corrupt the directory. Directory layout will be updated after each lookup, getattr, setattr, setdirstripe and open, I'd say it's protected by UPDATE bit, but it's used by MDT to serialize operations, client won't clear its directory layout upon UPDATE bit revoke, because it needs layout information to access directory (just like fid), and I think we've kept it up-to-date already.
            adilger Andreas Dilger made changes -
            Description Original: Currently DNE2 doesn't handle layout locks. When performing an unlink on a striped directory the layout lock needs to be invalidated so the client can refresh the layout. New: Currently DNE2 doesn't handle layout locks to revoke the layout if it is changed. When performing an migration on a striped directory the layout lock needs to be invalidated so the client can refresh the layout.

            Lai, is there actually a need for a separate layout bit for directory migration? Oleg thinks we can use the UPDATE bit to cancel the directory cache. Will the client get a new directory layout after that?

            adilger Andreas Dilger added a comment - Lai, is there actually a need for a separate layout bit for directory migration? Oleg thinks we can use the UPDATE bit to cancel the directory cache. Will the client get a new directory layout after that?

            People

              laisiyao Lai Siyao
              simmonsja James A Simmons
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: