From 385c955d968c03acfa3d664764087def07a3e92c Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Wed, 31 May 2017 03:51:26 -0400 Subject: [PATCH] LU-9470 osc: update timestamps on write only In osc_io_submit(), we should only update timestamps on write. Test-parameters: testlist=sanityn.sh,sanityn.sh,sanityn.sh,sanityn.sh,sanityn.sh,sanityn.sh Signed-off-by: Niu Yawei Change-Id: I56ed4c499f3b438018ff5b4cd29d7e84f72e04a6 Reviewed-on: https://review.whamcloud.com/27348 Tested-by: Jenkins Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osc/osc_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osc/osc_io.c b/lustre/osc/osc_io.c index 1ab41d8..0501ba5 100644 --- a/lustre/osc/osc_io.c +++ b/lustre/osc/osc_io.c @@ -211,7 +211,7 @@ static int osc_io_submit(const struct lu_env *env, result = osc_queue_sync_pages(env, osc, &list, cmd, brw_flags); /* Update c/mtime for sync write. LU-7310 */ - if (qout->pl_nr > 0 && result == 0) { + if (crt == CRT_WRITE && qout->pl_nr > 0 && result == 0) { struct cl_object *obj = ios->cis_obj; struct cl_attr *attr = &osc_env_info(env)->oti_attr; -- 1.8.3.1