Whamcloud - gitweb
b=21489 mtime could be spoiled by a write callback
authorAndrew Perepechko <andrew.perepechko@sun.com>
Fri, 18 Dec 2009 13:59:12 +0000 (16:59 +0300)
committerAndrew Perepechko <andrew.perepechko@sun.com>
Fri, 18 Dec 2009 13:59:12 +0000 (16:59 +0300)
i=Johann Lombardi
i=Vitaly Fertman

write callback with some stale mtime could "undo" a later setattr

lustre/ChangeLog
lustre/ost/ost_handler.c

index 1349516..75bc600 100644 (file)
@@ -11,12 +11,16 @@ tbd Sun Microsystems, Inc.
        * Recommended e2fsprogs version: 1.41.6.sun1
 
 Severity   : normal
+Bugzilla   : 21489
+Description: mtime could be spoiled by a write callback
+
+Severity   : normal
 Bugzilla   : 20722
 Description: Make watchdog timer messages to be more clear and descriptive.
 
 Severity   : normal
 Bugzilla   : 21147
-Description: quota type and version is not tolerant to resetting
+Description: quota type and version are not tolerant to resetting
             to the same value
 
 Severity   : enhancement
index 365074d..72c394d 100644 (file)
@@ -1121,6 +1121,13 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
                  * has timed out the request already */
                 no_reply = 1;
 
+        /*
+         * Disable sending mtime back to the client. If the client locked the
+         * whole object, then it has already updated the mtime on its side,
+         * otherwise it will have to glimpse anyway (see bug 21489, comment 32)
+         */
+        repbody->oa.o_valid &= ~(OBD_MD_FLMTIME | OBD_MD_FLATIME);
+
         if (unlikely(client_cksum != server_cksum && rc == 0)) {
                 int  new_cksum = ost_checksum_bulk(desc, OST_WRITE, cksum_type);
                 char *msg;