Re: Patch [0/3] Support eager_unmap for non ldpme sd devs

Martin K. Petersen
2025-07-29T05:09:48Z

Hi Kurt!

> The SCSI disk driver (sd_mod) would just claim that discard is not
> supported. It's not true. The NVMes support it as do the enclosures.

For some definition of support at least. If they can't figure out how to
set a single bit flag to enable the feature, then maybe their "support"
is not entirely trustworthy. But great that it works...

What are your devices actually reporting in:

# sg_readcap -l /dev/sdN

# sg_vpd -p bl /dev/sdN

# sg_vpd -p lbpv /dev/sdN

?

> I have a few, though all have variants of RTL9210 chips.
>
> But sd was too conservative to let me do it.

Why not just have a udev rule which does:

echo unmap > /sys/class/scsi_disk/H:C:T:L/provisioning_mode

?

Substitute "writesame_10" or "writesame_16" depending on what is
actually implemented.

--
Martin K. Petersen