From 981121cbeaa11479f0cdc50c70db008bf73c27dc Mon Sep 17 00:00:00 2001 From: wangdi <wangdi> Date: Wed, 30 May 2007 11:41:11 +0000 Subject: [PATCH] Branch b1_6 Grant the space immediately for ungrant I/O req to avoid grant space > left available space. b=11662 i=adilger i=green --- lustre/ChangeLog | 12 +++++++++++- lustre/obdfilter/filter_io.c | 6 ++++-- lustre/tests/sanityN.sh | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 2813bb5d0a..40afede364 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -168,6 +168,17 @@ Details : When osc reconnect to OST, OST(filter)should clear grant info of OSC and OST when reconnect, and we should ignore the grant info these of resend/replay write req. +Severity : normal +Frequency : rare +Bugzilla : 11662 +Description: Grant space more than avaiable left space sometimes. +Details : When then OST is about to be full, if two bulk writing from + different clients came to OST. Accord the avaliable space of the + OST, the first req should be permitted, and the second one + should be denied by ENOSPC. But if the seconde arrived before + the first one is commited. The OST might wrongly permit second + writing, which will cause grant space > avaiable space. + Severity : normal Frequency : when client is evicted Bugzilla : 12371 @@ -912,7 +923,6 @@ Details : the performance loss is caused by using of write barriers in the ext3 code. The SLES10 kernel turns barrier support on by default. The fix is to undo that change for ldiskfs. - ------------------------------------------------------------------------------ 2006-12-09 Cluster File Systems, Inc. <info@clusterfs.com> diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index 2f486a2762..029eaf406a 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -435,6 +435,7 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, /* if enough space, pretend it was granted */ ungranted += bytes; rnb[n].flags |= OBD_BRW_GRANTED; + lnb[n].lnb_grant_used = bytes; CDEBUG(0, "idx %d ungranted=%lu\n",n,ungranted); rc = 0; continue; @@ -460,8 +461,9 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, * happens in filter_grant_commit() after the writes are done. */ *left -= ungranted; fed->fed_grant -= used; - fed->fed_pending += used; - exp->exp_obd->u.filter.fo_tot_pending += used; + fed->fed_pending += used + ungranted; + exp->exp_obd->u.filter.fo_tot_granted += ungranted; + exp->exp_obd->u.filter.fo_tot_pending += used + ungranted; CDEBUG(mask, "%s: cli %s/%p used: %lu ungranted: %lu grant: %lu dirty: %lu\n", diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index ab9e37b83d..bbf9e97c57 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -456,6 +456,8 @@ run_test 14d "chmod of executing file is still possible ========" test_15() { # bug 974 - ENOSPC echo "PATH=$PATH" sh oos2.sh $MOUNT1 $MOUNT2 + grant_error=`dmesg | grep "> available"` + [ -z "$grant_error" ] || error "$grant_error" } run_test 15 "test out-of-space with multiple writers ===========" -- GitLab