On 27/11/2022 18:23, Reindl Harald wrote:
In other words, if the filesystem is only using 10% of the disk,
supporting trim means that raid knows which 10% is being used and only
bothers syncing that!
this is nonsense and don't reflect reality
the only thing trim does is tell the underlying device which blocks can
be used for wear-leveling
Then why do some linux block devices THAT HAVE NOTHING TO DO WITH
HARDWARE support trim? (Sorry I can't name them, I've come across them).
And are you telling me that you're happy with a block device trashing
your live data because the filesystem or whatever trimmed it? If the
file system sends a TRIM command, it's saying "I am no longer using this
space". What the underlying block layer does with it is up that layer.
An SSD might use it for wear leveling, I'm pretty certain
thin-provisioning uses it to release space (oh there's my block layer
that isn't hardware).
AND THERE IS ABSOLUTELY NO REASON why md-raid shouldn't flag it as "this
doesn't need recovery". Okay, it would need some sort of bitmap to say
"these stripes are/aren't in use, which would chew up some disk space,
but it's perfectly feasible.
Cheers,
Wol