Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2916905rwb; Mon, 15 Aug 2022 14:01:39 -0700 (PDT) X-Received: by 2002:a17:902:c102:b0:16e:f2ab:985d with SMTP id 2-20020a170902c10200b0016ef2ab985dmr18928350pli.71.1660597059258; Mon, 15 Aug 2022 13:57:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bB9ey0CSDR18YZl157AwUR2hh4iKgLcOgMujSAZuYZOgXzKdNKUpdfkrefCzHeFZ6e5h7 X-Received: by 2002:a17:902:c102:b0:16e:f2ab:985d with SMTP id 2-20020a170902c10200b0016ef2ab985dmr18928213pli.71.1660597057866; Mon, 15 Aug 2022 13:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597057; cv=none; d=google.com; s=arc-20160816; b=RVeSr77u9Xt6i4v3ZJx/iGw5uKO9AFIimLzEyP+ebbGuCNXjhD6huG+NWO0av1PJdf glGsESqSAni157Y5XaQJGudUKEhKlNyNHJClHGNsXsK7D+8UHTCCWuLc1+Wp1OY6667m T7xy0cTpIFbTjQaJp66B2JvgOyiv2P/cxBM/NOfcVhwx0tA2os7GsIBoRy3jCzf+XblW oRRFelB8dP3MV3oD72lwyTHfwxe2sqHJdvS8javbv4JfMgwqv0ZMW4e0EtMqM4Y57mGq QRgieeBzj5YR+nqPpy8nhl5NGJbHNDoyrzlsACn1BHz8SViXGtIJ+HmScLfL6KNfVFLP FLDg== 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=fbPukZ0xzQWmJmBe9wZAYMY4M3UTYcdOgIPhExvFSbQ=; b=DN+ncedn5X8gj9q2p8Q9da49rUplcnNA+7BElPyfLwZTEp1iT+XT9uqwDI69sBYzqB odK7p363/29AWKzJ42JmGDk81Ao+6ctJYeuJwLNREKhV5ZkThpHeEMuA9/p/sLcZ1OqC U6IiLWoUT+iRfRJzQbiHhTwryMUgPVo7UPhThxcyLQa38ujZdygy6wOjfw8rBSzFiFZX k5vBT78mbTCdM0pBar8VKBlszM2VEL1wF2l88doosZG8cW+07Hm0G8inhk7qk819Wg3I SFb5A4aKchhWPtnZz+iE+UyXyfBg6vjV40meHBeWh3kY5vuoUiQrXTS2SzospU1DYQPH C0yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cEw0bJEh; 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 d1-20020a636801000000b0041bc27c45besi11764095pgc.615.2022.08.15.13.57.26; Mon, 15 Aug 2022 13:57:37 -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=cEw0bJEh; 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 S233568AbiHOSmY (ORCPT + 99 others); Mon, 15 Aug 2022 14:42:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242116AbiHOSjf (ORCPT ); Mon, 15 Aug 2022 14:39:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2C9B2E9CB; Mon, 15 Aug 2022 11:24:05 -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 8843BB8107D; Mon, 15 Aug 2022 18:24:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDE04C433C1; Mon, 15 Aug 2022 18:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587843; bh=+SaP3gmWf4f5WaHNpSY5rM3TjSJ1M5UNAjKxCjepiPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEw0bJEhjjCGrPPdASUhHpUlB5ujJJGChLbngfmUnSvtVMGGLKcW/dy/uDMKPV2J6 6wQFeIGbgbPDB/dGrcYMGtw20UMul7xJHS6FL3jQ5jnxSzMvzmdydK7n8862u+aGnq B451uL+Pp8pjFM9aNWdoTNhWNNK7B1cpADhDae6w= 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.15 212/779] blktrace: Trace remapped requests correctly Date: Mon, 15 Aug 2022 19:57:36 +0200 Message-Id: <20220815180346.333152873@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 c42ff77eb6cc..eaa98e2b468f 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1058,7 +1058,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