Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618497 > unrolled thread
| Started by | lixiubo@cmss.chinamobile.com |
|---|---|
| First post | 2017-04-07 08:30 +0200 |
| Last post | 2017-04-07 08:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] bcache: Keep the labels the same in cache dev and cache set. lixiubo@cmss.chinamobile.com - 2017-04-07 08:30 +0200
| From | lixiubo@cmss.chinamobile.com |
|---|---|
| Date | 2017-04-07 08:30 +0200 |
| Subject | [PATCH] bcache: Keep the labels the same in cache dev and cache set. |
| Message-ID | <ttvzb-3um-1@gated-at.bofh.it> |
From: Xiubo Li <lixiubo@cmss.chinamobile.com>
Since the unusual characters from sysfs attributes have been stript
for dc superblock label, so should here.
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
---
drivers/md/bcache/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index f90f136..d449f37 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -249,7 +249,7 @@
bch_write_bdev_super(dc, NULL);
if (dc->disk.c) {
memcpy(dc->disk.c->uuids[dc->disk.id].label,
- buf, SB_LABEL_SIZE);
+ dc->sb.label, strlen(dc->sb.label));
bch_uuid_write(dc->disk.c);
}
env = kzalloc(sizeof(struct kobj_uevent_env), GFP_KERNEL);
--
1.8.3.1
Back to top | Article view | linux.kernel
csiph-web