From: John Hammond Date: Mon, 1 Aug 2011 15:28:48 +0000 (-0500) Subject: LU-560 Fixup intent status on ENOENT in mdt_intent_reint X-Git-Tag: 2.1.0-RC0~15 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d29b83dace8382680ee2e9d03f7f94ca62301fa2;p=fs%2Flustre-release.git LU-560 Fixup intent status on ENOENT in mdt_intent_reint Clear -ENOENT from rep->lock_policy_res2 for non existent files so that clients may cache negative dentries if they hold MDS_INODELOCK_UPDATE on the parent directory. Change-Id: I238f1001782923a595f9f7ee1c094d53ab1422ae Signed-off-by: John Hammond Reviewed-on: http://review.whamcloud.com/1173 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 3ff76c8..58220e5 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -3380,6 +3380,10 @@ static int mdt_intent_reint(enum mdt_it_code opcode, } rep->lock_policy_res2 = clear_serious(rc); + if (rep->lock_policy_res2 == -ENOENT && + mdt_get_disposition(rep, DISP_LOOKUP_NEG)) + rep->lock_policy_res2 = 0; + if (rc == -ENOTCONN || rc == -ENODEV || rc == -EOVERFLOW) { /**< if VBR failure then return error */ /*