Message ID | 20250107063120.1011593-2-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/8] block: fix docs for freezing of queue limits updates | expand |
On 1/7/25 12:00 PM, Christoph Hellwig wrote: > queue_limits_commit_update is the function that needs to operate on a > frozen queue, not queue_limits_start_update. Update the kerneldoc > comments to reflect that. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > block/blk-settings.c | 3 ++- > include/linux/blkdev.h | 3 +-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/block/blk-settings.c b/block/blk-settings.c > index 8f09e33f41f6..b6b8c580d018 100644 > --- a/block/blk-settings.c > +++ b/block/blk-settings.c > @@ -413,7 +413,8 @@ int blk_set_default_limits(struct queue_limits *lim) > * @lim: limits to apply > * > * Apply the limits in @lim that were obtained from queue_limits_start_update() > - * and updated by the caller to @q. > + * and updated by the caller to @q. The caller must have frozen the queue or > + * ensure that there are outstanding I/Os by other means. Maybe typo: "ensure that there are *NO* outstanding I/Os by other means" > * > * Returns 0 if successful, else a negative error code. > */ > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 5d40af2ef971..e781d4e6f92d 100644 > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -944,8 +944,7 @@ static inline unsigned int blk_boundary_sectors_left(sector_t offset, > * the caller can modify. The caller must call queue_limits_commit_update() > * to finish the update. > * > - * Context: process context. The caller must have frozen the queue or ensured > - * that there is outstanding I/O by other means. > + * Context: process context. > */ > static inline struct queue_limits > queue_limits_start_update(struct request_queue *q)
On 1/7/25 15:30, Christoph Hellwig wrote: > queue_limits_commit_update is the function that needs to operate on a > frozen queue, not queue_limits_start_update. Update the kerneldoc > comments to reflect that. > > Signed-off-by: Christoph Hellwig <hch@lst.de> With this comment fixed as Nilay suggested, feel free to add: Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
On 1/7/25 12:31 PM, Nilay Shroff wrote: > > > On 1/7/25 12:00 PM, Christoph Hellwig wrote: >> queue_limits_commit_update is the function that needs to operate on a >> frozen queue, not queue_limits_start_update. Update the kerneldoc >> comments to reflect that. >> >> Signed-off-by: Christoph Hellwig <hch@lst.de> >> --- >> block/blk-settings.c | 3 ++- >> include/linux/blkdev.h | 3 +-- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/block/blk-settings.c b/block/blk-settings.c >> index 8f09e33f41f6..b6b8c580d018 100644 >> --- a/block/blk-settings.c >> +++ b/block/blk-settings.c >> @@ -413,7 +413,8 @@ int blk_set_default_limits(struct queue_limits *lim) >> * @lim: limits to apply >> * >> * Apply the limits in @lim that were obtained from queue_limits_start_update() >> - * and updated by the caller to @q. >> + * and updated by the caller to @q. The caller must have frozen the queue or >> + * ensure that there are outstanding I/Os by other means. > > Maybe typo: "ensure that there are *NO* outstanding I/Os by other means" Other than typo, everything else looks good. Once the above typo is fixed, please feel free to add: Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
On 07/01/2025 06:30, Christoph Hellwig wrote: > queue_limits_commit_update is the function that needs to operate on a > frozen queue, not queue_limits_start_update. Update the kerneldoc > comments to reflect that. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > block/blk-settings.c | 3 ++- > include/linux/blkdev.h | 3 +-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/block/blk-settings.c b/block/blk-settings.c > index 8f09e33f41f6..b6b8c580d018 100644 > --- a/block/blk-settings.c > +++ b/block/blk-settings.c > @@ -413,7 +413,8 @@ int blk_set_default_limits(struct queue_limits *lim) > * @lim: limits to apply > * > * Apply the limits in @lim that were obtained from queue_limits_start_update() > - * and updated by the caller to @q. > + * and updated by the caller to @q. The caller must have frozen the queue or > + * ensure that there are outstanding I/Os by other means. is that a typo - /s/outstanding/ no outstanding/ ? > * > * Returns 0 if successful, else a negative error code. > */ > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 5d40af2ef971..e781d4e6f92d 100644 > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -944,8 +944,7 @@ static inline unsigned int blk_boundary_sectors_left(sector_t offset, > * the caller can modify. The caller must call queue_limits_commit_update() > * to finish the update. > * > - * Context: process context. The caller must have frozen the queue or ensured > - * that there is outstanding I/O by other means. > + * Context: process context. > */ > static inline struct queue_limits > queue_limits_start_update(struct request_queue *q)
On 1/9/25 4:49 PM, John Garry wrote: > On 07/01/2025 06:30, Christoph Hellwig wrote: >> queue_limits_commit_update is the function that needs to operate on a >> frozen queue, not queue_limits_start_update. Update the kerneldoc >> comments to reflect that. >> >> Signed-off-by: Christoph Hellwig <hch@lst.de> >> --- >> block/blk-settings.c | 3 ++- >> include/linux/blkdev.h | 3 +-- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/block/blk-settings.c b/block/blk-settings.c >> index 8f09e33f41f6..b6b8c580d018 100644 >> --- a/block/blk-settings.c >> +++ b/block/blk-settings.c >> @@ -413,7 +413,8 @@ int blk_set_default_limits(struct queue_limits *lim) >> * @lim: limits to apply >> * >> * Apply the limits in @lim that were obtained from queue_limits_start_update() >> - * and updated by the caller to @q. >> + * and updated by the caller to @q. The caller must have frozen the queue or >> + * ensure that there are outstanding I/Os by other means. > > is that a typo - /s/outstanding/ no outstanding/ ? It's already fixed in v3 here: https://lore.kernel.org/all/20250109055810.1402918-2-hch@lst.de/ Thanks, --Nilay
On 09/01/2025 11:24, Nilay Shroff wrote: >> is that a typo -/s/outstanding/ no outstanding/ ? > It's already fixed in v3 here:https://urldefense.com/v3/__https://lore.kernel.org/ > all/20250109055810.1402918-2-hch@lst.de/__;!!ACWV5N9M2RV99hQ! > IYos3CWlynlAtnimomFwr9cZ8nYQLZJ6haZCdjSYQp5lpMaD1aJRlX9OLTuHEU- > XlB8R5BpZJQazJwzm2XQ$ oh, yes. I thought that there was a v3, but it was hiding in another folder... cheers
diff --git a/block/blk-settings.c b/block/blk-settings.c index 8f09e33f41f6..b6b8c580d018 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -413,7 +413,8 @@ int blk_set_default_limits(struct queue_limits *lim) * @lim: limits to apply * * Apply the limits in @lim that were obtained from queue_limits_start_update() - * and updated by the caller to @q. + * and updated by the caller to @q. The caller must have frozen the queue or + * ensure that there are outstanding I/Os by other means. * * Returns 0 if successful, else a negative error code. */ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5d40af2ef971..e781d4e6f92d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -944,8 +944,7 @@ static inline unsigned int blk_boundary_sectors_left(sector_t offset, * the caller can modify. The caller must call queue_limits_commit_update() * to finish the update. * - * Context: process context. The caller must have frozen the queue or ensured - * that there is outstanding I/O by other means. + * Context: process context. */ static inline struct queue_limits queue_limits_start_update(struct request_queue *q)
queue_limits_commit_update is the function that needs to operate on a frozen queue, not queue_limits_start_update. Update the kerneldoc comments to reflect that. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-settings.c | 3 ++- include/linux/blkdev.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-)