From patchwork Fri Jan 10 05:47:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 856888 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D4A438FB0; Fri, 10 Jan 2025 05:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736488055; cv=none; b=lNSmqGhEYWyEq/jAYZ/Bi4YylqmkqsVXPs2EYDgARLyflV1iEZ22LosQYjj7LbLb7siVqoCp6xNc3x5o0JVEuMOL+0W9HMzyPon/gYmNWuYC/KZkXuJxiC0rODiLN9qlMGtDakulsAMkEuLRYXXP2zKuERkhDUY1ST7TCYO9LWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736488055; c=relaxed/simple; bh=iTgXI+GgCisPMpYQUL8c757jMOz/1n49Ua0gfrigLRo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GDAalCtt8fJHK1LPkya+WGUNNzlYaSWnP8keTnxJewiviBMpnN7/UP6Un/9bQFC/YiyoKyB3sJ/5KmC6vRD5wUxpSIuP8ypFowO4dHpwlgRWDnI2UPdYayAJR7uexq/7BIEEurzJk8w9sS/oW9pIdhyDOtGTZgfpFQvaPny0MAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=qwOlFf5+; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="qwOlFf5+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=vtlfIIv1TIifp2HHnxSmy1WbKAh1rAR+Wk4iDj/Xq1s=; b=qwOlFf5+voS7QCl9O8eHQmVv4+ yLhgbYrtAIgPeKhVZCgRHjGXKO9xo8DxQwN8NwKAGbiM3LvE+GLOIYwZIBulLGJIukUaQUF6HbC86 cu9y5EA/DR7fCxMAL75uHmxnk+a51PZZ3aNEaSs0Wdz2cn5MMODDdmhRJPQbHY7P8h6Q5so00K4gQ p9zclcuPlw2ssk14tVBEhHQ/UFPI6lgSFt0t5V0UFH1lMzBu1XdxQEYg7Yb5qbItC8fKj7wSUrOVD urTRIQbfoxsMip8lpPXk5YFHp+GEDXnhMkEMNuWJiOo12cq03KB1UF1FTs3uarGRcrGVBiiiyCSvb 7tsn2CRw==; Received: from 2a02-8389-2341-5b80-76c3-a3dc-14f6-94e8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:76c3:a3dc:14f6:94e8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tW7rn-0000000E4s0-2LJ3; Fri, 10 Jan 2025 05:47:32 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Damien Le Moal , Ming Lei , Nilay Shroff , 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" , Johannes Thumshirn Subject: [PATCH 01/11] block: fix docs for freezing of queue limits updates Date: Fri, 10 Jan 2025 06:47:09 +0100 Message-ID: <20250110054726.1499538-2-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250110054726.1499538-1-hch@lst.de> References: <20250110054726.1499538-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 Reviewed-by: Ming Lei Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Reviewed-by: Nilay Shroff Reviewed-by: Johannes Thumshirn --- 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..89d8366fd43c 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 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)