On Mon, 9 Oct 2023, Hannes Reinecke wrote: > On 10/9/23 02:56, charlesfdotz@xxxxxxxxxxxx wrote: > > Hello, > > > > I would like to request a new device manager layer be added that accepts > > trim requests for sectors and instead > > writes zeros to those sectors. > > > > This would be useful to deal with SMR (shingled magnetic recording) drives > > that do not support trim. Currently > > after an SMR drive has had enough data written to it the performance drops > > dramatically because the disk must > > shuffle around data as if it were full and without trim support there is no > > way to inform the disk which sectors > > are no longer used. Currently there's no way to "fix" or reset this without > > doing an ATA secure erase despite > > many of these disk being sold without informing customers that they were SMR > > drives (western digital was sued > > for selling SMR drives as NAS drives). > > > Gosh, no, please don't. > SMR drives have a write pointer, and if the zone needs to be reset you just > reset the write pointer. Writing zeroes will result in the opposite; the zone > continues to be full, and no writes can happen there. > > Which drive is this? > > Cheers, > > Hannes BTW. what about converting trims to zone reset? If the trim spans a whole zone, the kernel could convert it to REQ_OP_ZONE_RESET on host-aware zoned devices. Mikulas