[Devel] [PATCH] ploop: move discard_* attributes in the tune_attributes group

Andrei Vagin avagin at openvz.org
Wed Feb 28 01:27:04 MSK 2018


state_attributes contains only readonly attrebutes,
all read-write attributes are in tune_attributes.

Reported-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 drivers/block/ploop/sysfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/ploop/sysfs.c b/drivers/block/ploop/sysfs.c
index 835558a..4899837 100644
--- a/drivers/block/ploop/sysfs.c
+++ b/drivers/block/ploop/sysfs.c
@@ -595,9 +595,6 @@ static struct attribute *state_attributes[] = {
 	_A(blockable_reqs),
 	_A(blocked_bios),
 	_A(freeze_state),
-	_A2(discard_granularity),
-	_A2(discard_alignment),
-	_A2(discard_zeroes_data),
 	NULL
 };
 
@@ -619,6 +616,9 @@ static struct attribute *tune_attributes[] = {
 	_A2(congestion_low_watermark),
 	_A2(max_active_requests),
 	_A2(push_backup_timeout),
+	_A2(discard_granularity),
+	_A2(discard_alignment),
+	_A2(discard_zeroes_data),
 	NULL
 };
 
-- 
1.8.3.1



More information about the Devel mailing list