From 42c04e8ee918adb6ce658334c12610e925466752 Mon Sep 17 00:00:00 2001 From: Dmitry Zogin Date: Fri, 8 Jan 2010 11:52:31 -0500 Subject: [PATCH] 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 --- lustre/osc/osc_request.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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), -- 1.8.3.1