From 7cad9d7a3708eee57716443bb80aacef1396383d Mon Sep 17 00:00:00 2001 From: "Alexander.Boyko" Date: Wed, 21 Mar 2012 21:47:53 +0400 Subject: [PATCH] LU-1247 obdfilter: fix invalid check of precrate objects MDT precreate objects when it has objects count less than the oscc->oscc_grow_count / 2. oscc->oscc_grow_count can be equal to OST_MAX_PRECREATE, so MDT (last_id - next_id) is less than the (OST_MAX_PRECREAT * 3 / 2). This patch fix the wrong condition at filter_handle_precreate() when delete orphans request happend. Signed-off-by: Alexander Boyko Reviewed-by: Andrew Perepechko Reviewed-by: Andriy Skulysh Xyratex-bug-id: MRP-440 Change-Id: I5bac3ee7261fe7462254bd80565d770041c3c206 Reviewed-on: http://review.whamcloud.com/2365 Reviewed-by: Andriy Skulysh Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger 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 9dc6584..75fd01b 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -3680,7 +3680,7 @@ static int filter_handle_precreate(struct obd_export *exp, struct obdo *oa, CDEBUG(D_HA, "filter_last_id() = "LPU64" -> diff = %d\n", last, diff); - if (-diff > OST_MAX_PRECREATE) { + if (-diff > (OST_MAX_PRECREATE * 3) / 2) { CERROR("%s: ignoring bogus orphan destroy request: " "obdid "LPU64" last_id "LPU64"\n", obd->obd_name, oa->o_id, last); -- 1.8.3.1