pstore/ram: Rate-limit "uncorrectable error in header" message
Subsystems (2)
Sasha Levin
maintainerPATCH 1/5 pstore/ram: Rate-limit "uncorrectable error in header" message
From: Dmitry Osipenko <[email protected]>
[ Upstream commit 7db688e99c0f770ae73e0f1f3fb67f9b64266445 ]
There is a quite huge "uncorrectable error in header" flood in KMSG on a clean system boot since there is no pstore buffer saved in RAM. Let's silence the redundant noisy messages by rate-limiting the printk message. Now there are maximum 10 messages printed repeatedly instead of 35+.
--- fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pstore/ram_core.c +1 -1
@@ -246,7 +246,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,pr_info ("error in header, %d\n" , numerr); prz->corrected_bytes += numerr; }else if (numerr <0 ) { -pr_info ("uncorrectable error in header\n" ); +pr_info_ratelimited ("uncorrectable error in header\n" ); prz->bad_blocks++; }
Signature · 1 line
2.30.1
Sasha Levin
maintainerPATCH 2/5 tracing: Skip selftests if tracing is disabled
From: "Steven Rostedt (VMware)" <[email protected]>
[ Upstream commit ee666a185558ac9a929e53b902a568442ed62416 ]
If tracing is disabled for some reason (traceoff_on_warning, command line, etc), the ftrace selftests are guaranteed to fail, as their results are defined by trace data in the ring buffers. If the ring buffers are turned off, the tests will fail, due to lack of data.
Because tracing being disabled is for a specific reason (warning, user decided to, etc), it does not make sense to enable tracing to run the self tests, as the test output may corrupt the reason for the tracing to be disabled.
Instead, simply skip the self tests and report that they are being skipped due to tracing being disabled.
--- kernel/trace/trace.c | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/trace/trace.c +6 -0
@@ -1679,6 +1679,12 @@ static int run_tracer_selftest(struct tracer *type)if (!selftests_can_run)return save_selftest (type); +if (!tracing_is_on ()) { +pr_warn ("Selftest for tracer %s skipped due to tracing disabled\n" , + type->name); +return 0 ; + } +/* * Run a selftest on this tracer. * Here we reset the trace buffer, and set the current
Signature · 1 line
2.30.1
Sasha Levin
maintainerPATCH 3/5 nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST.
In reply to Sasha LevinFrom: Julian Einwag <[email protected]>
[ Upstream commit 5e112d3fb89703a4981ded60561b5647db3693bf ]
The kernel fails to fully detect these SSDs, only the character devices are present:
[ 10.785605] nvme nvme0: pci function 0000:04:00.0 [ 10.876787] nvme nvme1: pci function 0000:81:00.0 [ 13.198614] nvme nvme0: missing or invalid SUBNQN field. [ 13.198658] nvme nvme1: missing or invalid SUBNQN field. [ 13.206896] nvme nvme0: Shutdown timeout set to 20 seconds [ 13.215035] nvme nvme1: Shutdown timeout set to 20 seconds [ 13.225407] nvme nvme0: 16/0/0 default/read/poll queues [ 13.233602] nvme nvme1: 16/0/0 default/read/poll queues [ 13.239627] nvme nvme0: Identify Descriptors failed (8194) [ 13.246315] nvme nvme1: Identify Descriptors failed (8194)
Adding the NVME_QUIRK_NO_NS_DESC_LIST fixes this problem.
--- drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/pci.c +2 -1
@@ -3164,7 +3164,8 @@ static const struct pci_device_id nvme_id_table[] = { { PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST, }, { PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */ - .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, }, + .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY | + NVME_QUIRK_NO_NS_DESC_LIST, }, { PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, }, { PCI_DEVICE(0x1c58, 0x0023), /* WDC SN200 adapter */
Signature · 1 line
2.30.1
Sasha Levin
maintainerPATCH 4/5 nvme-pci: add quirks for Lexar 256GB SSD
In reply to Sasha LevinFrom: Pascal Terjan <[email protected]>
[ Upstream commit 6e6a6828c517fb6819479bf5187df5f39084eb9e ]
Add the NVME_QUIRK_NO_NS_DESC_LIST and NVME_QUIRK_IGNORE_DEV_SUBNQN quirks for this buggy device.
Reported and tested in https://bugs.mageia.org/show_bug.cgi?id=28417
--- drivers/nvme/host/pci.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/nvme/host/pci.c +3 -0
@@ -3179,6 +3179,9 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */ .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, }, + { PCI_DEVICE(0x1b4b, 0x1092), /* Lexar 256 GB SSD */ + .driver_data = NVME_QUIRK_NO_NS_DESC_LIST | + NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE(0x1d1d, 0x1f1f), /* LighNVM qemu device */ .driver_data = NVME_QUIRK_LIGHTNVM, }, { PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */
Signature · 1 line
2.30.1
Sasha Levin
maintainerPATCH 5/5 nvme-fabrics: fix kato initialization
In reply to Sasha LevinFrom: Martin George <[email protected]>
[ Upstream commit 32feb6de47242e54692eceab52cfae8616aa0518 ]
Currently kato is initialized to NVME_DEFAULT_KATO for both discovery & i/o controllers. This is a problem specifically for non-persistent discovery controllers since it always ends up with a non-zero kato value. Fix this by initializing kato to zero instead, and ensuring various controllers are assigned appropriate kato values as follows:
non-persistent controllers - kato set to zero
persistent controllers - kato set to NVMF_DEV_DISC_TMO
(or any positive int via nvme-cli)
i/o controllers - kato set to NVME_DEFAULT_KATO
(or any positive int via nvme-cli)
--- drivers/nvme/host/fabrics.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +4 -1
@@ -632,7 +632,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts, opts->queue_size =NVMF_DEF_QUEUE_SIZE ; opts->nr_io_queues =num_online_cpus (); opts->reconnect_delay =NVMF_DEF_RECONNECT_DELAY ; - opts->kato =NVME_DEFAULT_KATO ; + opts->kato =0 ; opts->duplicate_connect = false; opts->hdr_digest = false; opts->data_digest = false;
@@ -883,6 +883,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts, opts->nr_write_queues =0 ; opts->nr_poll_queues =0 ; opts->duplicate_connect = true; + }else { +if (!opts->kato) + opts->kato =NVME_DEFAULT_KATO ; }if (ctrl_loss_tmo <0 ) opts->max_reconnects =-1 ;
Signature · 1 line
2.30.1