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

mirror_extend() should not sanity-check the layout of the file

Details

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

    Description

      In mirror_extend() we call mirror_create_sanity_check(fname, mirror_list) to sanity check the layouts of the original file and the mirror list. It doesn't make sense to check the layout of the original file. The check of the original file was added to prevent mixing of DoM and FLR. But the DoM+FLR prevention inside of mirror_create_sanity_check() has been removed:

      static int mirror_extend(char *fname, struct mirror_args *mirror_list,
                               enum mirror_flags mirror_flags)
      {
              int rc;
      
              rc = mirror_create_sanity_check(fname, mirror_list);
              if (rc)
                      return rc;
      
      ...
      }
      
      # git-grep-and-blame mirror_create_sanity_check
      125f98fb (Jian Yu 2017-09-15 21:43:10 +0000 1609)  * mirror_create_sanity_check() - Check mirror list.
      0bff64be (Jinshan Xiong 2017-11-16 23:06:24 -0800 1617) static int mirror_create_sanity_check(const char *fname,
      0bff64be (Jinshan Xiong 2017-11-16 23:06:24 -0800 1726) 	rc = mirror_create_sanity_check(NULL, mirror_list);
      0bff64be (Jinshan Xiong 2017-11-16 23:06:24 -0800 2027) 	rc = mirror_create_sanity_check(fname, mirror_list);
      # git show 0bff64be
      commit 0bff64be320fd95d80ae21b1362e1a2892bd450a
      Author: Jinshan Xiong <jinshan.xiong@intel.com>
      Date:   Thu Nov 16 23:06:24 2017 -0800
      
          LU-9771 flr: to not support dom+flr for phase 1
          
          To exclude the support of dom+flr.
          
          Test-Parameters: testlist=sanity-flr
      ...
      

      Removing the check on the original file will save us an open+close+etc.

      Attachments

        Activity

          [LU-14637] mirror_extend() should not sanity-check the layout of the file
          pjones Peter Jones added a comment -

          Landed for 2.15

          pjones Peter Jones added a comment - Landed for 2.15

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/44185/
          Subject: LU-14637 flr: get rid of excluding dom+flr support test
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 4b52ea1d30b45900787271c4c035fad124abf34a

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/44185/ Subject: LU-14637 flr: get rid of excluding dom+flr support test Project: fs/lustre-release Branch: master Current Patch Set: Commit: 4b52ea1d30b45900787271c4c035fad124abf34a

          Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/44185
          Subject: LU-14637 flr: get rid of excluding dom+flr support test
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 029326afafa0f45afb4f3260c31dacdc3089a48f

          gerrit Gerrit Updater added a comment - Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/44185 Subject: LU-14637 flr: get rid of excluding dom+flr support test Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 029326afafa0f45afb4f3260c31dacdc3089a48f
          jhammond John Hammond added a comment -

          lfs mirror extend is actually opening the file twice O_RDONLY to get the layout and then once O_RDWR to actually add the mirror. The first time we get the layout it is for the sanity check and the second it to have the mirror layout inherit from the original.

          jhammond John Hammond added a comment - lfs mirror extend is actually opening the file twice O_RDONLY to get the layout and then once O_RDWR to actually add the mirror. The first time we get the layout it is for the sanity check and the second it to have the mirror layout inherit from the original.

          People

            bobijam Zhenyu Xu
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: