Whamcloud - gitweb
b=21656 Quiet dirty_max CERROR
authorDmitry Zogin <dmitry.zogin@sun.com>
Wed, 6 Jan 2010 16:28:31 +0000 (11:28 -0500)
committerJohann Lombardi <johann@sun.com>
Wed, 6 Jan 2010 16:55:00 +0000 (17:55 +0100)
 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

index 587656c..df25025 100644 (file)
@@ -715,7 +715,10 @@ static void osc_announce_cached(struct client_obd *cli, struct obdo *oa,
                 CERROR("dirty %lu > dirty_max %lu\n",
                        cli->cl_dirty, cli->cl_dirty_max);
                 oa->o_undirty = 0;
-        } else if (atomic_read(&obd_dirty_pages) > obd_max_dirty_pages) {
+        } else if (atomic_read(&obd_dirty_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 > system dirty_max %d\n",
                        atomic_read(&obd_dirty_pages), obd_max_dirty_pages);
                 oa->o_undirty = 0;