Details

    • 9223372036854775807

    Description

      The --maxdepth M option exists, but there is no corresponding --mindepth N option to find entries at N directory levels down in the tree.

      Attachments

        Issue Links

          Activity

            [LU-10552] add "lfs find --mindepth"
            adilger Andreas Dilger added a comment - - edited

            "Maximilian Dilger <mdilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/55226
            Subject: LU-10522 utils: new --mindepth for lfs find
            Branch: master
            Current Patch Set: 5
            Commit: 9df10214fb073434c6e634e5169e72aa7a606e9f

            adilger Andreas Dilger added a comment - - edited "Maximilian Dilger <mdilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/55226 Subject: LU-10522 utils: new --mindepth for lfs find Branch: master Current Patch Set: 5 Commit: 9df10214fb073434c6e634e5169e72aa7a606e9f

            Sorry, I didn't get an email about this. There is no need for a "short" letter option for every long option like "--maxdepth". It could use a numeric option value as some of the other options do.

            The lustreapi.h file is definitely located in the Lustre source tree, even if it is installed into the system by RPM packages. Using "git grep" is your friend to find things in the source code, if your IDE does not have tags to jump to structure and function definitions.

            As for modifying the find_param struct, since this is also used as part of the user API, it should only be modified by adding new fields to the end. Some caution is needed since there are a few other patches in flight that are also modifying this struct.

            adilger Andreas Dilger added a comment - Sorry, I didn't get an email about this. There is no need for a "short" letter option for every long option like "--maxdepth". It could use a numeric option value as some of the other options do. The lustreapi.h file is definitely located in the Lustre source tree, even if it is installed into the system by RPM packages. Using "git grep" is your friend to find things in the source code, if your IDE does not have tags to jump to structure and function definitions. As for modifying the find_param struct, since this is also used as part of the user API, it should only be modified by adding new fields to the end. Some caution is needed since there are a few other patches in flight that are also modifying this struct.
            mdilger Max Dilger added a comment -

            About implementing "lfs find --mindepth", and i see the logic for "lfs find --maxdepth" in the lfs.c file. Based on how it's implemented it would make sense to me to add a .fp_min_depth value to the "find_param param" struct but i see that it is declared in the lustreapi.h file which is located at /usr/include/lustre directory and not inside the lustre-release which is where everything else is. I am worried that any changes i make to the lustreapi.h file will not get included in any git commits that I make. Also in the long_opts[] struct --maxdepth is listed as "D", so while the two are both related adding --mindepth to "D" aswell will likely cause some confusion.

            mdilger Max Dilger added a comment - About implementing "lfs find --mindepth", and i see the logic for "lfs find --maxdepth" in the lfs.c file. Based on how it's implemented it would make sense to me to add a .fp_min_depth value to the "find_param param" struct but i see that it is declared in the lustreapi.h file which is located at /usr/include/lustre directory and not inside the lustre-release which is where everything else is. I am worried that any changes i make to the lustreapi.h file will not get included in any git commits that I make. Also in the long_opts[] struct --maxdepth is listed as "D", so while the two are both related adding --mindepth to "D" aswell will likely cause some confusion.

            People

              mdilger Max Dilger
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: