From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B048CC761A6 for ; Thu, 30 Mar 2023 15:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233521AbjC3Pw2 (ORCPT ); Thu, 30 Mar 2023 11:52:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233505AbjC3PwY (ORCPT ); Thu, 30 Mar 2023 11:52:24 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D622DE1AD; Thu, 30 Mar 2023 08:51:59 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E7EC321A44; Thu, 30 Mar 2023 15:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1680191504; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2yS40KCGRn33M8KOiRBih+sriFcKgmpqdM+Nv90LiDU=; b=MFS5n40yxVAJF9ZO+WaiYvkkpgBDqrv9lgebTzMeE1hI+hm4f7RZcVq/aMPquuCibm4WDb LRmREwdLyX3d2H3T+KlqlbYXmXRmouPrPQa2u7HWoHjP/db/A/ksgwv8RGSdw0GsSdscas 0tyjAoJ2+DXv2pdfoarhmeZnqqeyauQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1680191504; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2yS40KCGRn33M8KOiRBih+sriFcKgmpqdM+Nv90LiDU=; b=cRXQrMF8Zho2lVcr5CfxyUDFpcyx+CZ3wYvx/HWOczyJAbF0WSnRlIHHHz5Z2RU/Y1x4fP bvQUDtYlWWMz+gDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 737D31348E; Thu, 30 Mar 2023 15:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id l9JXGxCwJWRXWAAAMHmgww (envelope-from ); Thu, 30 Mar 2023 15:51:44 +0000 Date: Thu, 30 Mar 2023 17:45:29 +0200 From: David Sterba To: Johannes Thumshirn Cc: Jens Axboe , Christoph Hellwig , Hannes Reinecke , Chaitanya Kulkarni , Damien Le Moal , Ming Lei , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, Song Liu , linux-raid@vger.kernel.org, Mike Snitzer , Matthew Wilcox , Dave Kleikamp , jfs-discussion@lists.sourceforge.net, cluster-devel@redhat.com, Bob Peterson , Andreas Gruenbacher , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [PATCH v2 00/19] bio: check return values of bio_add_page Message-ID: <20230330154529.GS10580@twin.jikos.cz> Reply-To: dsterba@suse.cz References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org On Thu, Mar 30, 2023 at 03:43:42AM -0700, Johannes Thumshirn wrote: > We have two functions for adding a page to a bio, __bio_add_page() which is > used to add a single page to a freshly created bio and bio_add_page() which is > used to add a page to an existing bio. > > While __bio_add_page() is expected to succeed, bio_add_page() can fail. > > This series converts the callers of bio_add_page() which can easily use > __bio_add_page() to using it and checks the return of bio_add_page() for > callers that don't work on a freshly created bio. > > Lastly it marks bio_add_page() as __must_check so we don't have to go again > and audit all callers. > > Changes to v1: > - Removed pointless comment pointed out by Willy > - Changed commit messages pointed out by Damien > - Colledted Damien's Reviews and Acks > > Johannes Thumshirn (19): > btrfs: repair: use __bio_add_page for adding single page > btrfs: raid56: use __bio_add_page to add single page The btrfs patches added to misc-next, thanks.