From d15fbc4fd9fbf5b892ea4320771ad40963bfdc69 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Thu, 17 Nov 2016 11:32:15 -0600 Subject: [PATCH] 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 --- lustre/utils/lfs.c | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 1.8.3.1