diff mbox

[RFC,3/4] dm thin: show the enabled status of keep_bio_blkcg feature

Message ID 1484910952-29820-4-git-send-email-houtao1@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Hou Tao Jan. 20, 2017, 11:15 a.m. UTC
If keep_bio_blkcg feature is enabled, we can ensure that
by STATUSTYPE_TABLE or STATUSTYPE_INFO command.

Signed-off-by: Hou Tao <houtao1@huawei.com>
---
 drivers/md/dm-thin.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 57d6202..140cdae 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -3760,7 +3760,7 @@  static void emit_flags(struct pool_features *pf, char *result,
 {
 	unsigned count = !pf->zero_new_blocks + !pf->discard_enabled +
 		!pf->discard_passdown + (pf->mode == PM_READ_ONLY) +
-		pf->error_if_no_space;
+		pf->error_if_no_space + pf->keep_bio_blkcg;
 	DMEMIT("%u ", count);
 
 	if (!pf->zero_new_blocks)
@@ -3777,6 +3777,9 @@  static void emit_flags(struct pool_features *pf, char *result,
 
 	if (pf->error_if_no_space)
 		DMEMIT("error_if_no_space ");
+
+	if (pf->keep_bio_blkcg)
+		DMEMIT("keep_bio_blkcg ");
 }
 
 /*
@@ -3885,6 +3888,9 @@  static void pool_status(struct dm_target *ti, status_type_t type,
 		else
 			DMEMIT("queue_if_no_space ");
 
+		if (pool->pf.keep_bio_blkcg)
+			DMEMIT("keep_bio_blkcg ");
+
 		if (dm_pool_metadata_needs_check(pool->pmd))
 			DMEMIT("needs_check ");
 		else