On Fri, Jun 06, 2025 at 10:34:42AM +0530, Kundan Kumar wrote: > Thanks for the suggestion — I agree the default should come from a > filesystem-level helper, not a mount option. > > I looked into the sysfs override idea, but one challenge is that > nr_wb_ctx must be finalized before any writes occur. That leaves only > a narrow window — after the bdi is registered but before any inodes > are dirtied — where changing it is safe. > > This makes the sysfs knob a bit fragile unless we tightly guard it > (e.g., mark it read-only after init). A mount option, even just as an > override, feels simpler and more predictable, since it’s set before > the FS becomes active. The mount option has a few issues: - the common VFS code only support flags, not value options, so you'd have to wire this up in every file system - some file system might not want to allow changing it - changing it at runtime is actuallyt quite useful So you'll need to quiesce writeback or maybe even do a full fs freeze when changing it a runtime, but that seems ok for a change this invasive.