From e37ee6d509aa98587d55f9ea73bc831c10761eaa Mon Sep 17 00:00:00 2001 From: karthik-us Date: Fri, 3 Aug 2018 15:55:18 +0530 Subject: posix: Delete the entry if gfid link creation fails Problem: If the gfid link file inside .glusterfs is not present for a file, the operations which are dependent on the gfid will fail, complaining the link file does not exists inside .glusterfs. Fix: If the link file creation fails, fail the entry creation operation and delete the original file. Change-Id: Id767511de2da46b1f45aea45cb68b98d965ac96d fixes: bz#1612037 Signed-off-by: karthik-us --- .../replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t b/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t index 7fec3b442d6..baf58bbf2a0 100644 --- a/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t +++ b/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t @@ -51,7 +51,8 @@ i=$(create_files) TEST ! ls $B0/${V0}0/file$i TEST ! ls $B0/${V0}1/file$i TEST ls $B0/${V0}2/file$i -EXPECT "000000000000000000000001" get_hex_xattr trusted.afr.dirty $B0/${V0}2 +dirty=$(get_hex_xattr trusted.afr.dirty $B0/${V0}2) +TEST [ "$dirty" != "000000000000000000000000" ] EXPECT "000000010000000100000000" get_hex_xattr trusted.afr.$V0-client-0 $B0/${V0}2/file$i EXPECT "000000010000000100000000" get_hex_xattr trusted.afr.$V0-client-1 $B0/${V0}2/file$i -- cgit