Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2930706rwb; Mon, 15 Aug 2022 14:16:37 -0700 (PDT) X-Received: by 2002:a65:638d:0:b0:420:849f:77ed with SMTP id h13-20020a65638d000000b00420849f77edmr15213895pgv.523.1660597957899; Mon, 15 Aug 2022 14:12:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR4QqccOWR3/OuYuvGff+sfEPvG+X61kKVo/3qYZ7cQEI7uG2vbMzgB2Q38QJ5r7SkvqQI4C X-Received: by 2002:a65:638d:0:b0:420:849f:77ed with SMTP id h13-20020a65638d000000b00420849f77edmr15213791pgv.523.1660597956453; Mon, 15 Aug 2022 14:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597956; cv=none; d=google.com; s=arc-20160816; b=b2Y9RQtRjKc3AKgrjK/n+k+pCIbObPJnWCxX9FCmChnvtb35N3hNIwCvOIKEwTDmfA TedXNwsjktiWPPlJfh9hxiWy3wLAm1bruTm00V+4anXqz7I+Xzyw5cZKz4aiBMVVW2lU t7bPiw6JLR5kr9rw6+8nYNrLuRi2QSvXE7pWrfiv7dD1fljS/Lvq9cxQs3S33YVPISri NMJDtzOrdf2Nf6gWwaVIySEciNRDEpKfw1GEnA72+HSJodZMQxSDdSDxdbfgCctGCkrB S0NhOsapSyB8UUZ8Tc7Xkrbe5wx5GwFIcRuwtzlH7BlVzGgzvfkUyVGteXehZeUxAam0 VU0A== 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=iGyErQKs8t3tRFu7b7cfdCZcfVD78XEXiWG6jKi+goU=; b=01juIJ9PBpNLKMOHmTWb8x07m63TLRy+kEY2Xe8YZQJNoETNf6CSUrBZMZ3rUodUZK pzS0pBXN+rMg7Nc5K5I1DwazZhrx66ZoY/aVfVEiLQD2zN3mFaV3kTHbJ0D9u+LPLfNH Riw76QD/2aD5NE/mrcymL4IYUDLZ0SNumAiAjXE+wKQiJjLVJyXTADE9KOhs8pRS54Cw 4on6Y3vzqkewzdJQYRvZWUyc7j8hFEbYHvRvuHRYM3NGKokKb0oaBNwF3ey0LJYInzrT lGrr4ivd4X+CguKMx6kK9Vp5lDKDV6WC2vOxugkfcsU7R7m09YRjdyk6dxuZU+0NHsOP TPMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C7XWL34Y; 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 o19-20020a170902e29300b0016d82eb9202si9949179plc.578.2022.08.15.14.12.24; Mon, 15 Aug 2022 14:12:36 -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=C7XWL34Y; 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 S233381AbiHOUpS (ORCPT + 99 others); Mon, 15 Aug 2022 16:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347520AbiHOUmx (ORCPT ); Mon, 15 Aug 2022 16:42:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F5E9B3B3C; Mon, 15 Aug 2022 12:08:01 -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 A5287B81107; Mon, 15 Aug 2022 19:07:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05BE3C433C1; Mon, 15 Aug 2022 19:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590478; bh=4fhb2oIdanX65ZK+ytJhPxGiRtvlMXTbF5uBC4SK5Cg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C7XWL34Ya64m5V1zRTULeSy18uHFlmp0/Jz8u6V1yLp2Ov7aUyAerHlhjgoHuiUob uSELAWXcmt8BIKz27iMNEtMWeaKgnRMtzmPG3IE/GygKb9avY5X4EfB6Ib/GyVmWTo 9hYXSb+RohFcOvkQzpqzsvwpwG8deWXnydl1xq0w= 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.18 0273/1095] blktrace: Trace remapped requests correctly Date: Mon, 15 Aug 2022 19:54:32 +0200 Message-Id: <20220815180441.043539071@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 4d5629196d01..f22219495541 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1059,7 +1059,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