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

"lfs rm_entry" failed to remove broken directories

Details

    • 3
    • 9223372036854775807

    Description

      In LU-16159, update logs are canceled upon recovery abort, which may leave some directories broken, and can't be removed by "lfs rm_entry". This is because "lfs rm_entry" failed some sanity check, but it will leave end-user a broken filesystem without any way to fix.

      Attachments

        Issue Links

          Activity

            [LU-16335] "lfs rm_entry" failed to remove broken directories

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49329/
            Subject: LU-16335 mdt: skip target check for rm_entry
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: ae98c5fdaaf37daeb328b7110cbcf42754752c9d

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49329/ Subject: LU-16335 mdt: skip target check for rm_entry Project: fs/lustre-release Branch: master Current Patch Set: Commit: ae98c5fdaaf37daeb328b7110cbcf42754752c9d

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49335/
            Subject: LU-16335 test: add fail_abort_cleanup()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d5fe41a02a6ed57bcbfc4a4c695bb509c9c7c313

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49335/ Subject: LU-16335 test: add fail_abort_cleanup() Project: fs/lustre-release Branch: master Current Patch Set: Commit: d5fe41a02a6ed57bcbfc4a4c695bb509c9c7c313

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49328/
            Subject: LU-16335 build: remove _GNU_SOURCE dependency in lustre_user.h
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: efc5c8d4de60d394344506f7cfb188eaf04a4bac

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49328/ Subject: LU-16335 build: remove _GNU_SOURCE dependency in lustre_user.h Project: fs/lustre-release Branch: master Current Patch Set: Commit: efc5c8d4de60d394344506f7cfb188eaf04a4bac
            laisiyao Lai Siyao added a comment -

            In theory lfsck should fix these inconsistencies, but it's not fully tested, and LU-16159 test result shows some are not fixed, and it will be addressed in LU-16336.

            laisiyao Lai Siyao added a comment - In theory lfsck should fix these inconsistencies, but it's not fully tested, and LU-16159 test result shows some are not fixed, and it will be addressed in LU-16336 .

            So we disable various test for the native client since lfs rm_dentry was removed upstream. Its considered a security risk. Does this mean lfsck can repair the file system?

            simmonsja James A Simmons added a comment - So we disable various test for the native client since lfs rm_dentry was removed upstream. Its considered a security risk. Does this mean lfsck can repair the file system?

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49335
            Subject: LU-16335 test: add fail_abort_cleanup()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 243ffa00d0a4353c78ee8b73bdce0e1c60bdc5da

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49335 Subject: LU-16335 test: add fail_abort_cleanup() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 243ffa00d0a4353c78ee8b73bdce0e1c60bdc5da
            gerrit Gerrit Updater added a comment - - edited

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49334
            Subject: LU-16335 header: implement native strchrnul()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: bc03636059c5c2dc9a0f1030af83309aedc94ac0

            gerrit Gerrit Updater added a comment - - edited "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49334 Subject: LU-16335 header: implement native strchrnul() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: bc03636059c5c2dc9a0f1030af83309aedc94ac0

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49329
            Subject: LU-16335 mdt: skip child check for rm_entry
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 2cc5c2bfed10f2d63ee767cf90d77fb16e08e366

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49329 Subject: LU-16335 mdt: skip child check for rm_entry Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 2cc5c2bfed10f2d63ee767cf90d77fb16e08e366

            "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49328
            Subject: LU-16335 build: strchrnul() needs define _GNU_SOURCE
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: f5f31fa51477c7091a5af7fbb95382cd87d97938

            gerrit Gerrit Updater added a comment - "Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49328 Subject: LU-16335 build: strchrnul() needs define _GNU_SOURCE Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: f5f31fa51477c7091a5af7fbb95382cd87d97938
            laisiyao Lai Siyao added a comment -

            config.log show this:

            configure:39672: result: no
            configure:39682: checking if ioctl IOC_REMOVE_ENTRY' is supported
            configure:39696: gcc -c -g -O2 -Werror -I/home/laisiyao/lustre/lnet/include/uapi -I/home/laisiyao/lustre/lustre/include/uapi -I/home/laisiyao/lustre/libcfs/include -I/home/laisiyao/lustre/lnet/utils/ -I/home/laisiyao/lustre/lustre/include  conftest.c >&5
            In file included from /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_idl.h:74,
                             from /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_ioctl.h:34,
                             from conftest.c:253:
            /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_user.h: In function 'changelog_rec_sname':
            /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_user.h:2012:9: error: implicit declaration of function 'strchrnul'; did you mean 'strchr'? [-Werror=implicit-function-declaration]
              return strchrnul(changelog_rec_name(rec), '\0') + 1;
                     ^~~~~~~~~
                     strchr
            /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_user.h:2012:50: error: returning 'int' from a function with return type 'char *' makes pointer from integer without a cast [-Werror=int-conversion]
              return strchrnul(changelog_rec_name(rec), '\0') + 1;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
            cc1: all warnings being treated as errors
            configure:39696: $? = 1
            configure: failed program was:
             

            This check is from https://review.whamcloud.com/39207, and it causes "lfs rm_entry" always returns -ENOTSUP, which should be the cause of broken directory unlink fail.

            strchrnul() needs define _GNU_SOURCE, adding it in the check can solve the issue.

            laisiyao Lai Siyao added a comment - config.log show this: configure:39672: result: no configure:39682: checking if ioctl IOC_REMOVE_ENTRY' is supported configure:39696: gcc -c -g -O2 -Werror -I/home/laisiyao/lustre/lnet/include/uapi -I/home/laisiyao/lustre/lustre/include/uapi -I/home/laisiyao/lustre/libcfs/include -I/home/laisiyao/lustre/lnet/utils/ -I/home/laisiyao/lustre/lustre/include  conftest.c >&5 In file included from /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_idl.h:74,                  from /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_ioctl.h:34,                  from conftest.c:253: /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_user.h: In function 'changelog_rec_sname': /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_user.h:2012:9: error: implicit declaration of function 'strchrnul'; did you mean 'strchr'? [-Werror=implicit-function-declaration]   return strchrnul(changelog_rec_name(rec), '\0') + 1;          ^~~~~~~~~          strchr /home/laisiyao/lustre/lustre/include/uapi/linux/lustre/lustre_user.h:2012:50: error: returning 'int' from a function with return type 'char *' makes pointer from integer without a cast [-Werror=int-conversion]   return strchrnul(changelog_rec_name(rec), '\0') + 1;          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ cc1: all warnings being treated as errors configure:39696: $? = 1 configure: failed program was: This check is from https://review.whamcloud.com/39207 , and it causes "lfs rm_entry" always returns -ENOTSUP, which should be the cause of broken directory unlink fail. strchrnul() needs define _GNU_SOURCE, adding it in the check can solve the issue.

            People

              laisiyao Lai Siyao
              laisiyao Lai Siyao
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: