From: John L. Hammond Date: Thu, 17 Nov 2016 17:32:15 +0000 (-0600) Subject: LU-8846 lfs: try to unlink volatile file in lfs_migrate() X-Git-Tag: 2.9.51~26 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d15fbc4fd9fbf5b892ea4320771ad40963bfdc69 LU-8846 lfs: try to unlink volatile file in lfs_migrate() In lfs_migrate() try to unlink the volatile file in case the MDT does not support volatile file creation. Signed-off-by: John L. Hammond Change-Id: I1e777c22ebde22e0c2080683a2b13650da7ebc7a Reviewed-on: https://review.whamcloud.com/23842 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 109fd8d..c885e5f 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -755,6 +755,10 @@ static int lfs_migrate(char *name, __u64 migration_flags, goto error; } + /* In case the MDT does not support creation of volatile files + * we should try to unlink it. */ + (void)unlink(volatile_file); + /* Not-owner (root?) special case. * Need to set owner/group of volatile file like original. * This will allow to pass related check during layout_swap.