Page MenuHomeFreeBSD

Implement a system-wide limit or da and ada devices for delete.
AbandonedPublic

Authored by imp on Feb 12 2019, 8:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 2:20 PM
Unknown Object (File)
Tue, Jun 25, 5:34 AM
Unknown Object (File)
Mon, Jun 24, 2:03 PM
Unknown Object (File)
Sat, Jun 22, 3:14 AM
Unknown Object (File)
Wed, Jun 19, 6:16 PM
Unknown Object (File)
Apr 7 2024, 6:22 AM
Unknown Object (File)
Jan 23 2024, 4:33 PM
Unknown Object (File)
Jan 17 2024, 4:46 AM
Subscribers

Details

Reviewers
scottl
Group Reviewers
cam
Summary

Excesively large TRIMs can result in timeouts, which cause big
problems. Limit trims to 1GB to mititgate these issues.

Original Patch by: scottl

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22470
Build 21625: arc lint + arc unit

Event Timeline

scottl requested changes to this revision.Jul 11 2021, 7:57 PM
scottl added a subscriber: scottl.

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?

This revision now requires changes to proceed.Jul 11 2021, 7:57 PM

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?

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.

I'm no longer working on this.