Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2271495pxm; Fri, 4 Mar 2022 12:48:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrpm0f14jfmXbiqhVnituX8NB7/n2hzKttQ1lJKi98iYN4P1ipNIB12nk8DGSlmR5Z3BOC X-Received: by 2002:a63:4704:0:b0:373:bbb2:e0ed with SMTP id u4-20020a634704000000b00373bbb2e0edmr164523pga.625.1646426915758; Fri, 04 Mar 2022 12:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646426915; cv=none; d=google.com; s=arc-20160816; b=ZO/8h7q6LTTNIr6QamY28v641IbCZZvjDwOd6rtARTaai4L7/QaR2fq8ETq3AagtuR u1Axit86BEIjdmZHbbxrDFoelWD+VDjPsoJePYnAUnABa2A/Gm+affmrUxTV9c+5B/25 AcJsg/qRQwrFnsHN98VOyS0uHOWkDGI70zidRcbEIv5oYKW0FGNFUH7eIQBjip/mgadN nYp1gbZd7pwYdo9U2N7SgRbhDNcY/sk6C7bBwtOjbheCnGtzEmRTDPqPtaF14dThQLmI ow19/azNi3DYzArOTvZMGC2rZx53z2/jAm3pucjjeC5kbM2dMoTVlWRmeRxVqyiWklKi +rtg== 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=YSJifMegWb/nUnxqwYr3mmsgHbK2GgKXmBj0NYksjR0=; b=ZVOE6tHkKbZpeFnv6H4YnMj7pVP7iKUUSJtxJa/MqEo9+BlenI7K9d6ya9NyeoSiWU d0JOW1g3ay91B30K6vDENHQ5yDDxRIvJfMLo8ejHi2df4VQJxcKtR/9bNkpwj7CxzQSc M1p3B/BQEjzq+0r0iAJDX5nTmncQqRzItDXqcetWyOXLvqJvElEb4BV4ONQiWB2AVe0t qL3V695G1q6XeUjkin+3RfID6+j9vFJXaG4kVrQi345wAX3Zk+gStviEK2593DAq7vOi TAgnS0wGlOP5TmXqFRM4mW+mamFsPwrMC4l/2ECNkOW6m0Sa/vFtoo738ZzbGqWN0DME 84VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mz+hl6Du; 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 d4-20020a17090abf8400b001bd14e01f89si458506pjs.119.2022.03.04.12.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:48:35 -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=mz+hl6Du; 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 8B2D82BE183; Fri, 4 Mar 2022 11:49:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbiCDTQJ (ORCPT + 99 others); Fri, 4 Mar 2022 14:16:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbiCDTQI (ORCPT ); Fri, 4 Mar 2022 14:16:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A579E220FF8; Fri, 4 Mar 2022 11:15:11 -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 65C0CB82A4D; Fri, 4 Mar 2022 19:15:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14805C340F4; Fri, 4 Mar 2022 19:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646421309; bh=2brRnpBI5uL9EXGyu77bABaF+hmuzCTaJNlfz90L6mk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mz+hl6DuNxuSfuyVRhOoQk4zpRxzdbqx+REc2oCmRtjEHE6NzKCAcgZAlILNqCyWF FuVsid4LJS92O9L01HIoRVObyt0n95plMYmGaaV6gFE8ACUgXbofLKdOER9zoFK2qw KxuAcYWzm/v3TdbwA+OEYa5NdS1XJ3Bf9+0ayd0kY02o3yrJTyUG/9DYcNCVYqnI+w pTDKqDIhofUqq3hUmnaOcZKiEJgITcuRpTkWeXi2wxX3hk/ndPAWXB5F3JWdRTA3tw 7D4vrYrIEuKD9HgAu3VtL/emy1bi8s30XTx/zjSuyg5qzARUKdxPLdoN+uM0XNhpGJ QZ6+65xjX3oXA== Received: by mail-yb1-f169.google.com with SMTP id f38so18808220ybi.3; Fri, 04 Mar 2022 11:15:09 -0800 (PST) X-Gm-Message-State: AOAM533RUwvjYS/DVSGJEwEQ/GPF21001GFsqMuCoFZHoY2U79sLQgSP 3iQHwAB5Kf+UjjH6vSAMvI5i/7913LhB3lCQBuY= X-Received: by 2002:a05:6902:1ca:b0:624:e2a1:2856 with SMTP id u10-20020a05690201ca00b00624e2a12856mr39674753ybh.389.1646421307924; Fri, 04 Mar 2022 11:15:07 -0800 (PST) MIME-Version: 1.0 References: <20220304180105.409765-1-hch@lst.de> <20220304180105.409765-9-hch@lst.de> In-Reply-To: <20220304180105.409765-9-hch@lst.de> From: Song Liu Date: Fri, 4 Mar 2022 11:14:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 08/10] raid5-ppl: 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/raid5-ppl.c | 13 ++++--------- > 1 file changed, 4 insertions(+), 9 deletions(-) > > diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c > index 93d9364a930e3..845db0ba7c17f 100644 > --- a/drivers/md/raid5-ppl.c > +++ b/drivers/md/raid5-ppl.c > @@ -416,12 +416,10 @@ static void ppl_log_endio(struct bio *bio) > > static void ppl_submit_iounit_bio(struct ppl_io_unit *io, struct bio *bio) > { > - char b[BDEVNAME_SIZE]; > - > - pr_debug("%s: seq: %llu size: %u sector: %llu dev: %s\n", > + pr_debug("%s: seq: %llu size: %u sector: %llu dev: %pg\n", > __func__, io->seq, bio->bi_iter.bi_size, > (unsigned long long)bio->bi_iter.bi_sector, > - bio_devname(bio, b)); > + bio->bi_bdev); > > submit_bio(bio); > } > @@ -589,9 +587,8 @@ static void ppl_flush_endio(struct bio *bio) > struct ppl_log *log = io->log; > struct ppl_conf *ppl_conf = log->ppl_conf; > struct r5conf *conf = ppl_conf->mddev->private; > - char b[BDEVNAME_SIZE]; > > - pr_debug("%s: dev: %s\n", __func__, bio_devname(bio, b)); > + pr_debug("%s: dev: %pg\n", __func__, bio->bi_bdev); > > if (bio->bi_status) { > struct md_rdev *rdev; > @@ -634,7 +631,6 @@ static void ppl_do_flush(struct ppl_io_unit *io) > > if (bdev) { > struct bio *bio; > - char b[BDEVNAME_SIZE]; > > bio = bio_alloc_bioset(bdev, 0, GFP_NOIO, > REQ_OP_WRITE | REQ_PREFLUSH, > @@ -642,8 +638,7 @@ static void ppl_do_flush(struct ppl_io_unit *io) > bio->bi_private = io; > bio->bi_end_io = ppl_flush_endio; > > - pr_debug("%s: dev: %s\n", __func__, > - bio_devname(bio, b)); > + pr_debug("%s: dev: %ps\n", __func__, bio->bi_bdev); > > submit_bio(bio); > flushed_disks++; > -- > 2.30.2 >