Whamcloud - gitweb
LU-3696 mdd: decref volatile object after creation 76/12076/2
authorJames Nunez <james.a.nunez@intel.com>
Fri, 26 Sep 2014 20:24:09 +0000 (14:24 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 Dec 2014 04:16:21 +0000 (04:16 +0000)
commitf6b32c44806aa37c0d43fd4e01b4fecb7fa60c1c
treef023d9f23f790ff694b1cd1b6f936a6234bbe59a
parentd82b4f54cbbe269519330e88639dd8e197636496
LU-3696 mdd: decref volatile object after creation

Drop the nlink count on a volatile file after it is created.
It is created with a single reference and then added to the PENDING
directory, which adds a second reference to the inode.  When it is
closed it is left with an nlink count=1 and not unlinked as it should
be.

Do not insert volatile files into the ChangeLog, since they are
intended to be temporary files that cannot be accessed after creation
and should not be synched to a backup filesystem.

If llapi_create_volatile_idx() is used on a non-Lustre filesystem then
it should also unlink the temporary filename after opening it, so that
the behaviour is the same.  Improve the comments for this function.

Minor cleanups of related functions found during investigation.

This patch is based on Andreas Dilger's patch:
Lustre-change: http://review.whamcloud.com/#/c/10179
Lustre-commit: 1ebc8dc473dd9f948837b9d5b258194637d46525

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ief906362ab2f6f92342c8eabcb9b090a340a5003
Reviewed-on: http://review.whamcloud.com/12076
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdd/mdd_dir.c
lustre/utils/liblustreapi.c