Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2271528pxm; Fri, 4 Mar 2022 12:48:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvYWMQMNJB6KnSx0FulBQNQ2v3Wg7T5heBtdPbqafR78yAj2YMK0i3f7gjVznUC8977c5/ X-Received: by 2002:a17:90b:e08:b0:1bc:2b0c:65aa with SMTP id ge8-20020a17090b0e0800b001bc2b0c65aamr474214pjb.102.1646426918866; Fri, 04 Mar 2022 12:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646426918; cv=none; d=google.com; s=arc-20160816; b=fmlFjlrLme60N60Fou98uPl4x/rX9qpxDoFF6MJuYYxAP/T8UfAgm8p0gTl4fd/OmZ gwkbwRLyueLx68x3XYouxEUmH35c2vc+t5/oiTkjRi3iJxP8+g4PGiMif6hqRm7E7+BB 5zeSjJ10T9D4zuuJlFmqsv0owlR+dIsdgInIxX2+Wc71YMVXbglMIPMXaJ1UKxxpp0oF wjlgCvqVXIbk4FuGW+lTk/0JBl6xTPY1sK0EA8GMOxfjqhrofAGZ+Xg26uoNe79abrfZ 1LHXGVsp3uqyQ2tWveKxdjzT5L7//cPZMQQ6MZ1khnk4T4O0GsWEFU8I34Vit+iY15VH atFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TXHPPxvwtzvMtdsUljGyaxXJrKMSKYgrNthonkKeeGA=; b=dL50qdKmspvjd7NwlKvreHtP2FysyXkNp2y/l5o4MEIC6VY9Xqf/MnWAKp3aZP6jX9 8RagdJ+KyIRNvy+r8tOtbHTQvC9GCM3XnA9P76L0A2OutteCqsMv9U9g6ykcuaKRGT78 YN+W9lVbD6M8qEmAzC32gzc1ppJ6PvIzj6x+biYnDY4LrjMC1PEmI+SMmmcw98yIuH7D /bAEf86eV5QAXyoo66Vw9CX2OZ41ljtada+gtBuk62QSS0hyGOVqNxuvnr6/YPI1muIa Kf9KYuq9vyGD62IiqWRwrrE9J504xJT6aM7stVnaXbHAvIN03leXHRfhmrbwfX8vj2S5 vriQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WfZBXhh7; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h189-20020a6383c6000000b0037fef3193f5si643957pge.873.2022.03.04.12.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:48:38 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WfZBXhh7; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5CD1871EC7; Fri, 4 Mar 2022 11:49:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229808AbiCDTPj (ORCPT + 99 others); Fri, 4 Mar 2022 14:15:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbiCDTPi (ORCPT ); Fri, 4 Mar 2022 14:15:38 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D5811F1601; Fri, 4 Mar 2022 11:14:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CD5ACB82B66; Fri, 4 Mar 2022 19:14:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D197C340EE; Fri, 4 Mar 2022 19:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646421280; bh=z9QOAPrGETQ++HWZY4bwoQ4oWyQg3KZKh7KMFBI9D3k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WfZBXhh7cjSx2qbz7lyWNwyYegtc9BVoVASPBl+AYWSzGRgv/lZrbKWP96hd5yKsr sywrXu/hIEvE8UpLbSggbSUenfSEL143wXvWyl2AKiKPE5x3PvCVH1llOmPP/UH0F+ KvDKVIy2mG+ICjhAVP6GhOXjDlGHUBIKLkxTa+JPGfIgQZJkk5YwjG+GdC8RrHfQ/y pcqcE1vFzhoU5skSDKZ6APVVNM+SeVRterRiquSWy1mP0jlJQhJY2wVwHxMhjgVsyy 36EKJ2NOW8UYdHfiHLakr6VypzkBPNalh8bZIqMKevUtnaKAQBaVjXelfkn5GM0ekY zVb1qMo7OXvwA== Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-2dbc48104beso102387777b3.5; Fri, 04 Mar 2022 11:14:40 -0800 (PST) X-Gm-Message-State: AOAM532FSOkPnuyEM8uiVMsLj/xL55Jgk2c0T0qLeOILqA8uDKCRcFEB RpsJr3qAcjMAJBMEb15gcnyGXLayslYUAKbnz4E= X-Received: by 2002:a81:23ce:0:b0:2dc:b20:cc73 with SMTP id j197-20020a8123ce000000b002dc0b20cc73mr51033ywj.130.1646421279615; Fri, 04 Mar 2022 11:14:39 -0800 (PST) MIME-Version: 1.0 References: <20220304180105.409765-1-hch@lst.de> <20220304180105.409765-7-hch@lst.de> In-Reply-To: <20220304180105.409765-7-hch@lst.de> From: Song Liu Date: Fri, 4 Mar 2022 11:14:28 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 06/10] md-multipath: stop using bio_devname To: Christoph Hellwig Cc: Jens Axboe , "Theodore Ts'o" , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-raid , linux-ext4@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Mar 4, 2022 at 10:01 AM Christoph Hellwig wrote: > > Use the %pg format specifier to save on stack consuption and code size. > > Signed-off-by: Christoph Hellwig Acked-by: Song Liu > --- > drivers/md/md-multipath.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c > index c056a7d707b09..bc38a6133cda3 100644 > --- a/drivers/md/md-multipath.c > +++ b/drivers/md/md-multipath.c > @@ -294,7 +294,6 @@ static void multipathd(struct md_thread *thread) > > md_check_recovery(mddev); > for (;;) { > - char b[BDEVNAME_SIZE]; > spin_lock_irqsave(&conf->device_lock, flags); > if (list_empty(head)) > break; > @@ -306,13 +305,13 @@ static void multipathd(struct md_thread *thread) > bio->bi_iter.bi_sector = mp_bh->master_bio->bi_iter.bi_sector; > > if ((mp_bh->path = multipath_map (conf))<0) { > - pr_err("multipath: %s: unrecoverable IO read error for block %llu\n", > - bio_devname(bio, b), > + pr_err("multipath: %pg: unrecoverable IO read error for block %llu\n", > + bio->bi_bdev, > (unsigned long long)bio->bi_iter.bi_sector); > multipath_end_bh_io(mp_bh, BLK_STS_IOERR); > } else { > - pr_err("multipath: %s: redirecting sector %llu to another IO path\n", > - bio_devname(bio, b), > + pr_err("multipath: %pg: redirecting sector %llu to another IO path\n", > + bio->bi_bdev, > (unsigned long long)bio->bi_iter.bi_sector); > *bio = *(mp_bh->master_bio); > bio->bi_iter.bi_sector += > -- > 2.30.2 >