[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130509204437.GA5712@blackbox.djwong.org>
Date: Thu, 9 May 2013 13:44:38 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: Mike Snitzer <snitzer@...hat.com>
Cc: device-mapper development <dm-devel@...hat.com>,
Joe Thornber <thornber@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] dmcache: flush superblock stats when retrieving status
info
When userspace queries dmcache for stats info, we should ensure that all the
metadata gets flushed out of memory to disk. The current code neglects to
update the disk copy of the hit/miss counters.
Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
drivers/md/dm-cache-target.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1074409..4fb7b4c 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2451,6 +2451,7 @@ static void cache_status(struct dm_target *ti, status_type_t type,
case STATUSTYPE_INFO:
/* Commit to ensure statistics aren't out-of-date */
if (!(status_flags & DM_STATUS_NOFLUSH_FLAG) && !dm_suspended(ti)) {
+ save_stats(cache);
r = dm_cache_commit(cache->cmd, false);
if (r)
DMERR("could not commit metadata for accurate status");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists