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

"lfs setstripe -E" doesn't validate component end

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.15.0
    • Lustre 2.10.8, Lustre 2.14.0, Lustre 2.12.5
    • None
    • 3
    • 9223372036854775807

    Description

      The "lfs setstripe -E" option does not validate the component_end value, allowing files with invalid layouts to be created. For example:

      $ lfs setstripe -E 128 -c 1 /mnt/testfs/badfile
      lfs setstripe: cannot create composite file '/mnt/testfs/badfile': Invalid argument
      $ ls -l /mnt/testfs
      ls: cannot access /mnt/testfs/badfile: Invalid argument
      ? -?????????? ? ?            ?             ?     badfile
      

      This also generates errors on the console reporting the invalid stripe count:

      LustreError: 23302:0:(lov_ea.c:115:lsm_lmm_verify_v1v3()) lov: bad stripe size 128: rc = -22
      Lustre: 23303:0:(lov_pack.c:58:lov_dump_lmm_common()) objid 0xc:5025, magic 0x0bd30bd0, pattern 0x1
      Lustre: 23303:0:(lov_pack.c:62:lov_dump_lmm_common()) stripe_size 128, stripe_count 1, layout_gen 0
      LustreError: 23303:0:(lcommon_cl.c:194:cl_file_inode_init()) testfs: failed to initialize cl_object [0x4000013a1:0xc:0x0]: rc = -22
      LustreError: 23303:0:(llite_lib.c:2491:ll_prep_inode()) new_inode -fatal: rc -22
      

      The setstripe command reported an error, but the file was actually created and is inaccessible and unremovable by normal unlink() operations. Using "lfs rmfid" allows the file to be unlinked from the filesystem:

      $ rm /mnt/testfs/badfile
      rm: cannot remove '/mnt/testfs/badfile': Invalid argument
      $ unlink /mnt/testfs/badfile
      unlink: cannot remove '/mnt/testfs/badfile': Invalid argument
      $ lfs rmfid /mnt/testfs $(lfs getstripe -F /mnt/testfs/badfile)
      $
      

      Attachments

        Activity

          [LU-14180] "lfs setstripe -E" doesn't validate component end
          pjones Peter Jones made changes -
          Link Original: This issue is related to JFC-10 [ JFC-10 ]
          pjones Peter Jones made changes -
          Link New: This issue is related to JFC-20 [ JFC-20 ]
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.15.0 [ 14791 ]
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          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/41239/
          Subject: LU-14180 utils: verify setstripe comp_end is valid
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 83e38bba6237f838c9a5d7d36b258cf6dd28bd13

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41239/ Subject: LU-14180 utils: verify setstripe comp_end is valid Project: fs/lustre-release Branch: master Current Patch Set: Commit: 83e38bba6237f838c9a5d7d36b258cf6dd28bd13
          pjones Peter Jones made changes -
          Link New: This issue is related to JFC-10 [ JFC-10 ]

          Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41239
          Subject: LU-14180 utils: verify setstripe comp_end is valid
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: e8b86175464e66eaa753b9ed853a84b1d8af894e

          gerrit Gerrit Updater added a comment - Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41239 Subject: LU-14180 utils: verify setstripe comp_end is valid Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e8b86175464e66eaa753b9ed853a84b1d8af894e
          yujian Jian Yu made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          I pushed an unfinished version of a patch that I was working on for this issue when I accidentally made an unrelated patch on the same branch.

          It totally failed testing, but might be worthwhile for Jian to use as a starting point when she has time to look at this.

          adilger Andreas Dilger added a comment - I pushed an unfinished version of a patch that I was working on for this issue when I accidentally made an unrelated patch on the same branch. It totally failed testing, but might be worthwhile for Jian to use as a starting point when she has time to look at this.
          pjones Peter Jones made changes -
          Assignee Original: WC Triage [ wc-triage ] New: Jian Yu [ yujian ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: