From patchwork Tue Jan 7 06:30:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13928285 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 5A9221DED66; Tue, 7 Jan 2025 06:31:28 +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=1736231493; cv=none; b=sEzaIGvS8j2i1cjvte/+CFowD71RGZAhWpyJhlJRlkWbE86nXhkPbNZmqs8vixFT2swm5JllmvD8+YenjZWomGvcSM8E7NIn1wuvKs9qegq0xqqh/UAp2lV0+E84GbVo91bMsLvZ0i+O8P8jKCtVABA9P6yJJIcmYLMvTv1j5jg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736231493; c=relaxed/simple; bh=LB4+2eOkj0zzndWCB/vixItxi+a26opfaOvxk+efYJ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F7MYY0EGIPxhTesyyMfaGYV+wB3aqgutmKlpTbdsY4+H4bIdLIu5bDN4kUKTk/IQ//XufjWmI1ulvZsg+hTIkxi/51r5lTC7qT4EdX2cB4jW6Ht1PkYiYm7v67+FXCr2/PD4KgyIiOpzKGm7+1C71iWHvaXPfE/wB39zn67lbZA= 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=02MlsQPG; 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="02MlsQPG" 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=w5BnKXrf4u+9CDrAeMZ++BdjrhcxftxCwPH6SyNl+dQ=; b=02MlsQPG93FwRgwQ+2YYiUFvKU zvDP8Tl22iT4mEWZQ7aYktGDS9nZOWX+x/Yt3u6qLVyCflKzLEm5w7UybMQfEo1zhRVS6EZjRTQSt 7gsckUwtXgxYIk+VsH6dV3GVFS7CxgzmON8cYWJNrHq+GLVkoioso4t4aLQoGLsQoqd5ceUgufztH MshhVUSGjSrepHD32RagcWBOfwtvEqO6tg11GZih/Q06+4kdKQ6ohuHfwKmjgqgISXWO536Il3Lu2 ib/r8hdoyFXybuKI+lIUNZyYUCNbbtC8m2y9NIGm37sVI7EgEjfwhHMQsB81713+iR4HXwS4IN0q0 0TLScfXA==; Received: from 2a02-8389-2341-5b80-d467-d75d-35bf-0eb6.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:d467:d75d:35bf:eb6] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tV37e-00000003dpL-0ljQ; Tue, 07 Jan 2025 06:31:26 +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 Subject: [PATCH 1/8] block: fix docs for freezing of queue limits updates Date: Tue, 7 Jan 2025 07:30:33 +0100 Message-ID: <20250107063120.1011593-2-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250107063120.1011593-1-hch@lst.de> References: <20250107063120.1011593-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-block@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: Damien Le Moal Reviewed-by: Nilay Shroff --- 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. * * 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)