From 25f430c162007ae13c2d53adc9a21d85c1c63841 Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 21 Jun 2006 13:47:29 +0000 Subject: [PATCH] - a race handled out; --- lustre/fid/fid_handler.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lustre/fid/fid_handler.c b/lustre/fid/fid_handler.c index a6f7099..96cfb21 100644 --- a/lustre/fid/fid_handler.c +++ b/lustre/fid/fid_handler.c @@ -175,9 +175,19 @@ __seq_server_alloc_meta(struct lu_server_seq *seq, RETURN(rc); } - /* saving new range into allocation space. */ - *super = seq->seq_cli->seq_range; - LASSERT(range_is_sane(super)); + if (seq->seq_cli->seq_range.lr_start > super->lr_start) { + /* saving new range into allocation space. */ + *super = seq->seq_cli->seq_range; + LASSERT(range_is_sane(super)); + } else { + /* XXX: race is catched, ignore what we have from + * controller node. The only issue is that controller + * node has now this super-sequence lost, what makes + * sequences space smaller. */ + CWARN("SEQ-MGR(srv): race is cached, reject " + "allocated super-sequence\n"); + RETURN(0); + } } range_alloc(range, super, LUSTRE_SEQ_META_WIDTH); -- 1.8.3.1