linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ata: allow toggling fua parameter at runtime
@ 2022-09-26 19:51 Maciej S. Szmigiero
  2022-09-26 19:51 ` [PATCH 2/2] ata: allow enabling FUA support in Kconfig Maciej S. Szmigiero
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej S. Szmigiero @ 2022-09-26 19:51 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: linux-ide, linux-kernel

From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>

Currently, the libata.fua parameter isn't runtime-writable, so a
system restart is required in order to toggle it.
This unnecessarily complicates testing how drives behave with FUA on and
off.

Let's make this parameter R/W instead, like many others in the kernel.

Example usage:
Disable the parameter:
echo 0 >/sys/module/libata/parameters/fua

Revalidate disk cache settings:
F=/sys/class/scsi_disk/0\:0\:0\:0/cache_type; echo `cat $F` >$F

Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
---
 drivers/ata/libata-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 75b86913db1ac..b322006c85806 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -128,7 +128,7 @@ module_param(atapi_passthru16, int, 0444);
 MODULE_PARM_DESC(atapi_passthru16, "Enable ATA_16 passthru for ATAPI devices (0=off, 1=on [default])");
 
 int libata_fua = 0;
-module_param_named(fua, libata_fua, int, 0444);
+module_param_named(fua, libata_fua, int, 0644);
 MODULE_PARM_DESC(fua, "FUA support (0=off [default], 1=on)");
 
 static int ata_ignore_hpa;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-10-15  0:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 19:51 [PATCH 1/2] ata: allow toggling fua parameter at runtime Maciej S. Szmigiero
2022-09-26 19:51 ` [PATCH 2/2] ata: allow enabling FUA support in Kconfig Maciej S. Szmigiero
2022-10-05 23:38   ` Damien Le Moal
2022-10-06 13:06     ` Maciej S. Szmigiero
2022-10-06 22:20       ` Damien Le Moal
2022-10-06 22:53         ` Damien Le Moal
2022-10-07 14:14           ` Maciej S. Szmigiero
2022-10-07 22:41             ` Damien Le Moal
2022-10-14 16:44               ` Maciej S. Szmigiero
2022-10-15  0:37                 ` Damien Le Moal

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).