* [PATCH] scsi: target: Allow FUA if no write cache enabled
@ 2026-03-06 16:33 Stuart Hayes
0 siblings, 0 replies; only message in thread
From: Stuart Hayes @ 2026-03-06 16:33 UTC (permalink / raw)
To: Martin K . Petersen, linux-scsi, target-devel, linux-kernel; +Cc: Stuart Hayes
Modify target_check_fua() to allow FUA support for devices with no write
cache enabled.
Without this patch, accesses with FUA set will be rejected, even though
they always go directly to the media when there's no write cache.
This is needed because EDK2 FAT filesystem code sets the FUA bit when
writing, regardless of whether the device advertises support of DPOFUA. If
a UEFI pre-boot write fails, the filesystem can become inaccessible until a
reboot. This can cause linux installs to iSCSI to be unbootable, because
some systems have firmware that will try to write a file in a
vendor-specific directory under /boot/EFI (such as /boot/EFI/Dell) before
attempting to boot to a UEFI boot entry pointing to a file in the FAT
filesystem.
Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
---
drivers/target/target_core_transport.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index a7330c4fedde..f8da0dfcb5ae 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3684,5 +3684,6 @@ target_check_wce(struct se_device *dev)
bool
target_check_fua(struct se_device *dev)
{
- return target_check_wce(dev) && dev->dev_attrib.emulate_fua_write > 0;
+ /* Allow FUA if there's no write cache */
+ return target_check_wce(dev) ? dev->dev_attrib.emulate_fua_write > 0 : 1;
}
--
2.39.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-06 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 16:33 [PATCH] scsi: target: Allow FUA if no write cache enabled Stuart Hayes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox