Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.4.0
    • Lustre 2.4.0
    • None
    • 5770

    Description

      Having a generic mechanism to create temporary files (~ open/unlinked files) would be useful not only for HSM (restore is done in a separate file), but also for some applications which may want to create such a file w/o modifying the time attributes of the parent directory.

      A temporary file has the following properties:

      • it inherits the striping configuration of the parent directory
      • it does not change the time attributes of the parent directory
      • no direntry is inserted in the parent directory
      • the file is directly linked to PENDING and is thus considered as a open-unlinked file
      • if the file needs to be opened multiple times (in addition to the creator), this should be done via open_by_fid.

      A temporary file could be created via a regular open/creat call with a special - maybe binary - name to prevent conflict with legacy files. For DNE support, there is a requirement to be able to specify in the filename the MDT index where to create the file.

      Assigning the bug to Jodi since i can't assign it to Jacques-Charles.

      Attachments

        Issue Links

          Activity

            [LU-2441] Temporary file support

            With Change,4836 landed can this ticket be closed?

            jlevi Jodi Levi (Inactive) added a comment - With Change,4836 landed can this ticket be closed?

            Patch at http://review.whamcloud.com/4836
            Non insertion of direntry in parent directory is missing in this first patch (will be done soon)

            jcl jacques-charles lafoucriere added a comment - Patch at http://review.whamcloud.com/4836 Non insertion of direntry in parent directory is missing in this first patch (will be done soon)

            We need to have an llapi_file_open_unlinked() (or some similarly named) function (similar to llapi_file_open_pool()) to use for tools needing this ability. If we don't think that the Lustre code for creating open-unlinked files can be added in time for 2.4, then at least the llapi_file_open_unlinked() function could start by calling llapi_file_open_pool() to create a regular file using mkstemp() and then immediately unlink() the filename it before returning the file descriptor to the caller.

            LU-2182 also has some discussion about having an improved API for passing the layout to/from userspace, and ideally we would use the new API for this new function.

            adilger Andreas Dilger added a comment - We need to have an llapi_file_open_unlinked() (or some similarly named) function (similar to llapi_file_open_pool()) to use for tools needing this ability. If we don't think that the Lustre code for creating open-unlinked files can be added in time for 2.4, then at least the llapi_file_open_unlinked() function could start by calling llapi_file_open_pool() to create a regular file using mkstemp() and then immediately unlink() the filename it before returning the file descriptor to the caller. LU-2182 also has some discussion about having an improved API for passing the layout to/from userspace, and ideally we would use the new API for this new function.

            People

              jlevi Jodi Levi (Inactive)
              johann Johann Lombardi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: