From: yury Date: Wed, 21 Jun 2006 13:47:29 +0000 (+0000) Subject: - a race handled out; X-Git-Tag: v1_8_0_110~486^2~1581 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=25f430c162007ae13c2d53adc9a21d85c1c63841;p=fs%2Flustre-release.git - a race handled out; --- 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);