From 56bd084b72f57af1d105ac0d3b5c337af9776361 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Tue, 25 Oct 2011 04:31:11 -0700 Subject: [PATCH] LU-791 obdfilter: Don't clear OBD_MD_FLFLAGS mistakenly Instead of set oa->o_valid to OBD_MD_FLID | OBD_MD_FLGROUP arbitrarily in filter_handle_precreate(), it should be changed as "|=" to keep the OBD_MD_FLFLAGS setted in filter_precreate(). Otherwise, client will not be aware of OST is running out of space, and lov_create() will wait for objects forever in such case. Signed-off-by: Niu Yawei Change-Id: I84be8dde59dbb2829cd800e10b7aa6f4402b7e56 Reviewed-on: http://review.whamcloud.com/1589 Reviewed-by: Fan Yong Reviewed-by: hongchao.zhang Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/obdfilter/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 6f2b7b9..d1804ab 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -3676,7 +3676,7 @@ static int filter_handle_precreate(struct obd_export *exp, struct obdo *oa, rc = filter_precreate(obd, oa, group, &diff); oa->o_id = filter_last_id(&obd->u.filter, group); oa->o_seq = group; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP; + oa->o_valid |= (OBD_MD_FLID | OBD_MD_FLGROUP); GOTO(out, rc); } /* else diff == 0 */ -- 1.8.3.1