* [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits
2023-08-08 13:56 [PATCH 0/5] Some minor cleanups Damien Le Moal
@ 2023-08-08 13:56 ` Damien Le Moal
2023-08-09 2:04 ` Chaitanya Kulkarni
` (2 more replies)
2023-08-08 13:56 ` [PATCH 2/5] block: use pr_xxx() instead of printk() Damien Le Moal
` (3 subsequent siblings)
4 siblings, 3 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-08 13:56 UTC (permalink / raw)
To: Jens Axboe, linux-block
Replace occurences of "PAGE_SHIFT - 9" in blk-settings.c with the
cleaner PAGE_SECTORS_SHIFT macro.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/blk-settings.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 0046b447268f..5e2dbd34436b 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -126,7 +126,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
unsigned int max_sectors;
if ((max_hw_sectors << 9) < PAGE_SIZE) {
- max_hw_sectors = 1 << (PAGE_SHIFT - 9);
+ max_hw_sectors = 1 << PAGE_SECTORS_SHIFT;
printk(KERN_INFO "%s: set to minimum %d\n",
__func__, max_hw_sectors);
}
@@ -148,7 +148,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
if (!q->disk)
return;
- q->disk->bdi->io_pages = max_sectors >> (PAGE_SHIFT - 9);
+ q->disk->bdi->io_pages = max_sectors >> PAGE_SECTORS_SHIFT;
}
EXPORT_SYMBOL(blk_queue_max_hw_sectors);
@@ -398,7 +398,7 @@ void disk_update_readahead(struct gendisk *disk)
*/
disk->bdi->ra_pages =
max(queue_io_opt(q) * 2 / PAGE_SIZE, VM_READAHEAD_PAGES);
- disk->bdi->io_pages = queue_max_sectors(q) >> (PAGE_SHIFT - 9);
+ disk->bdi->io_pages = queue_max_sectors(q) >> PAGE_SECTORS_SHIFT;
}
EXPORT_SYMBOL_GPL(disk_update_readahead);
--
2.41.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits
2023-08-08 13:56 ` [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits Damien Le Moal
@ 2023-08-09 2:04 ` Chaitanya Kulkarni
2023-08-09 6:07 ` Hannes Reinecke
2023-08-15 10:00 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-09 2:04 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
On 8/8/2023 6:56 AM, Damien Le Moal wrote:
> Replace occurences of "PAGE_SHIFT - 9" in blk-settings.c with the
> cleaner PAGE_SECTORS_SHIFT macro.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits
2023-08-08 13:56 ` [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits Damien Le Moal
2023-08-09 2:04 ` Chaitanya Kulkarni
@ 2023-08-09 6:07 ` Hannes Reinecke
2023-08-15 10:00 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Hannes Reinecke @ 2023-08-09 6:07 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block
On 8/8/23 15:56, Damien Le Moal wrote:
> Replace occurences of "PAGE_SHIFT - 9" in blk-settings.c with the
> cleaner PAGE_SECTORS_SHIFT macro.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/blk-settings.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits
2023-08-08 13:56 ` [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits Damien Le Moal
2023-08-09 2:04 ` Chaitanya Kulkarni
2023-08-09 6:07 ` Hannes Reinecke
@ 2023-08-15 10:00 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Johannes Thumshirn @ 2023-08-15 10:00 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 2/5] block: use pr_xxx() instead of printk()
2023-08-08 13:56 [PATCH 0/5] Some minor cleanups Damien Le Moal
2023-08-08 13:56 ` [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits Damien Le Moal
@ 2023-08-08 13:56 ` Damien Le Moal
2023-08-09 2:06 ` Chaitanya Kulkarni
` (2 more replies)
2023-08-08 13:57 ` [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code Damien Le Moal
` (2 subsequent siblings)
4 siblings, 3 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-08 13:56 UTC (permalink / raw)
To: Jens Axboe, linux-block
Replace the remaining calls to printk() in the block layer core code
with the equivalent pr_info(), pr_err() etc calls. The early block
device lookup code in early-lookup.c is left untouched and continues
using raw printk() calls.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/bio-integrity.c | 11 +++++++----
block/blk-ioc.c | 5 ++++-
block/blk-mq.c | 25 ++++++++++++++-----------
block/blk-settings.c | 19 +++++++++++--------
block/bsg.c | 7 +++++--
block/elevator.c | 5 ++++-
block/genhd.c | 7 +++++--
7 files changed, 50 insertions(+), 29 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 045553a164e0..a2b5213d1ae8 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -14,6 +14,9 @@
#include <linux/slab.h>
#include "blk.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "bio-integrity: " fmt
+
static struct kmem_cache *bip_slab;
static struct workqueue_struct *kintegrityd_wq;
@@ -126,7 +129,7 @@ int bio_integrity_add_page(struct bio *bio, struct page *page,
struct bio_integrity_payload *bip = bio_integrity(bio);
if (bip->bip_vcnt >= bip->bip_max_vcnt) {
- printk(KERN_ERR "%s: bip_vec full\n", __func__);
+ pr_err("%s: bip_vec full\n", __func__);
return 0;
}
@@ -227,7 +230,7 @@ bool bio_integrity_prep(struct bio *bio)
len = bio_integrity_bytes(bi, bio_sectors(bio));
buf = kmalloc(len, GFP_NOIO);
if (unlikely(buf == NULL)) {
- printk(KERN_ERR "could not allocate integrity buffer\n");
+ pr_err("could not allocate integrity buffer\n");
goto err_end_io;
}
@@ -238,7 +241,7 @@ bool bio_integrity_prep(struct bio *bio)
/* Allocate bio integrity payload and integrity vectors */
bip = bio_integrity_alloc(bio, GFP_NOIO, nr_pages);
if (IS_ERR(bip)) {
- printk(KERN_ERR "could not allocate data integrity bioset\n");
+ pr_err("could not allocate data integrity bioset\n");
kfree(buf);
goto err_end_io;
}
@@ -266,7 +269,7 @@ bool bio_integrity_prep(struct bio *bio)
bytes, offset);
if (ret == 0) {
- printk(KERN_ERR "could not attach integrity payload\n");
+ pr_err("could not attach integrity payload\n");
goto err_end_io;
}
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 25dd4db11121..b1c17b56396c 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -14,6 +14,9 @@
#include "blk.h"
#include "blk-mq-sched.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "blk-ioc: " fmt
+
/*
* For io context allocations
*/
@@ -395,7 +398,7 @@ static struct io_cq *ioc_create_icq(struct request_queue *q)
kmem_cache_free(et->icq_cache, icq);
icq = ioc_lookup_icq(q);
if (!icq)
- printk(KERN_ERR "cfq: icq link failed!\n");
+ pr_err("icq link failed!\n");
}
spin_unlock(&ioc->lock);
diff --git a/block/blk-mq.c b/block/blk-mq.c
index f14b8669ac69..26eb36e3e12e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -42,6 +42,9 @@
#include "blk-rq-qos.h"
#include "blk-ioprio.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "blk-mq: " fmt
+
static DEFINE_PER_CPU(struct llist_head, blk_cpu_done);
static DEFINE_PER_CPU(call_single_data_t, blk_cpu_csd);
@@ -733,15 +736,15 @@ void blk_mq_free_plug_rqs(struct blk_plug *plug)
void blk_dump_rq_flags(struct request *rq, char *msg)
{
- printk(KERN_INFO "%s: dev %s: flags=%llx\n", msg,
+ pr_info("%s: dev %s: flags=%llx\n", msg,
rq->q->disk ? rq->q->disk->disk_name : "?",
(__force unsigned long long) rq->cmd_flags);
- printk(KERN_INFO " sector %llu, nr/cnr %u/%u\n",
- (unsigned long long)blk_rq_pos(rq),
- blk_rq_sectors(rq), blk_rq_cur_sectors(rq));
- printk(KERN_INFO " bio %p, biotail %p, len %u\n",
- rq->bio, rq->biotail, blk_rq_bytes(rq));
+ pr_info(" sector %llu, nr/cnr %u/%u\n",
+ (unsigned long long)blk_rq_pos(rq),
+ blk_rq_sectors(rq), blk_rq_cur_sectors(rq));
+ pr_info(" bio %p, biotail %p, len %u\n",
+ rq->bio, rq->biotail, blk_rq_bytes(rq));
}
EXPORT_SYMBOL(blk_dump_rq_flags);
@@ -783,7 +786,7 @@ static void blk_account_io_completion(struct request *req, unsigned int bytes)
static void blk_print_req_error(struct request *req, blk_status_t status)
{
- printk_ratelimited(KERN_ERR
+ pr_err_ratelimited(
"%s error, dev %s, sector %llu op 0x%x:(%s) flags 0x%x "
"phys_seg %u prio class %u\n",
blk_status_to_str(status),
@@ -3032,8 +3035,8 @@ blk_status_t blk_insert_cloned_request(struct request *rq)
if (max_sectors == 0)
return BLK_STS_NOTSUPP;
- printk(KERN_ERR "%s: over max size limit. (%u > %u)\n",
- __func__, blk_rq_sectors(rq), max_sectors);
+ pr_err("%s: over max size limit. (%u > %u)\n",
+ __func__, blk_rq_sectors(rq), max_sectors);
return BLK_STS_IOERR;
}
@@ -3043,8 +3046,8 @@ blk_status_t blk_insert_cloned_request(struct request *rq)
*/
rq->nr_phys_segments = blk_recalc_rq_segments(rq);
if (rq->nr_phys_segments > max_segments) {
- printk(KERN_ERR "%s: over max segments limit. (%u > %u)\n",
- __func__, rq->nr_phys_segments, max_segments);
+ pr_err("%s: over max segments limit. (%u > %u)\n",
+ __func__, rq->nr_phys_segments, max_segments);
return BLK_STS_IOERR;
}
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 5e2dbd34436b..25d119187eab 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -19,6 +19,9 @@
#include "blk-rq-qos.h"
#include "blk-wbt.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "blk-settings: " fmt
+
void blk_queue_rq_timeout(struct request_queue *q, unsigned int timeout)
{
q->rq_timeout = timeout;
@@ -127,8 +130,8 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
if ((max_hw_sectors << 9) < PAGE_SIZE) {
max_hw_sectors = 1 << PAGE_SECTORS_SHIFT;
- printk(KERN_INFO "%s: set to minimum %d\n",
- __func__, max_hw_sectors);
+ pr_info("Set max_hw_sectors to minimum %u\n",
+ max_hw_sectors);
}
max_hw_sectors = round_down(max_hw_sectors,
@@ -248,8 +251,8 @@ void blk_queue_max_segments(struct request_queue *q, unsigned short max_segments
{
if (!max_segments) {
max_segments = 1;
- printk(KERN_INFO "%s: set to minimum %d\n",
- __func__, max_segments);
+ pr_info("Set max_segments to minimum %u\n",
+ max_segments);
}
q->limits.max_segments = max_segments;
@@ -285,8 +288,8 @@ void blk_queue_max_segment_size(struct request_queue *q, unsigned int max_size)
{
if (max_size < PAGE_SIZE) {
max_size = PAGE_SIZE;
- printk(KERN_INFO "%s: set to minimum %d\n",
- __func__, max_size);
+ pr_info("Set max_segment_size to minimum %u\n",
+ max_size);
}
/* see blk_queue_virt_boundary() for the explanation */
@@ -740,8 +743,8 @@ void blk_queue_segment_boundary(struct request_queue *q, unsigned long mask)
{
if (mask < PAGE_SIZE - 1) {
mask = PAGE_SIZE - 1;
- printk(KERN_INFO "%s: set to minimum %lx\n",
- __func__, mask);
+ pr_info("Set segment_boundary to minimum %lx\n",
+ mask);
}
q->limits.seg_boundary_mask = mask;
diff --git a/block/bsg.c b/block/bsg.c
index 72157a59b788..298fe90923b8 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -17,6 +17,9 @@
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
+#undef pr_fmt
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#define BSG_DESCRIPTION "Block layer SCSI generic (bsg) driver"
#define BSG_VERSION "0.4"
@@ -261,8 +264,8 @@ static int __init bsg_init(void)
goto destroy_bsg_class;
bsg_major = MAJOR(devid);
- printk(KERN_INFO BSG_DESCRIPTION " version " BSG_VERSION
- " loaded (major %d)\n", bsg_major);
+ pr_info(BSG_DESCRIPTION " version " BSG_VERSION
+ " loaded (major %d)\n", bsg_major);
return 0;
destroy_bsg_class:
diff --git a/block/elevator.c b/block/elevator.c
index 8400e303fbcb..3b7ec9fb1abf 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -45,6 +45,9 @@
#include "blk-wbt.h"
#include "blk-cgroup.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "elevator: " fmt
+
static DEFINE_SPINLOCK(elv_list_lock);
static LIST_HEAD(elv_list);
@@ -527,7 +530,7 @@ int elv_register(struct elevator_type *e)
list_add_tail(&e->list, &elv_list);
spin_unlock(&elv_list_lock);
- printk(KERN_INFO "io scheduler %s registered\n", e->elevator_name);
+ pr_info("io scheduler %s registered\n", e->elevator_name);
return 0;
}
diff --git a/block/genhd.c b/block/genhd.c
index 3d287b32d50d..4653d94b1751 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -33,6 +33,9 @@
#include "blk-rq-qos.h"
#include "blk-cgroup.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "genhd: " fmt
+
static struct kobject *block_depr;
/*
@@ -227,7 +230,7 @@ int __register_blkdev(unsigned int major, const char *name,
}
if (index == 0) {
- printk("%s: failed to get major for %s\n",
+ pr_err("%s: Failed to get major for %s\n",
__func__, name);
ret = -EBUSY;
goto out;
@@ -270,7 +273,7 @@ int __register_blkdev(unsigned int major, const char *name,
spin_unlock(&major_names_spinlock);
if (ret < 0) {
- printk("register_blkdev: cannot get major %u for %s\n",
+ pr_err("register_blkdev: cannot get major %u for %s\n",
major, name);
kfree(p);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 2/5] block: use pr_xxx() instead of printk()
2023-08-08 13:56 ` [PATCH 2/5] block: use pr_xxx() instead of printk() Damien Le Moal
@ 2023-08-09 2:06 ` Chaitanya Kulkarni
2023-08-09 6:08 ` Hannes Reinecke
2023-08-15 10:01 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-09 2:06 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
On 8/8/2023 6:56 AM, Damien Le Moal wrote:
> Replace the remaining calls to printk() in the block layer core code
> with the equivalent pr_info(), pr_err() etc calls. The early block
> device lookup code in early-lookup.c is left untouched and continues
> using raw printk() calls.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/5] block: use pr_xxx() instead of printk()
2023-08-08 13:56 ` [PATCH 2/5] block: use pr_xxx() instead of printk() Damien Le Moal
2023-08-09 2:06 ` Chaitanya Kulkarni
@ 2023-08-09 6:08 ` Hannes Reinecke
2023-08-15 10:01 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Hannes Reinecke @ 2023-08-09 6:08 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block
On 8/8/23 15:56, Damien Le Moal wrote:
> Replace the remaining calls to printk() in the block layer core code
> with the equivalent pr_info(), pr_err() etc calls. The early block
> device lookup code in early-lookup.c is left untouched and continues
> using raw printk() calls.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/bio-integrity.c | 11 +++++++----
> block/blk-ioc.c | 5 ++++-
> block/blk-mq.c | 25 ++++++++++++++-----------
> block/blk-settings.c | 19 +++++++++++--------
> block/bsg.c | 7 +++++--
> block/elevator.c | 5 ++++-
> block/genhd.c | 7 +++++--
> 7 files changed, 50 insertions(+), 29 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/5] block: use pr_xxx() instead of printk()
2023-08-08 13:56 ` [PATCH 2/5] block: use pr_xxx() instead of printk() Damien Le Moal
2023-08-09 2:06 ` Chaitanya Kulkarni
2023-08-09 6:08 ` Hannes Reinecke
@ 2023-08-15 10:01 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Johannes Thumshirn @ 2023-08-15 10:01 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code
2023-08-08 13:56 [PATCH 0/5] Some minor cleanups Damien Le Moal
2023-08-08 13:56 ` [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits Damien Le Moal
2023-08-08 13:56 ` [PATCH 2/5] block: use pr_xxx() instead of printk() Damien Le Moal
@ 2023-08-08 13:57 ` Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
` (2 more replies)
2023-08-08 13:57 ` [PATCH 4/5] block: Improve efi partition debug messages Damien Le Moal
2023-08-08 13:57 ` [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions Damien Le Moal
4 siblings, 3 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-08 13:57 UTC (permalink / raw)
To: Jens Axboe, linux-block
Replace calls to printk() in the core, atari, efi and sun partition
code with the equivalent pr_info(), pr_err() etc calls. For each
partition type, the pr_fmt message prefix is defined as "partition: xxx:
" where "xxx" is the partition type name.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/partitions/atari.c | 11 +++++++----
block/partitions/check.h | 1 +
block/partitions/core.c | 33 ++++++++++++++++-----------------
block/partitions/sgi.c | 7 +++++--
block/partitions/sun.c | 5 ++++-
5 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/block/partitions/atari.c b/block/partitions/atari.c
index 9655c728262a..e48eec5b9fd0 100644
--- a/block/partitions/atari.c
+++ b/block/partitions/atari.c
@@ -12,6 +12,9 @@
#include "check.h"
#include "atari.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "partition: atari: " fmt
+
/* ++guenther: this should be settable by the user ("make config")?.
*/
#define ICD_PARTS
@@ -94,14 +97,14 @@ int atari_partition(struct parsed_partitions *state)
while (1) {
xrs = read_part_sector(state, partsect, §2);
if (!xrs) {
- printk (" block %ld read failed\n", partsect);
+ pr_err(" block %ld read failed\n", partsect);
put_dev_sector(sect);
return -1;
}
/* ++roman: sanity check: bit 0 of flg field must be set */
if (!(xrs->part[0].flg & 1)) {
- printk( "\nFirst sub-partition in extended partition is not valid!\n" );
+ pr_err("\nFirst sub-partition in extended partition is not valid!\n");
put_dev_sector(sect2);
break;
}
@@ -116,7 +119,7 @@ int atari_partition(struct parsed_partitions *state)
break;
}
if (memcmp( xrs->part[1].id, "XGM", 3 ) != 0) {
- printk("\nID of extended partition is not XGM!\n");
+ pr_err("\nID of extended partition is not XGM!\n");
put_dev_sector(sect2);
break;
}
@@ -124,7 +127,7 @@ int atari_partition(struct parsed_partitions *state)
partsect = be32_to_cpu(xrs->part[1].st) + extensect;
put_dev_sector(sect2);
if (++slot == state->limit) {
- printk( "\nMaximum number of partitions reached!\n" );
+ pr_err("\nMaximum number of partitions reached!\n");
break;
}
}
diff --git a/block/partitions/check.h b/block/partitions/check.h
index 8d70a880c372..33c065339edc 100644
--- a/block/partitions/check.h
+++ b/block/partitions/check.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/pagemap.h>
#include <linux/blkdev.h>
+#include <linux/printk.h>
#include "../blk.h"
/*
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 13a7341299a9..fcf0cf321350 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -12,6 +12,9 @@
#include <linux/raid/detect.h>
#include "check.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "partition: " fmt
+
static int (*const check_part[])(struct parsed_partitions *) = {
/*
* Probe partition formats with tables at disk address 0
@@ -147,8 +150,7 @@ static struct parsed_partitions *check_partition(struct gendisk *hd)
}
if (res > 0) {
- printk(KERN_INFO "%s", state->pp_buf);
-
+ pr_info("%s", state->pp_buf);
free_page((unsigned long)state->pp_buf);
return state;
}
@@ -162,7 +164,7 @@ static struct parsed_partitions *check_partition(struct gendisk *hd)
if (res) {
strlcat(state->pp_buf,
" unable to read partition table\n", PAGE_SIZE);
- printk(KERN_INFO "%s", state->pp_buf);
+ pr_info("%s", state->pp_buf);
}
free_page((unsigned long)state->pp_buf);
@@ -526,11 +528,11 @@ static bool disk_unlock_native_capacity(struct gendisk *disk)
{
if (!disk->fops->unlock_native_capacity ||
test_and_set_bit(GD_NATIVE_CAPACITY, &disk->state)) {
- printk(KERN_CONT "truncated\n");
+ pr_cont("truncated\n");
return false;
}
- printk(KERN_CONT "enabling native capacity\n");
+ pr_cont("enabling native capacity\n");
disk->fops->unlock_native_capacity(disk);
return true;
}
@@ -546,18 +548,16 @@ static bool blk_add_partition(struct gendisk *disk,
return true;
if (from >= get_capacity(disk)) {
- printk(KERN_WARNING
- "%s: p%d start %llu is beyond EOD, ",
- disk->disk_name, p, (unsigned long long) from);
+ pr_warn("%s: p%d start %llu is beyond EOD, ",
+ disk->disk_name, p, (unsigned long long) from);
if (disk_unlock_native_capacity(disk))
return false;
return true;
}
if (from + size > get_capacity(disk)) {
- printk(KERN_WARNING
- "%s: p%d size %llu extends beyond EOD, ",
- disk->disk_name, p, (unsigned long long) size);
+ pr_warn("%s: p%d size %llu extends beyond EOD, ",
+ disk->disk_name, p, (unsigned long long) size);
if (disk_unlock_native_capacity(disk))
return false;
@@ -573,7 +573,7 @@ static bool blk_add_partition(struct gendisk *disk,
part = add_partition(disk, p, from, size, state->parts[p].flags,
&state->parts[p].info);
if (IS_ERR(part) && PTR_ERR(part) != -ENXIO) {
- printk(KERN_ERR " %s: p%d could not be added: %ld\n",
+ pr_err(" %s: p%d could not be added: %ld\n",
disk->disk_name, p, -PTR_ERR(part));
return true;
}
@@ -605,8 +605,8 @@ static int blk_add_partitions(struct gendisk *disk)
* beyond EOD, retry after unlocking the native capacity.
*/
if (PTR_ERR(state) == -ENOSPC) {
- printk(KERN_WARNING "%s: partition table beyond EOD, ",
- disk->disk_name);
+ pr_warn("%s: partition table beyond EOD, ",
+ disk->disk_name);
if (disk_unlock_native_capacity(disk))
return -EAGAIN;
}
@@ -629,9 +629,8 @@ static int blk_add_partitions(struct gendisk *disk)
* partitions.
*/
if (state->access_beyond_eod) {
- printk(KERN_WARNING
- "%s: partition table partially beyond EOD, ",
- disk->disk_name);
+ pr_warn("%s: partition table partially beyond EOD, ",
+ disk->disk_name);
if (disk_unlock_native_capacity(disk))
goto out_free_state;
}
diff --git a/block/partitions/sgi.c b/block/partitions/sgi.c
index 9cc6b8c1eea4..598d3480aaeb 100644
--- a/block/partitions/sgi.c
+++ b/block/partitions/sgi.c
@@ -7,6 +7,9 @@
#include "check.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "partition: sgi: " fmt
+
#define SGI_LABEL_MAGIC 0x0be5a941
enum {
@@ -61,8 +64,8 @@ int sgi_partition(struct parsed_partitions *state)
csum += be32_to_cpu(cs);
}
if(csum) {
- printk(KERN_WARNING "Dev %s SGI disklabel: csum bad, label corrupted\n",
- state->disk->disk_name);
+ pr_warn("Dev %s SGI disklabel: csum bad, label corrupted\n",
+ state->disk->disk_name);
put_dev_sector(sect);
return 0;
}
diff --git a/block/partitions/sun.c b/block/partitions/sun.c
index ddf9e6def4b2..ca3e57f63938 100644
--- a/block/partitions/sun.c
+++ b/block/partitions/sun.c
@@ -10,6 +10,9 @@
#include "check.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "partition: sun: " fmt
+
#define SUN_LABEL_MAGIC 0xDABE
#define SUN_VTOC_SANITY 0x600DDEEE
@@ -84,7 +87,7 @@ int sun_partition(struct parsed_partitions *state)
for (csum = 0; ush >= ((__be16 *) label);)
csum ^= *ush--;
if (csum) {
- printk("Dev %s Sun disklabel: Csum bad, label corrupted\n",
+ pr_err("Dev %s Sun disklabel: Csum bad, label corrupted\n",
state->disk->disk_name);
put_dev_sector(sect);
return 0;
--
2.41.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code
2023-08-08 13:57 ` [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code Damien Le Moal
@ 2023-08-09 2:07 ` Chaitanya Kulkarni
2023-08-09 3:42 ` Damien Le Moal
2023-08-09 6:09 ` Hannes Reinecke
2023-08-15 10:02 ` Johannes Thumshirn
2 siblings, 1 reply; 23+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-09 2:07 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
On 8/8/2023 6:57 AM, Damien Le Moal wrote:
> Replace calls to printk() in the core, atari, efi and sun partition
> code with the equivalent pr_info(), pr_err() etc calls. For each
> partition type, the pr_fmt message prefix is defined as "partition: xxx:
> " where "xxx" is the partition type name.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
why not merge with previous patch ?
either way :-
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code
2023-08-09 2:07 ` Chaitanya Kulkarni
@ 2023-08-09 3:42 ` Damien Le Moal
0 siblings, 0 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-09 3:42 UTC (permalink / raw)
To: Chaitanya Kulkarni, Jens Axboe, linux-block@vger.kernel.org
On 8/9/23 11:07, Chaitanya Kulkarni wrote:
> On 8/8/2023 6:57 AM, Damien Le Moal wrote:
>> Replace calls to printk() in the core, atari, efi and sun partition
>> code with the equivalent pr_info(), pr_err() etc calls. For each
>> partition type, the pr_fmt message prefix is defined as "partition: xxx:
>> " where "xxx" is the partition type name.
>>
>> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
>> ---
>
> why not merge with previous patch ?
To make the patches smaller and easier to review. I can merge if everyone is OK
with that.
>
> either way :-
>
> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
>
> -ck
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code
2023-08-08 13:57 ` [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
@ 2023-08-09 6:09 ` Hannes Reinecke
2023-08-15 10:02 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Hannes Reinecke @ 2023-08-09 6:09 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block
On 8/8/23 15:57, Damien Le Moal wrote:
> Replace calls to printk() in the core, atari, efi and sun partition
> code with the equivalent pr_info(), pr_err() etc calls. For each
> partition type, the pr_fmt message prefix is defined as "partition: xxx:
> " where "xxx" is the partition type name.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/partitions/atari.c | 11 +++++++----
> block/partitions/check.h | 1 +
> block/partitions/core.c | 33 ++++++++++++++++-----------------
> block/partitions/sgi.c | 7 +++++--
> block/partitions/sun.c | 5 ++++-
> 5 files changed, 33 insertions(+), 24 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code
2023-08-08 13:57 ` [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
2023-08-09 6:09 ` Hannes Reinecke
@ 2023-08-15 10:02 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Johannes Thumshirn @ 2023-08-15 10:02 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/5] block: Improve efi partition debug messages
2023-08-08 13:56 [PATCH 0/5] Some minor cleanups Damien Le Moal
` (2 preceding siblings ...)
2023-08-08 13:57 ` [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code Damien Le Moal
@ 2023-08-08 13:57 ` Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
` (2 more replies)
2023-08-08 13:57 ` [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions Damien Le Moal
4 siblings, 3 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-08 13:57 UTC (permalink / raw)
To: Jens Axboe, linux-block
Add the missing definition of pr_fmt to prefix the debug messages from
partitions/efi.c with "partition: efi: ".
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/partitions/efi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index 5e9be13a56a8..33fe70282e38 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -90,6 +90,9 @@
#include "check.h"
#include "efi.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "partition: efi: " fmt
+
/* This allows a kernel command line option 'gpt' to override
* the test for invalid PMBR. Not __initdata because reloading
* the partition tables happens after init too.
--
2.41.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 4/5] block: Improve efi partition debug messages
2023-08-08 13:57 ` [PATCH 4/5] block: Improve efi partition debug messages Damien Le Moal
@ 2023-08-09 2:07 ` Chaitanya Kulkarni
2023-08-09 6:09 ` Hannes Reinecke
2023-08-15 10:03 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-09 2:07 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
On 8/8/2023 6:57 AM, Damien Le Moal wrote:
> Add the missing definition of pr_fmt to prefix the debug messages from
> partitions/efi.c with "partition: efi: ".
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
Same as previous comment ...
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 4/5] block: Improve efi partition debug messages
2023-08-08 13:57 ` [PATCH 4/5] block: Improve efi partition debug messages Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
@ 2023-08-09 6:09 ` Hannes Reinecke
2023-08-15 10:03 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Hannes Reinecke @ 2023-08-09 6:09 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block
On 8/8/23 15:57, Damien Le Moal wrote:
> Add the missing definition of pr_fmt to prefix the debug messages from
> partitions/efi.c with "partition: efi: ".
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/partitions/efi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 4/5] block: Improve efi partition debug messages
2023-08-08 13:57 ` [PATCH 4/5] block: Improve efi partition debug messages Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
2023-08-09 6:09 ` Hannes Reinecke
@ 2023-08-15 10:03 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Johannes Thumshirn @ 2023-08-15 10:03 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions
2023-08-08 13:56 [PATCH 0/5] Some minor cleanups Damien Le Moal
` (3 preceding siblings ...)
2023-08-08 13:57 ` [PATCH 4/5] block: Improve efi partition debug messages Damien Le Moal
@ 2023-08-08 13:57 ` Damien Le Moal
2023-08-09 2:08 ` Chaitanya Kulkarni
` (2 more replies)
4 siblings, 3 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-08 13:57 UTC (permalink / raw)
To: Jens Axboe, linux-block
Modify the ldm partition code to use the regular pr_info(), pr_err() etc
functions instead of using printk(). With this change, the function
_ldm_printk() is not necessary and removed. The special LDM_DEBUG
configuration option is also removed as regular dynamic debug control
can be used to turn on or off the debug messages. References to this
configuration option is removed from the documentation and from the m68k
defconfig.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
Documentation/admin-guide/ldm.rst | 7 +++----
arch/m68k/configs/virt_defconfig | 1 -
block/partitions/Kconfig | 10 ---------
block/partitions/ldm.c | 35 +++++++------------------------
4 files changed, 10 insertions(+), 43 deletions(-)
diff --git a/Documentation/admin-guide/ldm.rst b/Documentation/admin-guide/ldm.rst
index 12c571368e73..e7b69a03e938 100644
--- a/Documentation/admin-guide/ldm.rst
+++ b/Documentation/admin-guide/ldm.rst
@@ -80,10 +80,9 @@ To enable LDM, choose the following two options:
- "Advanced partition selection" CONFIG_PARTITION_ADVANCED
- "Windows Logical Disk Manager (Dynamic Disk) support" CONFIG_LDM_PARTITION
-If you believe the driver isn't working as it should, you can enable the extra
-debugging code. This will produce a LOT of output. The option is:
-
- - "Windows LDM extra logging" CONFIG_LDM_DEBUG
+If you believe the driver isn't working as it should, you can enable extra
+debugging messages using dynamic debug. This will produce a LOT of output.
+See Documentation/admin-guide/dynamic-debug-howto.rst for details.
N.B. The partition code cannot be compiled as a module.
diff --git a/arch/m68k/configs/virt_defconfig b/arch/m68k/configs/virt_defconfig
index 311b57e73316..94dd334da74f 100644
--- a/arch/m68k/configs/virt_defconfig
+++ b/arch/m68k/configs/virt_defconfig
@@ -19,7 +19,6 @@ CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
-CONFIG_LDM_DEBUG=y
CONFIG_SUN_PARTITION=y
CONFIG_SYSV68_PARTITION=y
CONFIG_NET=y
diff --git a/block/partitions/Kconfig b/block/partitions/Kconfig
index 7aff4eb81c60..71e4461fc35d 100644
--- a/block/partitions/Kconfig
+++ b/block/partitions/Kconfig
@@ -200,16 +200,6 @@ config LDM_PARTITION
If unsure, say N.
-config LDM_DEBUG
- bool "Windows LDM extra logging"
- depends on LDM_PARTITION
- help
- Say Y here if you would like LDM to log verbosely. This could be
- helpful if the driver doesn't work as expected and you'd like to
- report a bug.
-
- If unsure, say N.
-
config SGI_PARTITION
bool "SGI partition support" if PARTITION_ADVANCED
default y if DEFAULT_SGI_PARTITION
diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
index 38e58960ae03..691908c8c8f3 100644
--- a/block/partitions/ldm.c
+++ b/block/partitions/ldm.c
@@ -19,39 +19,18 @@
#include "ldm.h"
#include "check.h"
+#undef pr_fmt
+#define pr_fmt(fmt) "partition: ldm: " fmt
+
/*
* ldm_debug/info/error/crit - Output an error message
* @f: A printf format string containing the message
* @...: Variables to substitute into @f
- *
- * ldm_debug() writes a DEBUG level message to the syslog but only if the
- * driver was compiled with debug enabled. Otherwise, the call turns into a NOP.
*/
-#ifndef CONFIG_LDM_DEBUG
-#define ldm_debug(...) do {} while (0)
-#else
-#define ldm_debug(f, a...) _ldm_printk (KERN_DEBUG, __func__, f, ##a)
-#endif
-
-#define ldm_crit(f, a...) _ldm_printk (KERN_CRIT, __func__, f, ##a)
-#define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a)
-#define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a)
-
-static __printf(3, 4)
-void _ldm_printk(const char *level, const char *function, const char *fmt, ...)
-{
- struct va_format vaf;
- va_list args;
-
- va_start (args, fmt);
-
- vaf.fmt = fmt;
- vaf.va = &args;
-
- printk("%s%s(): %pV\n", level, function, &vaf);
-
- va_end(args);
-}
+#define ldm_debug(f, a...) pr_debug("%s(): " f, __func__, ##a)
+#define ldm_crit(f, a...) pr_crit("%s(): " f, __func__, ##a)
+#define ldm_error(f, a...) pr_err("%s(): " f, __func__, ##a)
+#define ldm_info(f, a...) pr_info("%s(): " f, __func__, ##a)
/**
* ldm_parse_privhead - Read the LDM Database PRIVHEAD structure
--
2.41.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions
2023-08-08 13:57 ` [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions Damien Le Moal
@ 2023-08-09 2:08 ` Chaitanya Kulkarni
2023-08-09 6:10 ` Hannes Reinecke
2023-08-15 10:06 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-09 2:08 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
On 8/8/2023 6:57 AM, Damien Le Moal wrote:
> Modify the ldm partition code to use the regular pr_info(), pr_err() etc
> functions instead of using printk(). With this change, the function
> _ldm_printk() is not necessary and removed. The special LDM_DEBUG
> configuration option is also removed as regular dynamic debug control
> can be used to turn on or off the debug messages. References to this
> configuration option is removed from the documentation and from the m68k
> defconfig.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions
2023-08-08 13:57 ` [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions Damien Le Moal
2023-08-09 2:08 ` Chaitanya Kulkarni
@ 2023-08-09 6:10 ` Hannes Reinecke
2023-08-15 10:06 ` Johannes Thumshirn
2 siblings, 0 replies; 23+ messages in thread
From: Hannes Reinecke @ 2023-08-09 6:10 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block
On 8/8/23 15:57, Damien Le Moal wrote:
> Modify the ldm partition code to use the regular pr_info(), pr_err() etc
> functions instead of using printk(). With this change, the function
> _ldm_printk() is not necessary and removed. The special LDM_DEBUG
> configuration option is also removed as regular dynamic debug control
> can be used to turn on or off the debug messages. References to this
> configuration option is removed from the documentation and from the m68k
> defconfig.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> Documentation/admin-guide/ldm.rst | 7 +++----
> arch/m68k/configs/virt_defconfig | 1 -
> block/partitions/Kconfig | 10 ---------
> block/partitions/ldm.c | 35 +++++++------------------------
> 4 files changed, 10 insertions(+), 43 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions
2023-08-08 13:57 ` [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions Damien Le Moal
2023-08-09 2:08 ` Chaitanya Kulkarni
2023-08-09 6:10 ` Hannes Reinecke
@ 2023-08-15 10:06 ` Johannes Thumshirn
2023-08-15 12:41 ` Damien Le Moal
2 siblings, 1 reply; 23+ messages in thread
From: Johannes Thumshirn @ 2023-08-15 10:06 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block@vger.kernel.org
On 08.08.23 19:56, Damien Le Moal wrote:
> +#define ldm_debug(f, a...) pr_debug("%s(): " f, __func__, ##a) +#define
> ldm_crit(f, a...) pr_crit("%s(): " f, __func__, ##a) +#define
> ldm_error(f, a...) pr_err("%s(): " f, __func__, ##a) +#define
> ldm_info(f, a...) pr_info("%s(): " f, __func__, ##a)
Is there any value in keeping these ldm_XXX() macros around, other than
printing the function name?
I'd just get rid of them as well and replace with the according pr_XXX()
calls.
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions
2023-08-15 10:06 ` Johannes Thumshirn
@ 2023-08-15 12:41 ` Damien Le Moal
0 siblings, 0 replies; 23+ messages in thread
From: Damien Le Moal @ 2023-08-15 12:41 UTC (permalink / raw)
To: Johannes Thumshirn, Jens Axboe, linux-block@vger.kernel.org
On 8/15/23 19:06, Johannes Thumshirn wrote:
> On 08.08.23 19:56, Damien Le Moal wrote:
>> +#define ldm_debug(f, a...) pr_debug("%s(): " f, __func__, ##a) +#define
>> ldm_crit(f, a...) pr_crit("%s(): " f, __func__, ##a) +#define
>> ldm_error(f, a...) pr_err("%s(): " f, __func__, ##a) +#define
>> ldm_info(f, a...) pr_info("%s(): " f, __func__, ##a)
>
> Is there any value in keeping these ldm_XXX() macros around, other than
> printing the function name?
You named it: I didn't want to change the messages.
I do not mind simplifying these by removing the function name, but if we do not,
then the macros actually simplify the print calls.
>
> I'd just get rid of them as well and replace with the according pr_XXX()
> calls.
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 23+ messages in thread