[PATCH RFC 1/4] dm thin: add a pool feature "keep_bio_blkcg"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"keep_bio_blkcg" is used to control whether or not
dm-thin needs to save the original blkcg of bio

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

diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index d1c05c1..8178ee8 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -211,6 +211,7 @@ struct pool_features {
 	bool discard_enabled:1;
 	bool discard_passdown:1;
 	bool error_if_no_space:1;
+	bool keep_bio_blkcg:1;
 };
 
 struct thin_c;
@@ -277,6 +278,7 @@ struct pool {
 
 static enum pool_mode get_pool_mode(struct pool *pool);
 static void metadata_operation_failed(struct pool *pool, const char *op, int r);
+static bool keep_pool_bio_blkcg(struct pool *pool);
 
 /*
  * Target context for a pool.
@@ -2390,6 +2392,11 @@ static void noflush_work(struct thin_c *tc, void (*fn)(struct work_struct *))
 
 /*----------------------------------------------------------------*/
 
+static bool keep_pool_bio_blkcg(struct pool *pool)
+{
+	return pool->pf.keep_bio_blkcg;
+}
+
 static enum pool_mode get_pool_mode(struct pool *pool)
 {
 	return pool->pf.mode;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux