Whamcloud - gitweb
LU-3696 mdd: decref volatile object after creation 79/10179/4
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 27 May 2014 21:15:02 +0000 (15:15 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 4 Jun 2014 21:06:54 +0000 (21:06 +0000)
commit1ebc8dc473dd9f948837b9d5b258194637d46525
tree77e1fe09d548cdec6fc8fb7bd98d49fc976a08eb
parent2f55405983bc78a195c10ce888747df63ee4617b
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.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I4bd37395a8eff94458e62414a5a4e7206b76d32d
Reviewed-on: http://review.whamcloud.com/10179
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_dir.c
lustre/utils/liblustreapi.c