Harald, >> > I tried a discard on a Samsung PM981 1TB SSD (m.2) using a JMicron USB adaptor. >> > >> > udev rule: >> > >> > ACTION=="add|change", ATTRS{idVendor}=="152d", >> > ATTRS{idProduct}=="0583", SUBSYSTEM=="scsi_disk", >> > ATTR{provisioning_mode}="unmap" >> > >> > Probably I was too optimistic. > In the code comments above the WARN, this condition indicates "the > discard granularity isn't set by buggy device driver". The block layer > needs this set if your driver also sets the max_discard_sectors limit. Please provide the output of: # sg_readcap -l /dev/sdN # sg_vpd -l /dev/sdN # sg_vpd -p 0xb0 /dev/sdN # sg_vpd -p 0xb1 /dev/sdN # sg_vpd -p 0xb2 /dev/sdN # sg_opcodes /dev/sdN Thanks! -- Martin K. Petersen Oracle Linux Engineering