summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2013-03-10 11:04:10 +0100
committerGabriel <g2p.code@gmail.com>2013-03-10 11:04:10 +0100
commit727c189c596c2ce3e41eabdf81e12a31d6eaad3a (patch)
tree2b58ea8f05c026db0ab3afa06e715bfb04dbb885
parent1b7cbd1d77fe98af022169a32c636aede2234030 (diff)
Show the writeback flag and the discard flag.
-rw-r--r--bcache-super-show.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/bcache-super-show.c b/bcache-super-show.c
index 011027a..47c8b87 100644
--- a/bcache-super-show.c
+++ b/bcache-super-show.c
@@ -131,13 +131,17 @@ int main(int argc, char **argv)
if (sb.version == 0) {
printf(
"dev.cache.first_bucket\t%u\n"
- "dev.cache.first_sector\t%u\n",
+ "dev.cache.first_sector\t%u\n"
+ "dev.cache.discard\t%s\n",
sb.first_bucket,
- sb.bucket_size * sb.first_bucket);
+ sb.bucket_size * sb.first_bucket,
+ CACHE_DISCARD(&sb) ? "yes" : "no");
} else if (sb.version == CACHE_BACKING_DEV) {
printf(
- "dev.data.first_sector\t%u\n",
- BDEV_DATA_START);
+ "dev.data.first_sector\t%u\n"
+ "dev.data.writeback\t%s\n",
+ BDEV_DATA_START,
+ BDEV_WRITEBACK(&sb) ? "yes" : "no");
}
putchar('\n');