On Sat, Aug 31, 2019 at 04:44:48PM +0200, Christoph Hellwig wrote: > On Sat, Aug 31, 2019 at 02:35:37PM +0100, Al Viro wrote: > > > So for the one real life example of the configfs attribute life > > > actually is simpler. acpi_table_aml_write verifies early on that > > > the size matches what it expects. So if we document that any future > > > instance needs to be able to do that as well we should be able to > > > get away with just writing it from ->flush. > > > > I'm not sure I understand what you mean... Do you want them to recognize > > incomplete data and quietly bugger off when called on too early ->flush()? > > That is what the only user does anyway, take a look at > acpi_table_aml_write. So yes, change the documentation to say it > gets written on every close, and the implementation has to deal with > incomplete data by either returning an error or ignoring it. That, or we could just let it have the sucker called on each write(). As in "for such files writes are accumulated in a buffer, until the method finally decides it has enough to process"... In that case method should return something recognizable for "need more input", as opposed to "stop, it's already an unacceptable garbage".