Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1865054rwb; Fri, 19 Aug 2022 10:40:06 -0700 (PDT) X-Received: by 2002:a17:90b:1a88:b0:1f7:3daa:f2f6 with SMTP id ng8-20020a17090b1a8800b001f73daaf2f6mr15363747pjb.245.1660930566893; Fri, 19 Aug 2022 10:36:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5KdBFHniZe62qreEo9CGhWC1+lChnVDIvkXg+uQtV+3OyMcb0UVKRfydpyj63mMzjpc8U3 X-Received: by 2002:a17:90b:1a88:b0:1f7:3daa:f2f6 with SMTP id ng8-20020a17090b1a8800b001f73daaf2f6mr15363634pjb.245.1660930565534; Fri, 19 Aug 2022 10:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930565; cv=none; d=google.com; s=arc-20160816; b=fmBhAsd8oPVKAw45JDl/UqlAf7PNB/K2tQ6laWIfvsNG38v5sguw4aYFtZW023A5Hr Q8QCisNtC4LwwQu3vDayPzcvPLSNH7YmWpYzJ6AarmjYk89i4Xj7YDLGQRNPY3F5dbnn EqeWicAIawdQV9XUxZZ6sG4qeZ5yrzGJNN7RnDQ6BYpfShjfghFDxCYKI8gfyvOL85hI 4fVoqYhq3LjrJhU7remZpE/wXQipi670Emcvm9VrrnLM5OBIeAlPFQDYkC3CMwlZmZWB jPFVK5ne+fphNEjE4GNP5EFIpC8ZMiyoyqZN726G4rdTbseC4YcsdSDVX07c6btwpBAo 9Wqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GNmuGaVPLmicnLiPxT4bK/1aJR97k7F6qCPmlH+rclc=; b=hMVL/eYg7O3iQeKiwWa+qR8xTsAI3GZN0LAtsJpievyciFzj7ffgra9dRfFGRjqIOt r/xoyf+/sHuJZ23HJ/S4ydyPvigOC8zg3FeeNxpdVIqcdBDFwKNv7TTD4+bfxmCRNMCD 3q0WvY4kvskARrX7VHic2FPDEFALwQOQFoRcmjUoRL5kM+1EifLggCOwwlLNmT1OZkH+ 4ajW27j/VS+0I7s24vzVp5pFDfpWxA/t/OI/6CDhnTA+JmtF4EgCr0tzMNdhOtp6vTZR OSes5BH/OzhrdVQzRnN6gqWaGkKC8ZJVEkJn+XdTadPu2MBm1drKXM+7TRxUNGSHjC3J ZjAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OgkuIGHk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j36-20020a63fc24000000b0040dd4d169a3si4513473pgi.858.2022.08.19.10.35.54; Fri, 19 Aug 2022 10:36:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OgkuIGHk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351087AbiHSQDO (ORCPT + 99 others); Fri, 19 Aug 2022 12:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351094AbiHSQAj (ORCPT ); Fri, 19 Aug 2022 12:00:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EEA3109753; Fri, 19 Aug 2022 08:52:35 -0700 (PDT) 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 DA334B827F8; Fri, 19 Aug 2022 15:52:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34213C433C1; Fri, 19 Aug 2022 15:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924353; bh=2P86ZKNFEU5wzeVoOvbD8JQFIyb0ga6RcvV8rBd+ApA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OgkuIGHkAKjP6dJ76AJGzhaf1HghFqW15u7XefNHvAtgkJ/ms3WblJhZPNzQtMPZF r6sDWg3u4DT3U+f2P/OlrKvwuDYQqEYAW1ZL2JjUbQJFfVa884UhTnRMfReiXmqDHO 3nZACIe0r+5V9nyOYu2bYXrRXKJIuNZzRBqcSW8c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Junichi Nomura , Mike Snitzer , Mike Christie , Li Zefan , Chaitanya Kulkarni , Bart Van Assche , Jens Axboe , Sasha Levin Subject: [PATCH 5.10 142/545] blktrace: Trace remapped requests correctly Date: Fri, 19 Aug 2022 17:38:32 +0200 Message-Id: <20220819153835.687614029@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org From: Bart Van Assche [ Upstream commit 22c80aac882f712897b88b7ea8f5a74ea19019df ] Trace the remapped operation and its flags instead of only the data direction of remapped operations. This issue was detected by analyzing the warnings reported by sparse related to the new blk_opf_t type. Reviewed-by: Jun'ichi Nomura Cc: Mike Snitzer Cc: Mike Christie Cc: Li Zefan Cc: Chaitanya Kulkarni Fixes: 1b9a9ab78b0a ("blktrace: use op accessors") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-11-bvanassche@acm.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- kernel/trace/blktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 7f625400763b..15a376f85e09 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1100,7 +1100,7 @@ static void blk_add_trace_rq_remap(void *ignore, struct request *rq, dev_t dev, r.sector_from = cpu_to_be64(from); __blk_add_trace(bt, blk_rq_pos(rq), blk_rq_bytes(rq), - rq_data_dir(rq), 0, BLK_TA_REMAP, 0, + req_op(rq), rq->cmd_flags, BLK_TA_REMAP, 0, sizeof(r), &r, blk_trace_request_get_cgid(rq)); rcu_read_unlock(); } -- 2.35.1