[PATCH v2] nvme-pci: add NO_FUA quirk for ADATA XPG GAMMIX S70 BLADE

Hugo Deco hugodeco at sufficit.com.br
Tue Nov 3 10:12:04 PST 2026


On the ADATA XPG GAMMIX S70 BLADE (PCI 1cc1:5370, firmware 03020P5E)
every Write with the FUA bit set takes 200, 400 or 600 ms to complete,
always a multiple of ~200 ms, while a plain Write completes in
0.0-0.4 ms and a Flush in ~1.3 ms. Tracing nvme_setup_cmd and
nvme_complete_rq shows the whole delay is between submission and
completion, i.e. inside the device (e.g. FUA write, control 0x4000:
598.3 ms).

Because ext4/jbd2 issue FUA for every journal commit, fsync() on this
drive stalls for 250-890 ms and desktop applications freeze.

Add NVME_QUIRK_NO_FUA, which stops advertising BLK_FEAT_FUA while
keeping the volatile write cache enabled, so the block layer emulates
FUA with a Write followed by a Flush. Durability semantics are
unchanged. Apply it to the S70 BLADE through nvme_id_table.

With the quirk applied, 4 KiB O_DIRECT|O_DSYNC writes and
create+write+fsync drop from 250-890 ms to a 0.82-0.85 ms median
(30 samples, two partitions on the same drive).

Signed-off-by: Hugo Deco <hugodeco at sufficit.com.br>
---
v2:
 - Match the device by PCI ID in nvme_id_table instead of the model
   string in core_quirks (Keith Busch).

 drivers/nvme/host/core.c | 2 ++
 drivers/nvme/host/nvme.h | 8 ++++++++
 drivers/nvme/host/pci.c  | 2 ++
 3 files changed, 12 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index a7a4d09..a9f54ef 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2482,6 +2482,8 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
 		lim.features |= BLK_FEAT_WRITE_CACHE | BLK_FEAT_FUA;
 	else
 		lim.features &= ~(BLK_FEAT_WRITE_CACHE | BLK_FEAT_FUA);
+	if (ns->ctrl->quirks & NVME_QUIRK_NO_FUA)
+		lim.features &= ~BLK_FEAT_FUA;

 	if (info->is_rotational)
 		lim.features |= BLK_FEAT_ROTATIONAL;
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 2d8f681..8833a46 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -183,6 +183,12 @@ enum nvme_quirks {
 	 * Admin queue DMA buffers must be page aligned
 	 */
 	NVME_QUIRK_ADMIN_PAGE_ALIGN		= (1 << 23),
+
+	/*
+	 * The device is extremely slow on FUA writes but fast on Flush;
+	 * do not advertise FUA so the block layer emulates it.
+	 */
+	NVME_QUIRK_NO_FUA			= (1 << 24),
 };

 static inline char *nvme_quirk_name(enum nvme_quirks q)
@@ -236,6 +242,8 @@ static inline char *nvme_quirk_name(enum nvme_quirks q)
 		return "dmapool_align_512";
 	case NVME_QUIRK_ADMIN_PAGE_ALIGN:
 		return "admin_page_align";
+	case NVME_QUIRK_NO_FUA:
+		return "no_fua";
 	}

 	return "unknown";
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 019a1e3..e262f38 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -4483,6 +4483,8 @@ static const struct pci_device_id nvme_id_table[] = {
 		.driver_data = NVME_QUIRK_BOGUS_NID, },
 	{ PCI_DEVICE(0x1cc1, 0x5350),   /* ADATA XPG GAMMIX S50 */
 		.driver_data = NVME_QUIRK_BOGUS_NID, },
+	{ PCI_DEVICE(0x1cc1, 0x5370),   /* ADATA XPG GAMMIX S70 BLADE */
+		.driver_data = NVME_QUIRK_NO_FUA, },
 	{ PCI_DEVICE(0x1dbe, 0x5216),   /* Acer/INNOGRIT FA100/5216 NVMe SSD */
 		.driver_data = NVME_QUIRK_BOGUS_NID, },
 	{ PCI_DEVICE(0x1dbe, 0x5236),   /* ADATA XPG GAMMIX S70 */
-- 
2.53.0



More information about the Linux-nvme mailing list