Thread (4 messages) 4 messages, 2 authors, 2017-05-04

Re: [PATCH 1/2] bcache: name bcache devices in an ordered sequence as bcache0, bcache1

From: Coly Li <hidden>
Date: 2017-05-04 14:03:34

On 2017/4/10 下午4:36, tang.junhui@zte.com.cn wrote:
quoted hunk ↗ jump to hunk
From: "tang.junhui" <redacted>

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 <redacted>
---
 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;
Can I understand that the next patch just revert this modification ? If
yes, I suggest to combine these 2 patch into one.

-- 
Coly Li
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help