Summary: | TRIM visibility bugs | ||
---|---|---|---|
Product: | Base System | Reporter: | mgrooms |
Component: | kern | Assignee: | freebsd-scsi (Nobody) <scsi> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | imp, stephan |
Priority: | --- | Keywords: | cam |
Version: | 14.0-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
mgrooms
2024-03-13 17:02:36 UTC
da part of this pushed. It was almost correct (I think it would be better to treat each WRITE SAME as 1 range so the stats are consistent with other methods). A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ea2d874cca7cdfe6133c1835dadd8f0672723fa6 commit ea2d874cca7cdfe6133c1835dadd8f0672723fa6 Author: Matthew Grooms <mgrooms@shrew.net> AuthorDate: 2024-05-03 15:01:21 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-03 15:03:31 +0000 geom_stripe: Cascade cantrim just like we do for gmirror If any of the disks can support trim, cascade that up the stack. Otherwise, trims won't pass through striped raid setups. PR: 277673 Reviewed by: imp (minor style tweaks from bug report) sys/geom/stripe/g_stripe.c | 21 ++++++++++++++++++++- sys/geom/stripe/g_stripe.h | 3 +++ 2 files changed, 23 insertions(+), 1 deletion(-) And the second one has landed. I've queued these for MFC next time I do a MFC run, but it likely won't be in 14.1 due to the lateness of the hour. I appreciate you looking at this Warner. I was concerned that second patch might be incorrect for the case that a disk with trim support was added to gstripe and later removed. The new behavior would report a false positive since the G_STRIPE_FLAG_CANDELETE value is irreversibly set to true when one or more disks that support TRIM are added to the stripe. I could rework the patch to be smarter for that case if that would be helpful. (In reply to mgrooms from comment #4) Yes. keeping a mask of disks that support it and/or recomputing the single bit when a disk is added / removed would be a bit better. Though the consequences of having it advertised when it isn't possible are low. A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f65f02ccf2a5656e96b32705bad52b11fbc3177c commit f65f02ccf2a5656e96b32705bad52b11fbc3177c Author: Matthew Grooms <mgrooms@shrew.net> AuthorDate: 2024-05-03 15:01:21 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-20 19:23:40 +0000 geom_stripe: Cascade cantrim just like we do for gmirror If any of the disks can support trim, cascade that up the stack. Otherwise, trims won't pass through striped raid setups. PR: 277673 Reviewed by: imp (minor style tweaks from bug report) (cherry picked from commit ea2d874cca7cdfe6133c1835dadd8f0672723fa6) sys/geom/stripe/g_stripe.c | 21 ++++++++++++++++++++- sys/geom/stripe/g_stripe.h | 3 +++ 2 files changed, 23 insertions(+), 1 deletion(-) |