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

Kurt Garloff
2025-07-29T09:16:03Z

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

Hi,

On 29.07.25 09:32, Kurt Garloff wrote:
> Remaining question is whether we'd recommend users to use
> a set of udev rules to fix up or whether we have a sd_mod
> parameter to ignore LBPME (if LBPU/LBPWS/LBPWS10 are set)
> or even ignore it by default (and only provide an opt-out
> parameter).

I should probably mention that doing it via udev is complex.

ACTION!="add", GOTO="usb_nvme_end"
SUBSYSTEM=="usb_device", GOTO="usb_nvme_start"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="usb_nvme_start"
GOTO="usb_nvme_end"

LABEL="usb_nvme_start"
# Realtek 9210 USB-NVMe bridge
ATTR{idVendor}=="0bda", ATTR{idProduct}=="9210",
RUN="/usr/local/sbin/set-unmap.sh"
# More USB IDs to follow here

LABEL="usb_nvme_end"

with attached script in /usr/local/sbin/set-unmap.sh*
*It's somewhat error proof, but probably would not have hit the mark
yet for inclusion into a Linux distro.*
*

Patching sd would seem easier ...*
*

--
Kurt Garloff <kurt@garloff.de>, Cologne

[-- Attachment #2: set-unmap.sh --]
[-- Type: application/x-shellscript, Size: 2095 bytes --]