On 10/01/2025 09:18, Christoph Hellwig wrote:
On Fri, Jan 10, 2025 at 09:15:09AM +0000, John Garry wrote:+ int (*store_limit)(struct gendisk *disk, const char *page,I don't really see why this returns an int, while the queue features callback methods return a ssize_t. I know that the res variable in queue_attr_store() gets mixed with an int for updating the queue limits, but I don't see that as a reason to use int here.The normal store methods have the annoying calling convention wherethey return the parsed string length on success.
ok, and that just comes down to the behavior of queue_var_store(), which mimics sysfs_ops.store
I will note that queue_var_store and queue_var_store64 differ in behaviour here :(
->store_limits uses the simpler and harder to get wrong convention of returning 0 on success.
understood, so any reason why not to change the rest (apart from being busy)?