Whamcloud - gitweb
LU-560 Fixup intent status on ENOENT in mdt_intent_reint
authorJohn Hammond <jhammond@tacc.utexas.edu>
Mon, 1 Aug 2011 15:28:48 +0000 (10:28 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Aug 2011 00:48:21 +0000 (20:48 -0400)
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 <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1173
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_handler.c

index 3ff76c8..58220e5 100644 (file)
@@ -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 */
                 /*