[LU-2441] Temporary file support Created: 06/Dec/12  Updated: 15/Feb/17  Resolved: 15/Feb/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.0
Fix Version/s: Lustre 2.4.0

Type: Improvement Priority: Minor
Reporter: Johann Lombardi (Inactive) Assignee: Jodi Levi (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 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.



 Comments   
Comment by Andreas Dilger [ 07/Dec/12 ]

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.

Comment by jacques-charles lafoucriere [ 16/Dec/12 ]

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

Comment by Jodi Levi (Inactive) [ 19/Apr/13 ]

With Change,4836 landed can this ticket be closed?

Generated at Sat Feb 10 01:25:13 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.