Skip to content
Snippets Groups Projects
Commit d2ec1330 authored by Yury Umanets's avatar Yury Umanets
Browse files

- added CERROR LBUG in filter_grant_check() from 1_4

parent 8225f96c
No related branches found
No related tags found
No related merge requests found
...@@ -406,7 +406,7 @@ static int filter_grant_check(struct obd_export *exp, int objcount, ...@@ -406,7 +406,7 @@ static int filter_grant_check(struct obd_export *exp, int objcount,
for (i = 0; i < fso[obj].fso_bufcnt; i++, n++) { for (i = 0; i < fso[obj].fso_bufcnt; i++, n++) {
int tmp, bytes; int tmp, bytes;
/* FIXME: this is calculated with PAGE_SIZE on client */ /* should match code in osc_exit_cache() */
bytes = rnb[n].len; bytes = rnb[n].len;
bytes += rnb[n].offset & (blocksize - 1); bytes += rnb[n].offset & (blocksize - 1);
tmp = (rnb[n].offset + rnb[n].len) & (blocksize - 1); tmp = (rnb[n].offset + rnb[n].len) & (blocksize - 1);
...@@ -485,6 +485,13 @@ static int filter_grant_check(struct obd_export *exp, int objcount, ...@@ -485,6 +485,13 @@ static int filter_grant_check(struct obd_export *exp, int objcount,
exp->exp_obd->u.filter.fo_tot_dirty -= used; exp->exp_obd->u.filter.fo_tot_dirty -= used;
fed->fed_dirty -= used; fed->fed_dirty -= used;
if (fed->fed_dirty < 0 || fed->fed_grant < 0 || fed->fed_pending < 0) {
CERROR("%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
fed->fed_dirty, fed->fed_pending, fed->fed_grant);
spin_unlock(&exp->exp_obd->obd_osfs_lock);
LBUG();
}
return rc; return rc;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment