Re: [PATCH 05/11] block: add a store_limit operations for sysfs entries
- To: John Garry <john.g.garry@oracle.com>
- Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>, Damien Le Moal <dlemoal@kernel.org>, Ming Lei <ming.lei@redhat.com>, Nilay Shroff <nilay@linux.ibm.com>, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, nbd@other.debian.org, linux-scsi@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, "Martin K . Petersen" <martin.petersen@oracle.com>, Johannes Thumshirn <johannes.thumshirn@wdc.com>
- Subject: Re: [PATCH 05/11] block: add a store_limit operations for sysfs entries
- From: Christoph Hellwig <hch@lst.de>
- Date: Fri, 10 Jan 2025 10:56:01 +0100
- Message-id: <[🔎] 20250110095601.GA11121@lst.de>
- In-reply-to: <[🔎] 68cd5371-f4ca-44c0-8ac7-c734da04f877@oracle.com>
- References: <[🔎] 20250110054726.1499538-1-hch@lst.de> <[🔎] 20250110054726.1499538-6-hch@lst.de> <[🔎] e7177a33-aebd-4828-87b0-f790b4fb1306@oracle.com> <[🔎] 20250110091859.GA8373@lst.de> <[🔎] 68cd5371-f4ca-44c0-8ac7-c734da04f877@oracle.com>
On Fri, Jan 10, 2025 at 09:51:18AM +0000, John Garry wrote:
> 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)?
Not real urge. The idea here was to get it right for the new one.
Changing the existing would be a lot of churn for a relatively small
improvement. For me that's only worth it when touching the area anyway.
Which might or might not happen when trying to remove the sysfs_lock
around ->store.
Reply to: