Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3030873rwb; Mon, 15 Aug 2022 16:30:06 -0700 (PDT) X-Received: by 2002:a05:6402:254a:b0:43d:a634:a0ab with SMTP id l10-20020a056402254a00b0043da634a0abmr16498893edb.298.1660605966866; Mon, 15 Aug 2022 16:26:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR4r5EtG1l0RR2U1Yg+8E7TF3fRIYPyx+/rFt1DbQZmYSyaq61dfI6K5+oU/EBk+wImJ7d73 X-Received: by 2002:a05:6402:254a:b0:43d:a634:a0ab with SMTP id l10-20020a056402254a00b0043da634a0abmr16498782edb.298.1660605965668; Mon, 15 Aug 2022 16:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605965; cv=none; d=google.com; s=arc-20160816; b=npyKq+ZA9KsSIh5eAMUD6UG4iXzfKRW0RhlgxDvBl1UmeK/UQf4BH/BcqKMwZ3IR6I LXRHgUuSxJrv/mHhHlbdK2T4AX6Gsne/xUPeuMHnqLW5bH6DPCMYLkBKKbO2qq2r5UUT Lt4Yudks+cFRqULQQkLOspIM0JDt8wW6Kxi038/ZRqN95t6PRygkcsB6lPFIUp1iX0LU 4ygkpgiamhtQIZHuvtW3HMZVqZKRLMPyFZcf3F6oBUGbj4lPs2ZpDnmZmAnaSx1B90Zb Gz4fmaFYmJf6WBzVs8mD9Gk9Xa+/AoY4MnexYu/G1tYIBNiwCGwrR+M6bLXkL+LklyJR 5e1A== 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=hczDAf82Fqv81Irvfb/fT92yDNmkauF6ZvWnln71+7Y=; b=Ok5gMPtXSsenqjBL9p0+z22qIV37Vz+gcghEyupO43wibJjca6nkNroWAYcJDkmpZY UrQFPru7pKcHb3VvzDDvZO5SvWquuXTR719CFoI4XVcvXhurjZCnR1hGRIDhJBOn2t/o l4Yf6UhtP06YIDBAhdQONPAxUqnXFNgQkZOc3IK7GOj+15I2U9B+oggoTmnh8WYtObBg pocpRb9qvFhAIIFLp3CUFzoxP6MuFc8Mw6qqJSSwNLaBJZq1KVKsTkH/+gmPHcTJwyza nFoW+UhAAOyzT6r6zXHpOjBLiUaByl3VJBE/YFu9Aq71bldWQdi7usbg5KJDEe3z4GFU Fl3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y5nYGd51; 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 hy16-20020a1709068a7000b007308bc0ecaesi6933437ejc.429.2022.08.15.16.25.40; Mon, 15 Aug 2022 16:26: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=y5nYGd51; 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 S1346747AbiHOXDZ (ORCPT + 99 others); Mon, 15 Aug 2022 19:03:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352984AbiHOXBs (ORCPT ); Mon, 15 Aug 2022 19:01:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7CF113F20C; Mon, 15 Aug 2022 12:58: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 dfw.source.kernel.org (Postfix) with ESMTPS id F3943612B1; Mon, 15 Aug 2022 19:58:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E58BCC433D7; Mon, 15 Aug 2022 19:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593484; bh=NxNXOIqovvENtDMuxyXRJZc6jarusv6Z/+p9FTbIHzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y5nYGd5111GkCdzQxUo10yO0NVd2aLmpp9m9BShJpoI7eVeZummUU4przmNs7ckXX 60UERURXLx1FhLI3O5KHlffGhfzY5uP6B69AVmOsflOtusN7+BNdo3m02N0USNHz5H 1+rdR7k5PVtaOZNXMkZUOpOMkHous+vwOfzPvufU= 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.19 0274/1157] blktrace: Trace remapped requests correctly Date: Mon, 15 Aug 2022 19:53:50 +0200 Message-Id: <20220815180450.571170856@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 fe04c6f96ca5..b334c033cee7 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