From: Andrew Perepechko Date: Fri, 18 Dec 2009 13:59:12 +0000 (+0300) Subject: b=21489 mtime could be spoiled by a write callback X-Git-Tag: v1_8_1_58~4 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=3185bb951c8aa008282d5b2bdad4ea73b392e51f;p=fs%2Flustre-release.git b=21489 mtime could be spoiled by a write callback i=Johann Lombardi i=Vitaly Fertman write callback with some stale mtime could "undo" a later setattr --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 1349516..75bc600 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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 diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 365074d..72c394d 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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;