[dm-devel] [PATCH] dm-writecache: report start_sector
Mikulas Patocka
mpatocka at redhat.com
Wed Jul 25 06:34:06 UTC 2018
BTW. we also need this patch to report the starting sectors in the
table arguments.
Report the starting sector in the status line.
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
---
drivers/md/dm-writecache.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-2.6/drivers/md/dm-writecache.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-writecache.c 2018-07-25 01:57:35.000000000 +0200
+++ linux-2.6/drivers/md/dm-writecache.c 2018-07-25 02:00:11.000000000 +0200
@@ -2244,6 +2244,8 @@ static void writecache_status(struct dm_
DMEMIT("%c %s %s %u ", WC_MODE_PMEM(wc) ? 'p' : 's',
wc->dev->name, wc->ssd_dev->name, wc->block_size);
extra_args = 0;
+ if (wc->start_sector)
+ extra_args += 2;
if (wc->high_wm_percent_set)
extra_args += 2;
if (wc->low_wm_percent_set)
@@ -2258,6 +2260,8 @@ static void writecache_status(struct dm_
extra_args++;
DMEMIT("%u", extra_args);
+ if (wc->start_sector)
+ DMEMIT(" start_sector %llu", (unsigned long long)wc->start_sector);
if (wc->high_wm_percent_set) {
x = (uint64_t)wc->freelist_high_watermark * 100;
x += wc->n_blocks / 2;
More information about the dm-devel
mailing list