From d29b83dace8382680ee2e9d03f7f94ca62301fa2 Mon Sep 17 00:00:00 2001 From: John Hammond Date: Mon, 1 Aug 2011 10:28:48 -0500 Subject: [PATCH] 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 --- lustre/mdt/mdt_handler.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */ /* -- 1.8.3.1