From: Dmitry Zogin Date: Fri, 8 Jan 2010 16:52:31 +0000 (-0500) Subject: b=21656 Quiet dirty_max CERROR X-Git-Tag: 1.10.0.35~26 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=42c04e8ee918adb6ce658334c12610e925466752;hp=4455a5cc9176d2a105a875095e9bbcb8f588c52e b=21656 Quiet dirty_max CERROR The atomic_read() allowing the atomic_inc() are not covered by a lock. Thus they may safely race and trip this CERROR() unless we add in a small fudge factor (+1). i=adilger i=dmitry.zogin --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index dea1edd..cd7fac6 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -769,7 +769,10 @@ static void osc_announce_cached(struct client_obd *cli, struct obdo *oa, cli->cl_dirty, cli->cl_dirty_transit, cli->cl_dirty_max); oa->o_undirty = 0; } else if (atomic_read(&obd_dirty_pages) - - atomic_read(&obd_dirty_transit_pages) > obd_max_dirty_pages){ + atomic_read(&obd_dirty_transit_pages) > obd_max_dirty_pages + 1){ + /* The atomic_read() allowing the atomic_inc() are not covered + * by a lock thus they may safely race and trip this CERROR() + * unless we add in a small fudge factor (+1). */ CERROR("dirty %d - %d > system dirty_max %d\n", atomic_read(&obd_dirty_pages), atomic_read(&obd_dirty_transit_pages),