X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdfilter%2Ffilter_io.c;h=859e29090776f5ec3659974453669b5d64fbd57c;hp=268dec179bac3a91716e7b9a53be7bf3af000563;hb=655d5e708e01a77368459a1dd9c34fab5b6838b1;hpb=912fe8382d05e51b21b4a76c6e169ac145cacc19 diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index 268dec1..859e290 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -530,6 +530,14 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, int blocksize = exp->exp_obd->u.obt.obt_sb->s_blocksize; unsigned long used = 0, ungranted = 0, using; int i, rc = -ENOSPC, obj, n = 0; + int resend = 0; + + if ((oa->o_valid & OBD_MD_FLFLAGS) && + (oa->o_flags & OBD_FL_RECOV_RESEND)) { + resend = 1; + CDEBUG(D_CACHE, "Recoverable resend arrived, skipping " + "accounting\n"); + } LASSERT_SPIN_LOCKED(&exp->exp_obd->obd_osfs_lock); @@ -546,7 +554,12 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, if ((lnb[n].flags & OBD_BRW_FROM_GRANT) && (oa->o_valid & OBD_MD_FLGRANT)) { - if (fed->fed_grant < used + bytes) { + if (resend) { + /* this is a recoverable resent */ + lnb[n].flags |= OBD_BRW_GRANTED; + rc = 0; + continue; + } else if (fed->fed_grant < used + bytes) { CDEBUG(D_CACHE, "%s: cli %s/%p claims %ld+%d " "GRANT, real grant %lu idx %d\n",