Excesively large TRIMs can result in timeouts, which cause big
problems. Limit trims to 1GB to mititgate these issues.
Original Patch by: scottl
Differential D19169
Implement a system-wide limit or da and ada devices for delete. imp on Feb 12 2019, 8:47 PM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions This is the kind of change that seems simple and obvious, but opens up semantic gray areas in the language and the runtime. Is the intent that 0 means that trim is disabled? Should this coordinate with other tunable? How would one express unlimited? I guess as 0x7ffffffffffffff since it's a signed quad? It's now possible to feed a negative value into d_delmaxsize where that wasn't possible before (even though the field is signed), so does the rest of the system know how to deal with that? Comment Actions Fair point. I made this a int64 because off_t is int64_t. However, it doesn't make sense to have it be negative. It's a pilot error that would likely take down the whole system (or result in a weird limit). Setting it to '0' would also have bad effects because that would likely result in an infinite loop in geom. The intent isn't to disable all trim with setting it to '0', so nothing to enable that is present. A legal 'minimum' has to be params.secsize. I'll rework. |