From patchwork Wed Sep 18 16:57:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Martin X-Patchwork-Id: 1986917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X84Zb4jPqz1y2j for ; Thu, 19 Sep 2024 02:57:27 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sqxzU-0005ep-EA; Wed, 18 Sep 2024 16:57:20 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sqxzS-0005dr-6Z for kernel-team@lists.ubuntu.com; Wed, 18 Sep 2024 16:57:18 +0000 Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 880593F12E for ; Wed, 18 Sep 2024 16:57:15 +0000 (UTC) Received: by mail-il1-f200.google.com with SMTP id e9e14a558f8ab-3a04c2472f6so97769545ab.0 for ; Wed, 18 Sep 2024 09:57:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726678634; x=1727283434; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FqIXhXpAnKroieUn83vCeNdKlniAfU0to4ET2diivGc=; b=Wmrv3oXeIJaYyGauu6EvryD0C88OkSDZmwU5olwQ+SDN+CVXMGkC0gN8z0Id0+eXzw pxJvpryfRQJVn7qdUBwDKJ+tSVyF5J9ta9ePV5iPl1PgULJFpqTUi6nVJ68jxBSiClPb hka3fWmG5fDgJeaX3K+8kDYSDF+2fpSoEYjGVOcRQEVZ3DxPlvFJteoNDKa17HIZ5CuM sVKkKRbwmeBUaF0iC7m+aKQ3DHHABnypaD7YO0M1UAhLUzwnxmel+wVR796oQwdYEYKR kzfbLidXFt95xTT0ULlOFCDjPROrUYvqrkBgGFFbVzevpvk2MgN3tcvNvP0ojVr4ZFXY /cyw== X-Gm-Message-State: AOJu0YwG0tL/ooJJoMIxNJ03ykhjB5qYS63NlZ9PxakCzg50TD7ChCcz G7QODfq/VDtbimbDXaHqv6ucwpRfWZmVRhpS0pLonuMn3hCuRSmBxDYW+YC6/3zxw3UFviKQOu+ jWYVhQKN1j6YQUv/1wXHjrmKyBTTwmM+liY+naCtAmy0lw1eTARUwijP0RljtyTc2URsM6Ww7fN R3d+RYfeOORg== X-Received: by 2002:a05:6e02:1e03:b0:39e:78d9:ebf4 with SMTP id e9e14a558f8ab-3a08b7a9869mr170762555ab.22.1726678634466; Wed, 18 Sep 2024 09:57:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG22n77tKGZZm5yUxEWSL76Q/Vj5V0oj6VOyY1PdHzNdi1h/n3BtsJRXJ0VnTBi7e1q1pfujA== X-Received: by 2002:a05:6e02:1e03:b0:39e:78d9:ebf4 with SMTP id e9e14a558f8ab-3a08b7a9869mr170761475ab.22.1726678631302; Wed, 18 Sep 2024 09:57:11 -0700 (PDT) Received: from jacob-XPS-15-9570.buildd ([2601:441:8201:e8ff:3364:8abf:1e5b:eff5]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d37ed35368sm2515995173.138.2024.09.18.09.57.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 09:57:10 -0700 (PDT) From: Jacob Martin To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal][PATCH v3 1/1] bdi: use bdi_dev_name() to get device name Date: Wed, 18 Sep 2024 11:57:04 -0500 Message-ID: <20240918165704.60724-2-jacob.martin@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240918165704.60724-1-jacob.martin@canonical.com> References: <20240918165704.60724-1-jacob.martin@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yufen Yu BugLink: https://bugs.launchpad.net/bugs/2081085 Use the common interface bdi_dev_name() to get device name. Signed-off-by: Yufen Yu Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Bart Van Assche Add missing include BFQ Signed-off-by: Jens Axboe (cherry picked from commit d51cfc53ade3189455a1b88ec7a2ff0c24597cf8) Signed-off-by: Jacob Martin --- block/bfq-iosched.c | 6 ++++-- block/blk-cgroup.c | 2 +- fs/ceph/debugfs.c | 2 +- include/trace/events/wbt.h | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index c73c8b0f5e40..e35ecd2bdff1 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -123,6 +123,7 @@ #include #include #include +#include #include "blk.h" #include "blk-mq.h" @@ -5006,8 +5007,9 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio); switch (ioprio_class) { default: - dev_err(bfqq->bfqd->queue->backing_dev_info->dev, - "bfq: bad prio class %d\n", ioprio_class); + pr_err("bdi %s: bfq: bad prio class %d\n", + bdi_dev_name(bfqq->bfqd->queue->backing_dev_info), + ioprio_class); /* fall through */ case IOPRIO_CLASS_NONE: /* diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index cd085a0e5e4a..510c85e80f64 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -495,7 +495,7 @@ const char *blkg_dev_name(struct blkcg_gq *blkg) { /* some drivers (floppy) instantiate a queue w/o disk registered */ if (blkg->q->backing_dev_info->dev) - return dev_name(blkg->q->backing_dev_info->dev); + return bdi_dev_name(blkg->q->backing_dev_info); return NULL; } diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index c4947688134b..3b6f28827113 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -271,7 +271,7 @@ void ceph_fs_debugfs_init(struct ceph_fs_client *fsc) &congestion_kb_fops); snprintf(name, sizeof(name), "../../bdi/%s", - dev_name(fsc->sb->s_bdi->dev)); + bdi_dev_name(fsc->sb->s_bdi)); fsc->debugfs_bdi = debugfs_create_symlink("bdi", fsc->client->debugfs_dir, diff --git a/include/trace/events/wbt.h b/include/trace/events/wbt.h index 37342a13c9cb..9996420d7ec4 100644 --- a/include/trace/events/wbt.h +++ b/include/trace/events/wbt.h @@ -33,7 +33,7 @@ TRACE_EVENT(wbt_stat, ), TP_fast_assign( - strlcpy(__entry->name, dev_name(bdi->dev), + strlcpy(__entry->name, bdi_dev_name(bdi), ARRAY_SIZE(__entry->name)); __entry->rmean = stat[0].mean; __entry->rmin = stat[0].min; @@ -68,7 +68,7 @@ TRACE_EVENT(wbt_lat, ), TP_fast_assign( - strlcpy(__entry->name, dev_name(bdi->dev), + strlcpy(__entry->name, bdi_dev_name(bdi), ARRAY_SIZE(__entry->name)); __entry->lat = div_u64(lat, 1000); ), @@ -105,7 +105,7 @@ TRACE_EVENT(wbt_step, ), TP_fast_assign( - strlcpy(__entry->name, dev_name(bdi->dev), + strlcpy(__entry->name, bdi_dev_name(bdi), ARRAY_SIZE(__entry->name)); __entry->msg = msg; __entry->step = step; @@ -141,7 +141,7 @@ TRACE_EVENT(wbt_timer, ), TP_fast_assign( - strlcpy(__entry->name, dev_name(bdi->dev), + strlcpy(__entry->name, bdi_dev_name(bdi), ARRAY_SIZE(__entry->name)); __entry->status = status; __entry->step = step;