[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-bcache
Subject:    [PATCH 1/2] bcache: name bcache devices in an ordered sequence as bcache0, bcache1
From:       tang.junhui () zte ! com ! cn
Date:       2017-04-10 8:36:37
Message-ID: 1491813398-7344-1-git-send-email-tang.junhui () zte ! com ! cn
[Download RAW message or body]

From: "tang.junhui" <tang.junhui@zte.com.cn>

Currently, names of bcache devices displayed as bcache0, bcache16,
bcache32, etc. This patch changes their names as bcache0, bcache1,
bcache2, etc.

Signed-off-by: tang.junhui <tang.junhui@zte.com.cn>
---
 drivers/md/bcache/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 3a19cbc..867d9a9 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -793,7 +793,7 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size,
 	}
 
 	set_capacity(d->disk, sectors);
-	snprintf(d->disk->disk_name, DISK_NAME_LEN, "bcache%i", minor);
+	snprintf(d->disk->disk_name, DISK_NAME_LEN, "bcache%i", minor / BCACHE_MINORS);
 
 	d->disk->major		= bcache_major;
 	d->disk->first_minor	= minor;
-- 
2.8.1.windows.1


--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic