libnvdimm, blk: quiet i/o error reporting
PATCH 1/1 libnvdimm, blk: quiet i/o error reporting
I/O errors events have the potential to be a high frequency and a log message for each event can swamp the system. This message is also redundant with upper layer error reporting.
---
Previously this was folded into "[PATCH 08/13] libnvdimm, blk: move i/o infrastructure to nd_namespace_blk", but it deserves to be its own change.
drivers/nvdimm/blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvdimm/blk.c +1 -1
@@ -189,7 +189,7 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio) err =nd_blk_do_bvec (blk_dev, bip, bvec.bv_page, len, bvec.bv_offset, rw, iter.bi_sector);if (err) { -dev_info (&blk_dev->nsblk->common.dev, +dev_dbg (&blk_dev->nsblk->common.dev,"io error in %s sector %lld, len %d,\n" , (rw ==READ ) ?"READ" :"WRITE" , (unsigned long long ) iter.bi_sector, len);
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 12 lines
-----Original Message-----
From: Linux-nvdimm [mailto:[email protected]] On Behalf Of Dan Williams
Sent: Friday, March 25, 2016 5:00 PM
To: [email protected]
Subject: [PATCH] libnvdimm, blk: quiet i/o error reportingI/O errors events have the potential to be a high frequency and a log message for each event can swamp the system. This message is also redundant with upper layer error reporting.
...
Quoted 13 lines
drivers/nvdimm/blk.c +1
-1@@ -189,7 +189,7 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio) err =nd_blk_do_bvec (blk_dev, bip, bvec.bv_page, len, bvec.bv_offset, rw, iter.bi_sector);if (err) { - dev_info(&blk_dev->nsblk->common.dev, + dev_dbg(&blk_dev->nsblk->common.dev, "io error in %s sector %lld, len %d,\n", (rw == READ) ? "READ" : "WRITE",
Quoted 2 lines
(unsigned long long) iter.bi_sector, len);
The block layer's blk_update_request uses printk_ratelimited to avoids swamping the output buffers. Since this driver doesn't call blk_update_request, it might be appropriate to do the same.
printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu\n", __func__, error_type, req->rq_disk ? req->rq_disk->disk_name : "?", (unsigned long long)blk_rq_pos(req));
---
Robert Elliott, HPE Persistent Memory
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 33 lines · Robert (Persistent Memory)
Quoted 12 lines
-----Original Message-----
From: Linux-nvdimm [mailto:[email protected]] On Behalf Of Dan Williams
Sent: Friday, March 25, 2016 5:00 PM
To: [email protected]
Subject: [PATCH] libnvdimm, blk: quiet i/o error reportingI/O errors events have the potential to be a high frequency and a log message for each event can swamp the system. This message is also redundant with upper layer error reporting.
...
Quoted 13 lines
drivers/nvdimm/blk.c +1
-1@@ -189,7 +189,7 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio) err =nd_blk_do_bvec (blk_dev, bip, bvec.bv_page, len, bvec.bv_offset, rw, iter.bi_sector);if (err) { - dev_info(&blk_dev->nsblk->common.dev, + dev_dbg(&blk_dev->nsblk->common.dev, "io error in %s sector %lld, len %d,\n", (rw == READ) ? "READ" : "WRITE",Quoted 2 lines
(unsigned long long) iter.bi_sector, len);The block layer's
blk_update_requestusesprintk_ratelimitedto avoids swamping the output buffers. Since this driver doesn't callblk_update_request, it might be appropriate to do the same.
Quoted 4 lines
printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu\n",
__func__, error_type, req->rq_disk ?
req->rq_disk->disk_name : "?",
(unsigned long long)blk_rq_pos(req));I'm aware of printk_ratelimited, I just don't think bio-based drivers like ndblk should implement their own error reporting for something block-layer-generic like this.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 6 lines · On Freitag, 25. März 2016 14:59:41 CEST Dan Williams wrote:
I/O errors events have the potential to be a high frequency and a log message for each event can swamp the system. This message is also redundant with upper layer error reporting.
Cc Ross Zwisler <[email protected]>Signed-off-by Dan Williams <[email protected]>
Looks good to me,
Signature · 11 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm