From patchwork Tue Nov 19 16:09:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13880226 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 E14D01C68BE for ; Tue, 19 Nov 2024 16:09:38 +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=1732032580; cv=none; b=XA8ukgn6l9hfGoglujgnnH1BjNlz3xuJnKa1KncTPVEvt2DKHPJXzFrRcJvbxQPWXXB4CP6AiPpCzQd2pMCEXv3E6RWROlEvyTyULzU1Hb2/egOy7r+J9fPLn43vjqRSzPOUKns8K4v4K0gbktMA/MXkv4TAlW1P7CYaoY5RAg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732032580; c=relaxed/simple; bh=CX/hbK90XosCbGDVWA38Wj2AlZx20pxZxfc3RP7m9ig=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JFKmJUVpJBOVdNgmN8YmNaogSP/rSu+6HLssCNQ+IZmzuIgVoq13+0Wgm2pA/XfNh9nrqxYoL+dgQkLxGRY5+0nRjmraLko3F105uB8L0qVDRufRaGDaI1VQnT2Sa/eUo+TNzORY2Uo5B+i0dFh0ZXDplhp62gzmvxg6Gf5wx8k= 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=fmJdReLj; 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="fmJdReLj" 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=bocFXVwJluQPCTpD8aaYWVdRdJkC1vZpyzPRsMg05dA=; b=fmJdReLjMRjOsgKqJek8bMbqT6 q3UPvd0GXUV8XXyqoFOwzkED1Z/dOxyiURyQmTmqe9wZyV58dfHgMe7dtqZiJdsFKgnr9YoM0iNx9 xsuDePCF7poUVYp1nsfvoTiYaKY7EaxfSRWt8HM3qZynGxApE2jEM85ntYXRdleNqSOFjjrweEvnp CYNYcxmL6ElJ2NlhQnN8KWhJa+uAmy9ubUPv18DzeXB5r3SEAR0R9l5RjCpCTKankCcI10GxhmAbm vnRH9B4fLAYGlHh4I+Mkyu35ADqrvAXE9DbjpYApi73o7OwQZbc3+epI1f+sJdSVMDIiQ+rFPKVW3 98roxFFA==; Received: from 2a02-8389-2341-5b80-1731-a089-d2b1-3edf.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:1731:a089:d2b1:3edf] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tDQnK-0000000CykB-0oLl; Tue, 19 Nov 2024 16:09:38 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org Subject: [PATCH 1/6] block: return unsigned int from bdev_io_opt Date: Tue, 19 Nov 2024 17:09:18 +0100 Message-ID: <20241119160932.1327864-2-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119160932.1327864-1-hch@lst.de> References: <20241119160932.1327864-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 The underlying limit is defined as an unsigned int, so return that from bdev_io_opt as well. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 195db38fda16..37439acfa34e 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1271,7 +1271,7 @@ static inline unsigned int queue_io_opt(const struct request_queue *q) return q->limits.io_opt; } -static inline int bdev_io_opt(struct block_device *bdev) +static inline unsigned int bdev_io_opt(struct block_device *bdev) { return queue_io_opt(bdev_get_queue(bdev)); } From patchwork Tue Nov 19 16:09:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13880227 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 5A9F11C68BE for ; Tue, 19 Nov 2024 16:09:41 +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=1732032582; cv=none; b=L+cxoSpisPFCkOhZQxGPcgm8qWxVXVgUPv5rkWH/Mbo4IW8yjMmOlMhuvwJBhW7t51EW4b8o5kt7FChmSKcKCjnzQapvGyuFt8Pn4LXL0I0BK4tYb8f7VVss8csLUE0hUXAq5l/RHCLt9BplMSmqznuam1sN8C9jLZRNaug7wyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732032582; c=relaxed/simple; bh=MkPyC+VZFj+C/mW5jY4IYs/FywVgLPYYxAx72G9Fx3Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rKnlLUQf/vuhQ+bypQjpSGwupLdJUGsCqKeRGMdO9uTlEPoO3I0m8GzTepR/heWVoAghVRAidYkIkdUMAhS2hkVxv89Td/yICzJ4NwsMbsDWCMuDZtUuSwigMJQUStUuWoxmvgBBELb9vFJmJiifIKkiM+5+KagYQqSIOUgZd20= 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=AKJHIAGS; 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="AKJHIAGS" 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=qGcHMkkLF3N9VE5b7TI2+bVVwgt3KGz6m79RIO5dlKM=; b=AKJHIAGS0w8KFVWO7YxLwx2KbK +K5SDMxgnFLLtYyOwroTcTfo7oruE2p+7oMi8Qv8QTNyF0Nu/nF2LpG0LWqIxhZKozdWMwwO37pgd stUhqXlM1nrd8xn6jqGjJtMN/6WzIy81ZPA2ps7xelSYnpVIRsOpzax3W1A6U3kr5qDmkcSOhgF4a sxh/k2e5T0WaaipUFch0zVdUEACDGOIaFr1+E/kfzZBYaigBZxqHzHJW7NZHOv8p7E46Xe2c0FOMH DhkudrWw/8sJ6u96iZ4Rm17rmrVTpfszQo6kZj9+O3OevcMf588n0GZpSTuziT7tGBYB4Y5EQP8Ke la/BXp4w==; Received: from 2a02-8389-2341-5b80-1731-a089-d2b1-3edf.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:1731:a089:d2b1:3edf] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tDQnM-0000000Cyke-2CfS; Tue, 19 Nov 2024 16:09:41 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org Subject: [PATCH 2/6] block: return unsigned int from queue_dma_alignment Date: Tue, 19 Nov 2024 17:09:19 +0100 Message-ID: <20241119160932.1327864-3-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119160932.1327864-1-hch@lst.de> References: <20241119160932.1327864-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 The underlying limit is defined as an unsigned int, so return that from queue_dma_alignment as well. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 37439acfa34e..d1a6f4bc4a1c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1417,7 +1417,7 @@ static inline bool bdev_zone_is_seq(struct block_device *bdev, sector_t sector) return is_seq; } -static inline int queue_dma_alignment(const struct request_queue *q) +static inline unsigned int queue_dma_alignment(const struct request_queue *q) { return q->limits.dma_alignment; } From patchwork Tue Nov 19 16:09:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13880228 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 41F691C68BE for ; Tue, 19 Nov 2024 16:09:45 +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=1732032586; cv=none; b=XQ+FwTGTpoAXSaQoBeh3GG92Qx98KD5ps4X6Mb8tSVYJ2nAsdQvjbSuZ/b3oVktMDFCLv5p3XK9iitBxRB0P7otdFIq3yqg++AsrG27JdphI573B2jt/Efs/AKA0xENg3T0vZrhGKfl7Z9Qehxuk80GfGrn9LylXVlPebxqrask= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732032586; c=relaxed/simple; bh=1FMT/9SGFbwrELndbYX55OXCNi7CrHJAqmkkuVZzUqM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S/4X11DAhJ1uXdyXENOQ5wuQDRN1+cRrtndFVic5SgeIrh7E1nSL4lPB+GeNQr9xe2HJBDQ17XWGZC0FKJ8ApGN7na2AWMJ915rq43h6EheqE2JMPBoxvkbCFO/Wx8Zdblw2lytHRBnbd9FqwpM/1k4PknDshACdzKCDDBX6M7M= 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=z1hJ5cpd; 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="z1hJ5cpd" 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=MCBRXsww87D93uJSIYFgDNjMcfOj/eO6ivZMNXMtVJc=; b=z1hJ5cpd9RLoYjguh3gpMHKev+ DqJ9kT59GshTyZQLaBHNEMHleoZ59Yf2ByCKuqk6BMG9nouW7OmatZy61qu1+a+5euzsw/zU2AZK2 ywYJ4pZOIriCq7OYtio7LCLtZcnpR1o4cHQORBYiqXnbb7yg2dVJgTYIdkfqip6agdD9fVwNlsJM9 5i3mckU+AEZrOZyFc7d++x4AgfZlvSkLj0TkP/TVRbZAL2KCjlPCTVLtE0MFqtrOoV3FqZJcsWRV+ f3KIRu/YFa/v/Kf4PekW+EGyQ6/ElIlcAX4AkIe1Zz+V7CNVYP2XgIVgw6rzrkCjtk3+Zim4wb2xI j0KEP5Sg==; Received: from 2a02-8389-2341-5b80-1731-a089-d2b1-3edf.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:1731:a089:d2b1:3edf] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tDQnQ-0000000Cykz-1m6l; Tue, 19 Nov 2024 16:09:44 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org Subject: [PATCH 3/6] block: return unsigned int from blk_lim_dma_alignment_and_pad Date: Tue, 19 Nov 2024 17:09:20 +0100 Message-ID: <20241119160932.1327864-4-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119160932.1327864-1-hch@lst.de> References: <20241119160932.1327864-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 The underlying limits are defined as unsigned int, so return that from blk_lim_dma_alignment_and_pad as well. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- include/linux/blkdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d1a6f4bc4a1c..74e3c611a4f7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1458,7 +1458,8 @@ static inline bool bdev_iter_is_aligned(struct block_device *bdev, bdev_logical_block_size(bdev) - 1); } -static inline int blk_lim_dma_alignment_and_pad(struct queue_limits *lim) +static inline unsigned int +blk_lim_dma_alignment_and_pad(struct queue_limits *lim) { return lim->dma_alignment | lim->dma_pad_mask; } From patchwork Tue Nov 19 16:09:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13880229 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 CEBB01C68BE for ; Tue, 19 Nov 2024 16:09:47 +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=1732032589; cv=none; b=RwN4HzqsaXfyywYswulDm1RY3RC+5xYzy1fp7TLmtCxfdDCxW+7IymikM98AZ+STCkBXNBXTdaDph7S0GHvMz6BMhdggnxCBKqJzejwDcPu8QzpQ8sRn7XUXySXqqrr81moJENl34KD2EoXaiMjWvB6k2RsioYXDxWNlmU3Tz9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732032589; c=relaxed/simple; bh=mRLAukieIpgYj5W6lg8XEj9Nth42gb/5vA0OU3awmS8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DqLCk7hJ5PRvNIs0S4XhIDHMAetwGAg7diMBSJ45ZkFv7CuvF4rdsAhdqi0dkb/x034uRdtMa09dR/EKzygv8fqsWHUqlVKimXt3vLilrQk55Pbaq+M+h4w3WL+oq8AWOFJnGrwOlkI5g9McTmd09ofWMAiwIEpSfkW/5PXWkoc= 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=bpSKjkV9; 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="bpSKjkV9" 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=rE40UIvqEqxjwpkjyUCp11WR+Qlrti4zWWwusGbQMjM=; b=bpSKjkV95L+g6XMQKoCgFGN8z7 SWRp85SLUeAp1cIDOS2tuEsjluTAl55qGZJj8qrxHVrFtsWi00wLfT5AqEE2GPOYPtzvpeCcLIRS4 zVghqeGv+YjwI7gNOjfZR6bdMN1cnR9WS0/y6osg7lYrwjSC5CEfX68THOgAS1AVaSmzGrYP3prsO z4VEfiRFkBH9AfhgJNBcUwY+ycosOLdJLKRF6q34SWT5DahuMlZ41H3E5nN4zcMxubb6IwWJT2pRL 7CLG/y0u0ePpqkg7BcFqPYamdF7atLu389jNpQp5dJOhti9ZPm8QDAs1aqthMixUMxOb7+O3X0g/m zK+OkosQ==; Received: from 2a02-8389-2341-5b80-1731-a089-d2b1-3edf.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:1731:a089:d2b1:3edf] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tDQnS-0000000Cylu-3mYF; Tue, 19 Nov 2024 16:09:47 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org Subject: [PATCH 4/6] block: return bool from blk_rq_aligned Date: Tue, 19 Nov 2024 17:09:21 +0100 Message-ID: <20241119160932.1327864-5-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119160932.1327864-1-hch@lst.de> References: <20241119160932.1327864-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 blk_rq_aligned returns a boolean condition, don't mascquerade it as int. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 74e3c611a4f7..e4fc967e8cb9 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1464,7 +1464,7 @@ blk_lim_dma_alignment_and_pad(struct queue_limits *lim) return lim->dma_alignment | lim->dma_pad_mask; } -static inline int blk_rq_aligned(struct request_queue *q, unsigned long addr, +static inline bool blk_rq_aligned(struct request_queue *q, unsigned long addr, unsigned int len) { unsigned int alignment = blk_lim_dma_alignment_and_pad(&q->limits); From patchwork Tue Nov 19 16:09:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13880230 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 715AF1C68BE for ; Tue, 19 Nov 2024 16:09:51 +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=1732032592; cv=none; b=AMbm76PlxB7o4EM6mXO3EY2CEl3vRZHOJuu1jmpsk4fVM9h9rg0m5yveoQABoX0ow/ROx5FmgIMageRd90cUsi6OVunDPZQHhDag51oTXSd1cUID/5kKW2b7ru5uoEes9byCXL+bPda7SgKKw38qhMrILmfzgyKK0ilLjeIcmH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732032592; c=relaxed/simple; bh=TDCzhPd6p+L3lX2ARyL7hMBsqNMn41zO9a99N+P1hfY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AuLltF4Xgkz5J1FtO2/A/Th8L3MbrBeqzTjGzE7bFGXvnzbanC4enz275SCOifXCcTfxvPJRMkv7pzJmcgcNtR7gufN6U4yp6dtTyvffQS4VAismXlZV/BVpit/2thTOzEmN1nymn+wgXYLDH3DVg+Nbx7lLoaG9l4bBoj6hyvI= 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=IDVog/Ca; 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="IDVog/Ca" 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=1b9Xv4/vvL/9ZsDPTiC1iS2VEPwEcbtgu0kRuHezA0c=; b=IDVog/CaMgrnSdnrtvbdEKwdIu uplmAt3janzy0sgmam/1RrNgaluPoZUQk2fDsABnYJ95oczf+IC+9UpNarDHLbKW8m3CwbwdnkRGb fnnONE4sUQXakGBNHYYLDt81yrE7IqIJtQQfMvtj3M7o8IG3ejcf3A42iUYGOrJfqCeApCNI/a8pu +lxb3Vybg0ux4V1rgj/nROyok2LNqn7rLZta7mJRLiVyp6MukTZuWRfyuH8hs87KCVJ3iniYJxU3b 7psv2XHl5jFT0Okeiog0iCuQKuK0LXMCDCespqPYEzeM3uQiAxHQscoxHw9MPyKGb7mo61uDtWhY4 XptFMYnA==; Received: from 2a02-8389-2341-5b80-1731-a089-d2b1-3edf.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:1731:a089:d2b1:3edf] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tDQnW-0000000Cymm-1x1O; Tue, 19 Nov 2024 16:09:51 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org Subject: [PATCH 5/6] block: remove a duplicate definition for bdev_read_only Date: Tue, 19 Nov 2024 17:09:22 +0100 Message-ID: <20241119160932.1327864-6-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119160932.1327864-1-hch@lst.de> References: <20241119160932.1327864-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 bdev_read_only is already defined as an inline function in blkdev.h. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- include/linux/blkdev.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e4fc967e8cb9..957767c0cafd 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1582,7 +1582,6 @@ static inline void bio_end_io_acct(struct bio *bio, unsigned long start_time) return bio_end_io_acct_remapped(bio, start_time, bio->bi_bdev); } -int bdev_read_only(struct block_device *bdev); int set_blocksize(struct file *file, int size); int lookup_bdev(const char *pathname, dev_t *dev); From patchwork Tue Nov 19 16:09:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13880231 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 A952E1D0178 for ; Tue, 19 Nov 2024 16:09:55 +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=1732032596; cv=none; b=OOF9L0r0PypUbpI8r8BsdT2gbhGHlFt77gfuKgGm67haHOTOD7coPduQr4NFZHuft74buxuIardejcx9zvOMzC8sbKHBS3Bl4seQoMa3ixwIca4l25fVU4Pd+iQP46hpaU6cjvdehiQv1eyrIMYO+yXAtOOHC4m7T9ye5nJDo/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732032596; c=relaxed/simple; bh=0f6S0RB/AiU5GiFN38vADG3jqi+SBgwUjcGvL8yG4M8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mqVR0TCLeGOPRppgX2JWhFtaRg0FKh2E7xTXtbLTO1WplugNJze/762oGFvsMg8h8InJh7M4EP3QSywik7S7u7jeVbeG9udXYo8uJfOmMrs9rO/8/mJwDXVJQH5S4zIiH63EIqRQ6iRF6Y9M8FXwXOaCotLOtGByGOTvBSqFJps= 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=baFKwbeK; 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="baFKwbeK" 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=fxTizBwkU/S+vMp14/1RVvZVh9j3GPyxNt8KwLd+5RU=; b=baFKwbeK2uMsn52PHkCm3flcJZ EPEsYhYOKOy0t2LCa17lTu7JXkmV3WddJXgjUG07xVJ8Fli/Zue9+p7n8e+6NR2zGms7MIIPbIyFg qssM3X+dO83DTBPkyArVMl5xorrs2kDNYgQe3n6OoLCdeTADOaRqcN8AdDUZiUfYJJ0MsYkjOshV4 zUl9FZB9/7OFxoUO76P62TpEfTUwS3fUrGtcDq/uC3rhnE8mS6MG55kundAJL3QLW3SOaLw4CVCkq 6I6ION4yEevEySwRFpaNymeSuIi2j3u74rEYJ66Gn5gE+Fej61eaMNl5HBOEZ+7cgD5Xu2K0xX+U8 yGHB3KJg==; Received: from 2a02-8389-2341-5b80-1731-a089-d2b1-3edf.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:1731:a089:d2b1:3edf] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tDQna-0000000CynZ-2o5E; Tue, 19 Nov 2024 16:09:55 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org Subject: [PATCH 6/6] block: return bool from get_disk_ro and bdev_read_only Date: Tue, 19 Nov 2024 17:09:23 +0100 Message-ID: <20241119160932.1327864-7-hch@lst.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119160932.1327864-1-hch@lst.de> References: <20241119160932.1327864-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 get_disk_ro and bdev_read_only return boolean conditions, don't masquerade them as int. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- include/linux/blkdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 957767c0cafd..f2c0868544a3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -775,13 +775,13 @@ static inline void bdev_clear_flag(struct block_device *bdev, unsigned flag) atomic_andnot(flag, &bdev->__bd_flags); } -static inline int get_disk_ro(struct gendisk *disk) +static inline bool get_disk_ro(struct gendisk *disk) { return bdev_test_flag(disk->part0, BD_READ_ONLY) || test_bit(GD_READ_ONLY, &disk->state); } -static inline int bdev_read_only(struct block_device *bdev) +static inline bool bdev_read_only(struct block_device *bdev) { return bdev_test_flag(bdev, BD_READ_ONLY) || get_disk_ro(bdev->bd_disk); }