From 137b11d616c6086b05c32089903a39334999a76e Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Wed, 23 Dec 2015 23:37:54 +0530 Subject: tier/unlink: symlink failed to unlink during unlink of a file, we will get stat just after deleting the file, to see if the file is under migration or not. but this stat call will fail for symlink if the actual file was deleted. So it is better not to send stat request from client if it is a symlink as we are not migrating symlink. Change-Id: Idc033b24fa3522b5261e579889d2195b43419682 BUG: 1293963 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/13074 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/cluster/dht/src/tier-common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/tier-common.c') diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c index 40c8c9e965d..8de21df24ef 100644 --- a/xlators/cluster/dht/src/tier-common.c +++ b/xlators/cluster/dht/src/tier-common.c @@ -537,12 +537,16 @@ tier_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag, } local->flags = xflag; - if (hashed_subvol == cached_subvol) { + if (IA_ISREG (loc->inode->ia_type) && + (hashed_subvol == cached_subvol)) { /* * File resides in cold tier. We need to stat * the file to see if it is being promoted. * If yes we need to delete the destination * file as well. + * + * Currently we are doing this check only for + * regular files. */ xdata = xdata ? dict_ref (xdata) : dict_new (); if (xdata) { -- cgit