From a07ead09738563e92699ae69ba8d5aa6bbacd2b6 Mon Sep 17 00:00:00 2001 From: wangdi Date: Thu, 17 May 2007 05:33:12 +0000 Subject: [PATCH] Branch:b1_6 b:11662 compare fed_grant and client current grant, and decide whether we should grant more space to client or keep the original fed_grant and return the client fed_grant, instead of that "new granted" space, because client will call osc_init_grant instead of osc_update_grant to reset the grant info of client. i:adilger, green --- lustre/obdfilter/filter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 2c78cdf..13f3f5c 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1935,12 +1935,14 @@ static int filter_connect_internal(struct obd_export *exp, data->ocd_version = LUSTRE_VERSION_CODE; if (exp->exp_connect_flags & OBD_CONNECT_GRANT) { + struct filter_export_data *fed = &exp->exp_filter_data; obd_size left, want; spin_lock(&exp->exp_obd->obd_osfs_lock); left = filter_grant_space_left(exp); want = data->ocd_grant; - data->ocd_grant = filter_grant(exp, 0, want, left); + filter_grant(exp, fed->fed_grant, want, left); + data->ocd_grant = fed->fed_grant; spin_unlock(&exp->exp_obd->obd_osfs_lock); CDEBUG(D_CACHE, "%s: cli %s/%p ocd_grant: %d want: " -- 1.8.3.1