From 727c189c596c2ce3e41eabdf81e12a31d6eaad3a Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 10 Mar 2013 11:04:10 +0100 Subject: [PATCH] Show the writeback flag and the discard flag. --- bcache-super-show.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bcache-super-show.c b/bcache-super-show.c index 011027ac..47c8b87c 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');