From patchwork Wed May 7 12:04:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 888442 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 ADB0B25C6F0; Wed, 7 May 2025 12:05: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=1746619535; cv=none; b=WMqkfIriiPALYh4F+YPRMoj6Y4jVfw9SjN+sVpM4NCkuWk9t9oHBfQJVK5zQsa6nOWe4yZkGioNnVLf4o0ue3D4QYM2JaYE0QMLlGIFQ4cnW1CUTcTKWDQfEUGBOpMttEG2HjWFQ8inyxh8RHS2YA10PwO6xI0Q5QdmPipN/i3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746619535; c=relaxed/simple; bh=r/4uXpLu6SxfMrlpQwKym/ZAJ5Voc92QE1izig7ETbo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BBjeWCY+wYnZSaNb15KsjbPjsC/NaHuoF/AzCGALjRFdeUEAGbJpOy4wBcjgcIuGuiOx0O0UUuTXp0XCxflFWPjgczT0qX1G9hXSuX3mtfDBe3e7b7FixIOmmEur1SVMfIPBZbboIPvprEFD1xnTX765xWNvithgLwfVA0/6JkA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (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=L4wCo6mm; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (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="L4wCo6mm" 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=hoyLRL4l0YBDiYIBVW1HmnRQajkppdVGqa1VHKdDYqU=; b=L4wCo6mm/8FSEz50f7cpTDKZwI GndGGl/YF4EakaQbBXSncpCjta9+dsxL0DhchGwDFDWkNKBU1tMrQ4uNUQjR9Aw7AAZJKIevHLZHU 9ywR/lrgWkNrBGMlNy+QOZAmuRfNWnahNRoIqoMwz2OZDxta0rLEx+2MiBvx72XNWdQaTQNXmyKN8 EjgF/nTfQZ11VDZ96qR5QVO/6pxRe9EeM39Bl3Mp9Ir23wl47swEj4bDDW1U10EN+9QOWxYrDsnbQ mICZ/0hvY3Fdu+lAkHUe1xD7b/N6Eyh1ClfLKRfPDHG9WxDa1ci2U4/nHp0UnkvcTd0C2uaFcDehn fidb8g0w==; Received: from [2001:4bb8:2cc:5a47:1fe7:c9d0:5f76:7c02] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1uCdWm-0000000FJDz-3RHV; Wed, 07 May 2025 12:05:33 +0000 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org, "Md. Haris Iqbal" , Jack Wang , Coly Li , Kent Overstreet , Mike Snitzer , Mikulas Patocka , Chris Mason , Josef Bacik , David Sterba , Andreas Gruenbacher , Carlos Maiolino , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , "Rafael J. Wysocki" , Pavel Machek , slava@dubeyko.com, glaubitz@physik.fu-berlin.de, frank.li@vivo.com, linux-bcache@vger.kernel.org, dm-devel@lists.linux.dev, linux-btrfs@vger.kernel.org, gfs2@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-pm@vger.kernel.org, Johannes Thumshirn Subject: [PATCH 13/19] dm-bufio: use bio_add_virt_nofail Date: Wed, 7 May 2025 14:04:37 +0200 Message-ID: <20250507120451.4000627-14-hch@lst.de> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250507120451.4000627-1-hch@lst.de> References: <20250507120451.4000627-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-pm@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 Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the bio_add_virt_nofail helper implementing it. Signed-off-by: Christoph Hellwig Acked-by: Mikulas Patocka Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn --- drivers/md/dm-bufio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 9c8ed65cd87e..e82cd5dc83ce 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1362,7 +1362,7 @@ static void use_bio(struct dm_buffer *b, enum req_op op, sector_t sector, ptr = (char *)b->data + offset; len = n_sectors << SECTOR_SHIFT; - __bio_add_page(bio, virt_to_page(ptr), len, offset_in_page(ptr)); + bio_add_virt_nofail(bio, ptr, len); submit_bio(bio); }