summaryrefslogtreecommitdiff
path: root/libbcachefs/super.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-09 02:32:57 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2022-10-09 02:33:05 -0400
commit8d6138baac3b4fcd715c34cf325ae11b01a4ca67 (patch)
tree7b2aeefc77ca3c31e2686ca4bceaad13cd0a24d9 /libbcachefs/super.c
parent99caca2c70f312c4a2504a7e7a9c92a91426d885 (diff)
Update bcachefs sources to cbccc6d869 bcachefs: Ratelimit ec error message
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r--libbcachefs/super.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c
index b1809f8c..a824e160 100644
--- a/libbcachefs/super.c
+++ b/libbcachefs/super.c
@@ -1224,8 +1224,8 @@ static int bch2_dev_attach_bdev(struct bch_fs *c, struct bch_sb_handle *sb)
bch2_dev_sysfs_online(c, ca);
if (c->sb.nr_devices == 1)
- bdevname(ca->disk_sb.bdev, c->name);
- bdevname(ca->disk_sb.bdev, ca->name);
+ snprintf(c->name, sizeof(c->name), "%pg", ca->disk_sb.bdev);
+ snprintf(ca->name, sizeof(ca->name), "%pg", ca->disk_sb.bdev);
rebalance_wakeup(c);
return 0;
@@ -1867,9 +1867,7 @@ struct bch_fs *bch2_fs_open(char * const *devices, unsigned nr_devices,
while (i < nr_devices) {
if (i != best_sb &&
!bch2_dev_exists(sb[best_sb].sb, mi, sb[i].sb->dev_idx)) {
- char buf[BDEVNAME_SIZE];
- pr_info("%s has been removed, skipping",
- bdevname(sb[i].bdev, buf));
+ pr_info("%pg has been removed, skipping", sb[i].bdev);
bch2_free_super(&sb[i]);
array_remove_item(sb, nr_devices, i);
continue;