* [Ocfs2-devel] remove bdevname
@ 2022-07-13 5:53 Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 1/9] block: stop using bdevname in bdev_write_inode Christoph Hellwig via Ocfs2-devel
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: Christoph Hellwig via Ocfs2-devel @ 2022-07-13 5:53 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
Hi Jens,
this series removes the final uses and the implementation of the bdevname()
function.
Diffstat:
block/bdev.c | 10 ++---
block/blk-lib.c | 6 +--
block/genhd.c | 23 ------------
drivers/block/drbd/drbd_req.c | 6 +--
drivers/block/pktcdvd.c | 10 +----
drivers/block/rnbd/rnbd-srv-dev.c | 1
drivers/block/rnbd/rnbd-srv-dev.h | 1
drivers/block/rnbd/rnbd-srv-sysfs.c | 5 +-
drivers/block/rnbd/rnbd-srv.c | 9 ++---
drivers/block/rnbd/rnbd-srv.h | 3 -
drivers/md/md.c | 2 -
drivers/md/raid1.c | 2 -
drivers/md/raid10.c | 2 -
fs/ext4/mmp.c | 9 ++---
fs/jbd2/journal.c | 6 ++-
fs/ocfs2/cluster/heartbeat.c | 64 ++++++++++++++++--------------------
include/linux/blkdev.h | 1
kernel/trace/blktrace.c | 4 +-
18 files changed, 62 insertions(+), 102 deletions(-)
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Ocfs2-devel] [PATCH 1/9] block: stop using bdevname in bdev_write_inode
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
@ 2022-07-13 5:53 ` Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 3/9] drbd: stop using bdevname in drbd_report_io_error Christoph Hellwig via Ocfs2-devel
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig via Ocfs2-devel @ 2022-07-13 5:53 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
Just use the %pg format specifier instead. Also reformat the
printk statement to be more readable.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/bdev.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/bdev.c b/block/bdev.c
index 5fe06c1f2def4..ce05175e71cea 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -54,12 +54,10 @@ static void bdev_write_inode(struct block_device *bdev)
while (inode->i_state & I_DIRTY) {
spin_unlock(&inode->i_lock);
ret = write_inode_now(inode, true);
- if (ret) {
- char name[BDEVNAME_SIZE];
- pr_warn_ratelimited("VFS: Dirty inode writeback failed "
- "for block device %s (err=%d).\n",
- bdevname(bdev, name), ret);
- }
+ if (ret)
+ pr_warn_ratelimited(
+ "VFS: Dirty inode writeback failed for block device %pg (err=%d).\n",
+ bdev, ret);
spin_lock(&inode->i_lock);
}
spin_unlock(&inode->i_lock);
--
2.30.2
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Ocfs2-devel] [PATCH 3/9] drbd: stop using bdevname in drbd_report_io_error
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 1/9] block: stop using bdevname in bdev_write_inode Christoph Hellwig via Ocfs2-devel
@ 2022-07-13 5:53 ` Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 5/9] pktcdvd: stop using bdevname in pkt_new_dev Christoph Hellwig via Ocfs2-devel
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig via Ocfs2-devel @ 2022-07-13 5:53 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
Just use the %pg format specifier instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/block/drbd/drbd_req.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index e64bcfba30ef3..6d8dd14458c69 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -523,16 +523,14 @@ static void mod_rq_state(struct drbd_request *req, struct bio_and_error *m,
static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req)
{
- char b[BDEVNAME_SIZE];
-
if (!__ratelimit(&drbd_ratelimit_state))
return;
- drbd_warn(device, "local %s IO error sector %llu+%u on %s\n",
+ drbd_warn(device, "local %s IO error sector %llu+%u on %pg\n",
(req->rq_state & RQ_WRITE) ? "WRITE" : "READ",
(unsigned long long)req->i.sector,
req->i.size >> 9,
- bdevname(device->ldev->backing_bdev, b));
+ device->ldev->backing_bdev);
}
/* Helper for HANDED_OVER_TO_NETWORK.
--
2.30.2
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Ocfs2-devel] [PATCH 5/9] pktcdvd: stop using bdevname in pkt_new_dev
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 1/9] block: stop using bdevname in bdev_write_inode Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 3/9] drbd: stop using bdevname in drbd_report_io_error Christoph Hellwig via Ocfs2-devel
@ 2022-07-13 5:53 ` Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 7/9] ocfs2/cluster: remove the hr_dev_name field from struct o2hb_region Christoph Hellwig via Ocfs2-devel
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig via Ocfs2-devel @ 2022-07-13 5:53 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
Just use the %pg format specifier instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/block/pktcdvd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index a7016ffce9a43..01a15dbd9cde2 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2519,7 +2519,6 @@ static int pkt_seq_show(struct seq_file *m, void *p)
static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
{
int i;
- char b[BDEVNAME_SIZE];
struct block_device *bdev;
struct scsi_device *sdev;
@@ -2532,8 +2531,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
if (!pd2)
continue;
if (pd2->bdev->bd_dev == dev) {
- pkt_err(pd, "%s already setup\n",
- bdevname(pd2->bdev, b));
+ pkt_err(pd, "%pg already setup\n", pd2->bdev);
return -EBUSY;
}
if (pd2->pkt_dev == dev) {
@@ -2568,7 +2566,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
}
proc_create_single_data(pd->name, 0, pkt_proc, pkt_seq_show, pd);
- pkt_dbg(1, pd, "writer mapped to %s\n", bdevname(bdev, b));
+ pkt_dbg(1, pd, "writer mapped to %pg\n", bdev);
return 0;
out_mem:
--
2.30.2
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Ocfs2-devel] [PATCH 7/9] ocfs2/cluster: remove the hr_dev_name field from struct o2hb_region
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
` (2 preceding siblings ...)
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 5/9] pktcdvd: stop using bdevname in pkt_new_dev Christoph Hellwig via Ocfs2-devel
@ 2022-07-13 5:53 ` Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 8/9] ext4: only initialize mmp_bdevname once Christoph Hellwig via Ocfs2-devel
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig via Ocfs2-devel @ 2022-07-13 5:53 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
Just print the block device name directly using the %pg format specifier.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/ocfs2/cluster/heartbeat.c | 64 +++++++++++++++++-------------------
1 file changed, 30 insertions(+), 34 deletions(-)
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index ea0e70c0fce09..5f83c0c0918c0 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -235,8 +235,6 @@ struct o2hb_region {
* (hr_steady_iterations == 0) within hr_unsteady_iterations */
atomic_t hr_unsteady_iterations;
- char hr_dev_name[BDEVNAME_SIZE];
-
unsigned int hr_timeout_ms;
/* randomized as the region goes up and down so that a node
@@ -287,8 +285,8 @@ static void o2hb_write_timeout(struct work_struct *work)
container_of(work, struct o2hb_region,
hr_write_timeout_work.work);
- mlog(ML_ERROR, "Heartbeat write timeout to device %s after %u "
- "milliseconds\n", reg->hr_dev_name,
+ mlog(ML_ERROR, "Heartbeat write timeout to device %pg after %u "
+ "milliseconds\n", reg->hr_bdev,
jiffies_to_msecs(jiffies - reg->hr_last_timeout_start));
if (o2hb_global_heartbeat_active()) {
@@ -383,9 +381,9 @@ static void o2hb_nego_timeout(struct work_struct *work)
if (master_node == o2nm_this_node()) {
if (!test_bit(master_node, reg->hr_nego_node_bitmap)) {
- printk(KERN_NOTICE "o2hb: node %d hb write hung for %ds on region %s (%s).\n",
+ printk(KERN_NOTICE "o2hb: node %d hb write hung for %ds on region %s (%pg).\n",
o2nm_this_node(), O2HB_NEGO_TIMEOUT_MS/1000,
- config_item_name(®->hr_item), reg->hr_dev_name);
+ config_item_name(®->hr_item), reg->hr_bdev);
set_bit(master_node, reg->hr_nego_node_bitmap);
}
if (memcmp(reg->hr_nego_node_bitmap, live_node_bitmap,
@@ -399,8 +397,8 @@ static void o2hb_nego_timeout(struct work_struct *work)
return;
}
- printk(KERN_NOTICE "o2hb: all nodes hb write hung, maybe region %s (%s) is down.\n",
- config_item_name(®->hr_item), reg->hr_dev_name);
+ printk(KERN_NOTICE "o2hb: all nodes hb write hung, maybe region %s (%pg) is down.\n",
+ config_item_name(®->hr_item), reg->hr_bdev);
/* approve negotiate timeout request. */
o2hb_arm_timeout(reg);
@@ -419,9 +417,9 @@ static void o2hb_nego_timeout(struct work_struct *work)
}
} else {
/* negotiate timeout with master node. */
- printk(KERN_NOTICE "o2hb: node %d hb write hung for %ds on region %s (%s), negotiate timeout with node %d.\n",
+ printk(KERN_NOTICE "o2hb: node %d hb write hung for %ds on region %s (%pg), negotiate timeout with node %d.\n",
o2nm_this_node(), O2HB_NEGO_TIMEOUT_MS/1000, config_item_name(®->hr_item),
- reg->hr_dev_name, master_node);
+ reg->hr_bdev, master_node);
ret = o2hb_send_nego_msg(reg->hr_key, O2HB_NEGO_TIMEOUT_MSG,
master_node);
if (ret)
@@ -437,8 +435,8 @@ static int o2hb_nego_timeout_handler(struct o2net_msg *msg, u32 len, void *data,
struct o2hb_nego_msg *nego_msg;
nego_msg = (struct o2hb_nego_msg *)msg->buf;
- printk(KERN_NOTICE "o2hb: receive negotiate timeout message from node %d on region %s (%s).\n",
- nego_msg->node_num, config_item_name(®->hr_item), reg->hr_dev_name);
+ printk(KERN_NOTICE "o2hb: receive negotiate timeout message from node %d on region %s (%pg).\n",
+ nego_msg->node_num, config_item_name(®->hr_item), reg->hr_bdev);
if (nego_msg->node_num < O2NM_MAX_NODES)
set_bit(nego_msg->node_num, reg->hr_nego_node_bitmap);
else
@@ -452,8 +450,8 @@ static int o2hb_nego_approve_handler(struct o2net_msg *msg, u32 len, void *data,
{
struct o2hb_region *reg = data;
- printk(KERN_NOTICE "o2hb: negotiate timeout approved by master node on region %s (%s).\n",
- config_item_name(®->hr_item), reg->hr_dev_name);
+ printk(KERN_NOTICE "o2hb: negotiate timeout approved by master node on region %s (%pg).\n",
+ config_item_name(®->hr_item), reg->hr_bdev);
o2hb_arm_timeout(reg);
return 0;
}
@@ -689,8 +687,8 @@ static int o2hb_check_own_slot(struct o2hb_region *reg)
else
errstr = ERRSTR3;
- mlog(ML_ERROR, "%s (%s): expected(%u:0x%llx, 0x%llx), "
- "ondisk(%u:0x%llx, 0x%llx)\n", errstr, reg->hr_dev_name,
+ mlog(ML_ERROR, "%s (%pg): expected(%u:0x%llx, 0x%llx), "
+ "ondisk(%u:0x%llx, 0x%llx)\n", errstr, reg->hr_bdev,
slot->ds_node_num, (unsigned long long)slot->ds_last_generation,
(unsigned long long)slot->ds_last_time, hb_block->hb_node,
(unsigned long long)le64_to_cpu(hb_block->hb_generation),
@@ -863,8 +861,8 @@ static void o2hb_set_quorum_device(struct o2hb_region *reg)
sizeof(o2hb_live_node_bitmap)))
goto unlock;
- printk(KERN_NOTICE "o2hb: Region %s (%s) is now a quorum device\n",
- config_item_name(®->hr_item), reg->hr_dev_name);
+ printk(KERN_NOTICE "o2hb: Region %s (%pg) is now a quorum device\n",
+ config_item_name(®->hr_item), reg->hr_bdev);
set_bit(reg->hr_region_num, o2hb_quorum_region_bitmap);
@@ -922,8 +920,8 @@ static int o2hb_check_slot(struct o2hb_region *reg,
/* The node is live but pushed out a bad crc. We
* consider it a transient miss but don't populate any
* other values as they may be junk. */
- mlog(ML_ERROR, "Node %d has written a bad crc to %s\n",
- slot->ds_node_num, reg->hr_dev_name);
+ mlog(ML_ERROR, "Node %d has written a bad crc to %pg\n",
+ slot->ds_node_num, reg->hr_bdev);
o2hb_dump_slot(hb_block);
slot->ds_equal_samples++;
@@ -1002,11 +1000,11 @@ static int o2hb_check_slot(struct o2hb_region *reg,
slot_dead_ms = le32_to_cpu(hb_block->hb_dead_ms);
if (slot_dead_ms && slot_dead_ms != dead_ms) {
/* TODO: Perhaps we can fail the region here. */
- mlog(ML_ERROR, "Node %d on device %s has a dead count "
+ mlog(ML_ERROR, "Node %d on device %pg has a dead count "
"of %u ms, but our count is %u ms.\n"
"Please double check your configuration values "
"for 'O2CB_HEARTBEAT_THRESHOLD'\n",
- slot->ds_node_num, reg->hr_dev_name, slot_dead_ms,
+ slot->ds_node_num, reg->hr_bdev, slot_dead_ms,
dead_ms);
}
goto out;
@@ -1145,8 +1143,8 @@ static int o2hb_do_disk_heartbeat(struct o2hb_region *reg)
/* Do not re-arm the write timeout on I/O error - we
* can't be sure that the new block ever made it to
* disk */
- mlog(ML_ERROR, "Write error %d on device \"%s\"\n",
- write_wc.wc_error, reg->hr_dev_name);
+ mlog(ML_ERROR, "Write error %d on device \"%pg\"\n",
+ write_wc.wc_error, reg->hr_bdev);
ret = write_wc.wc_error;
goto bail;
}
@@ -1170,9 +1168,9 @@ static int o2hb_do_disk_heartbeat(struct o2hb_region *reg)
if (atomic_read(®->hr_steady_iterations) != 0) {
if (atomic_dec_and_test(®->hr_unsteady_iterations)) {
printk(KERN_NOTICE "o2hb: Unable to stabilize "
- "heartbeat on region %s (%s)\n",
+ "heartbeat on region %s (%pg)\n",
config_item_name(®->hr_item),
- reg->hr_dev_name);
+ reg->hr_bdev);
atomic_set(®->hr_steady_iterations, 0);
reg->hr_aborted_start = 1;
wake_up(&o2hb_steady_queue);
@@ -1494,7 +1492,7 @@ static void o2hb_region_release(struct config_item *item)
struct page *page;
struct o2hb_region *reg = to_o2hb_region(item);
- mlog(ML_HEARTBEAT, "hb region release (%s)\n", reg->hr_dev_name);
+ mlog(ML_HEARTBEAT, "hb region release (%pg)\n", reg->hr_bdev);
kfree(reg->hr_tmp_block);
@@ -1641,7 +1639,7 @@ static ssize_t o2hb_region_dev_show(struct config_item *item, char *page)
unsigned int ret = 0;
if (to_o2hb_region(item)->hr_bdev)
- ret = sprintf(page, "%s\n", to_o2hb_region(item)->hr_dev_name);
+ ret = sprintf(page, "%pg\n", to_o2hb_region(item)->hr_bdev);
return ret;
}
@@ -1798,8 +1796,6 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
goto out2;
}
- bdevname(reg->hr_bdev, reg->hr_dev_name);
-
sectsize = bdev_logical_block_size(reg->hr_bdev);
if (sectsize != reg->hr_block_bytes) {
mlog(ML_ERROR,
@@ -1895,8 +1891,8 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
ret = -EIO;
if (hb_task && o2hb_global_heartbeat_active())
- printk(KERN_NOTICE "o2hb: Heartbeat started on region %s (%s)\n",
- config_item_name(®->hr_item), reg->hr_dev_name);
+ printk(KERN_NOTICE "o2hb: Heartbeat started on region %s (%pg)\n",
+ config_item_name(®->hr_item), reg->hr_bdev);
out3:
if (ret < 0) {
@@ -2088,10 +2084,10 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group,
quorum_region = 1;
clear_bit(reg->hr_region_num, o2hb_quorum_region_bitmap);
spin_unlock(&o2hb_live_lock);
- printk(KERN_NOTICE "o2hb: Heartbeat %s on region %s (%s)\n",
+ printk(KERN_NOTICE "o2hb: Heartbeat %s on region %s (%pg)\n",
((atomic_read(®->hr_steady_iterations) == 0) ?
"stopped" : "start aborted"), config_item_name(item),
- reg->hr_dev_name);
+ reg->hr_bdev);
}
/*
--
2.30.2
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Ocfs2-devel] [PATCH 8/9] ext4: only initialize mmp_bdevname once
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
` (3 preceding siblings ...)
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 7/9] ocfs2/cluster: remove the hr_dev_name field from struct o2hb_region Christoph Hellwig via Ocfs2-devel
@ 2022-07-13 5:53 ` Christoph Hellwig via Ocfs2-devel
2022-07-14 14:54 ` Theodore Ts'o via Ocfs2-devel
2022-07-13 7:27 ` [Ocfs2-devel] remove bdevname Johannes Thumshirn via Ocfs2-devel
` (2 subsequent siblings)
7 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig via Ocfs2-devel @ 2022-07-13 5:53 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
mmp_bdevname is currently both initialized nested inside the kthread_run
call in ext4_multi_mount_protect and in the kmmpd thread started by it.
Lift the initiaization out of the kthread_run call in
ext4_multi_mount_protect, move the BUILD_BUG_ON next to it and remove
the duplicate assignment inside of kmmpd.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/ext4/mmp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index 79d05e464c432..b7a850b0070b8 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -150,8 +150,6 @@ static int kmmpd(void *data)
mmp_check_interval = max(EXT4_MMP_CHECK_MULT * mmp_update_interval,
EXT4_MMP_MIN_CHECK_INTERVAL);
mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
- BUILD_BUG_ON(sizeof(mmp->mmp_bdevname) < BDEVNAME_SIZE);
- bdevname(bh->b_bdev, mmp->mmp_bdevname);
memcpy(mmp->mmp_nodename, init_utsname()->nodename,
sizeof(mmp->mmp_nodename));
@@ -372,13 +370,15 @@ int ext4_multi_mount_protect(struct super_block *sb,
EXT4_SB(sb)->s_mmp_bh = bh;
+ BUILD_BUG_ON(sizeof(mmp->mmp_bdevname) < BDEVNAME_SIZE);
+ bdevname(bh->b_bdev, mmp->mmp_bdevname);
+
/*
* Start a kernel thread to update the MMP block periodically.
*/
EXT4_SB(sb)->s_mmp_tsk = kthread_run(kmmpd, sb, "kmmpd-%.*s",
(int)sizeof(mmp->mmp_bdevname),
- bdevname(bh->b_bdev,
- mmp->mmp_bdevname));
+ mmp->mmp_bdevname);
if (IS_ERR(EXT4_SB(sb)->s_mmp_tsk)) {
EXT4_SB(sb)->s_mmp_tsk = NULL;
ext4_warning(sb, "Unable to create kmmpd thread for %s.",
--
2.30.2
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Ocfs2-devel] remove bdevname
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
` (4 preceding siblings ...)
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 8/9] ext4: only initialize mmp_bdevname once Christoph Hellwig via Ocfs2-devel
@ 2022-07-13 7:27 ` Johannes Thumshirn via Ocfs2-devel
2022-07-13 15:05 ` Jan Kara via Ocfs2-devel
2022-07-14 16:28 ` Jens Axboe via Ocfs2-devel
7 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn via Ocfs2-devel @ 2022-07-13 7:27 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
For the series:
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Ocfs2-devel] remove bdevname
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
` (5 preceding siblings ...)
2022-07-13 7:27 ` [Ocfs2-devel] remove bdevname Johannes Thumshirn via Ocfs2-devel
@ 2022-07-13 15:05 ` Jan Kara via Ocfs2-devel
2022-07-14 16:28 ` Jens Axboe via Ocfs2-devel
7 siblings, 0 replies; 10+ messages in thread
From: Jan Kara via Ocfs2-devel @ 2022-07-13 15:05 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, linux-block, Theodore Ts'o, Song Liu, linux-raid,
Christoph Böhmwalder, Md. Haris Iqbal, Jan Kara,
Andreas Dilger, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
On Wed 13-07-22 07:53:08, Christoph Hellwig wrote:
> Hi Jens,
>
> this series removes the final uses and the implementation of the bdevname()
> function.
All patches look good to me. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
>
> Diffstat:
> block/bdev.c | 10 ++---
> block/blk-lib.c | 6 +--
> block/genhd.c | 23 ------------
> drivers/block/drbd/drbd_req.c | 6 +--
> drivers/block/pktcdvd.c | 10 +----
> drivers/block/rnbd/rnbd-srv-dev.c | 1
> drivers/block/rnbd/rnbd-srv-dev.h | 1
> drivers/block/rnbd/rnbd-srv-sysfs.c | 5 +-
> drivers/block/rnbd/rnbd-srv.c | 9 ++---
> drivers/block/rnbd/rnbd-srv.h | 3 -
> drivers/md/md.c | 2 -
> drivers/md/raid1.c | 2 -
> drivers/md/raid10.c | 2 -
> fs/ext4/mmp.c | 9 ++---
> fs/jbd2/journal.c | 6 ++-
> fs/ocfs2/cluster/heartbeat.c | 64 ++++++++++++++++--------------------
> include/linux/blkdev.h | 1
> kernel/trace/blktrace.c | 4 +-
> 18 files changed, 62 insertions(+), 102 deletions(-)
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Ocfs2-devel] [PATCH 8/9] ext4: only initialize mmp_bdevname once
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 8/9] ext4: only initialize mmp_bdevname once Christoph Hellwig via Ocfs2-devel
@ 2022-07-14 14:54 ` Theodore Ts'o via Ocfs2-devel
0 siblings, 0 replies; 10+ messages in thread
From: Theodore Ts'o via Ocfs2-devel @ 2022-07-14 14:54 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, linux-block, linux-raid, Song Liu,
Christoph Böhmwalder, Andreas Dilger, Jan Kara,
Md. Haris Iqbal, linux-ext4, Jack Wang, ocfs2-devel, drbd-dev
On Wed, Jul 13, 2022 at 07:53:16AM +0200, Christoph Hellwig wrote:
> mmp_bdevname is currently both initialized nested inside the kthread_run
> call in ext4_multi_mount_protect and in the kmmpd thread started by it.
>
> Lift the initiaization out of the kthread_run call in
> ext4_multi_mount_protect, move the BUILD_BUG_ON next to it and remove
> the duplicate assignment inside of kmmpd.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Theodore Ts'o <tytso@mit.edu>
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Ocfs2-devel] remove bdevname
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
` (6 preceding siblings ...)
2022-07-13 15:05 ` Jan Kara via Ocfs2-devel
@ 2022-07-14 16:28 ` Jens Axboe via Ocfs2-devel
7 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe via Ocfs2-devel @ 2022-07-14 16:28 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-raid, tytso, song, linux-block, christoph.boehmwalder,
adilger.kernel, jack, haris.iqbal, linux-ext4, jinpu.wang,
ocfs2-devel, drbd-dev
On Wed, 13 Jul 2022 07:53:08 +0200, Christoph Hellwig wrote:
> this series removes the final uses and the implementation of the bdevname()
> function.
>
> Diffstat:
> block/bdev.c | 10 ++---
> block/blk-lib.c | 6 +--
> block/genhd.c | 23 ------------
> drivers/block/drbd/drbd_req.c | 6 +--
> drivers/block/pktcdvd.c | 10 +----
> drivers/block/rnbd/rnbd-srv-dev.c | 1
> drivers/block/rnbd/rnbd-srv-dev.h | 1
> drivers/block/rnbd/rnbd-srv-sysfs.c | 5 +-
> drivers/block/rnbd/rnbd-srv.c | 9 ++---
> drivers/block/rnbd/rnbd-srv.h | 3 -
> drivers/md/md.c | 2 -
> drivers/md/raid1.c | 2 -
> drivers/md/raid10.c | 2 -
> fs/ext4/mmp.c | 9 ++---
> fs/jbd2/journal.c | 6 ++-
> fs/ocfs2/cluster/heartbeat.c | 64 ++++++++++++++++--------------------
> include/linux/blkdev.h | 1
> kernel/trace/blktrace.c | 4 +-
> 18 files changed, 62 insertions(+), 102 deletions(-)
>
> [...]
Applied, thanks!
[1/9] block: stop using bdevname in bdev_write_inode
commit: 5bf83e9a14ddae994d783dee96b91bf46f04839c
[2/9] block: stop using bdevname in __blkdev_issue_discard
commit: 02ff3dd20f512cf811ae8028c44fdb212b5f2bf7
[3/9] drbd: stop using bdevname in drbd_report_io_error
commit: 1b70ccecaed4c3c50239e8409156fb447f965554
[4/9] pktcdvd: stop using bdevname in pkt_seq_show
commit: fa070a3b50a17506a230e72bd48dba89e7bb5fea
[5/9] pktcdvd: stop using bdevname in pkt_new_dev
commit: beecf70ee84363e92f3bf783b74da5f26e765d8d
[6/9] rnbd-srv: remove the name field from struct rnbd_dev
commit: 6e880cf59932a14bca128fc8e8faae0554932942
[7/9] ocfs2/cluster: remove the hr_dev_name field from struct o2hb_region
commit: 4664954c9421ce326bb5c84f175902b03f17237e
[8/9] ext4: only initialize mmp_bdevname once
commit: c5b045b9838972cc4c4985a32fa5d35ecf2ab15a
[9/9] block: remove bdevname
commit: 900d156bac2bc474cf7c7bee4efbc6c83ec5ae58
Best regards,
--
Jens Axboe
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-07-17 6:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 5:53 [Ocfs2-devel] remove bdevname Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 1/9] block: stop using bdevname in bdev_write_inode Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 3/9] drbd: stop using bdevname in drbd_report_io_error Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 5/9] pktcdvd: stop using bdevname in pkt_new_dev Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 7/9] ocfs2/cluster: remove the hr_dev_name field from struct o2hb_region Christoph Hellwig via Ocfs2-devel
2022-07-13 5:53 ` [Ocfs2-devel] [PATCH 8/9] ext4: only initialize mmp_bdevname once Christoph Hellwig via Ocfs2-devel
2022-07-14 14:54 ` Theodore Ts'o via Ocfs2-devel
2022-07-13 7:27 ` [Ocfs2-devel] remove bdevname Johannes Thumshirn via Ocfs2-devel
2022-07-13 15:05 ` Jan Kara via Ocfs2-devel
2022-07-14 16:28 ` Jens Axboe via Ocfs2-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).