Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3975788imd; Mon, 29 Oct 2018 15:40:03 -0700 (PDT) X-Google-Smtp-Source: AJdET5c1qtjbB32u+FQJvzAXsZKPyN8/47H0bhg7po6wwlNujxnhlFpp5AA4s9yev7gQt0w5pBXE X-Received: by 2002:a17:902:6f16:: with SMTP id w22-v6mr16480095plk.309.1540852803045; Mon, 29 Oct 2018 15:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540852803; cv=none; d=google.com; s=arc-20160816; b=e+cl0mWFJWnePuuNFOc8Zt96wgohgWNAWWdpHLZyPljtPBm4gVH3y9WBxMDI9Pae13 0fgMmayhT0gChZE3zwy8XpXCvMOBC0d/rB/J6DNz90Xs2d2xtimFqYhlKi5O5bJHIphD NackL0uOgLGqKqWAKy7p9SGdseqvuDJ0jLCflJg7vvSaPfyhkrPJgd3mo5ifJxWgaasH GmrPjM2QFs79uV7hni1X+HgJZt0GlCwzV0oNoPkuAlPlh8QoMW9x+PPPq3npX5JEH0xv LpMoSgSN48bVggYP76tV1N+IAeLQZan27Vd55sFrJn8Ooxbz50z4kb5WCKp5cGdgn6ws OLwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=GCDL5HjfMRA9Z+YoLFhDcK8284h7+Eps8+wZFS6kUO4=; b=MWeAOaZXZo+oL5rv8tGsd+DxDCj8zTZufIUVCrcmeO9qm/wRN49DnlWSxzg8CV6GqG 9SMJZO5i3tX/TJ4L1mClINMDR5V2tJWkDxRoidOF16gCS44su2cqnxg2MDNo0TBj9aGE WU0FAJwq11+QdKn6T+AND3/jlvcf2m+x3vjbY31nCu7Ttcn8dYRlYwpxLm4KmjKq+Mhy gFUgM38/eeGjXtf12jxx0gSvxL28OMgDdRw52jn2cwO9uiyT7+TRn9uekekv/Stoq3O8 NvKtOAKqdeS+MoZ34Jh6fbDwkV+sV2XtUvJ5U9/XXuhjubXbwfktA4ksiGo00JcXD73o FCfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=n7Xr2MHL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18-v6si20352545pgv.47.2018.10.29.15.39.47; Mon, 29 Oct 2018 15:40:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=n7Xr2MHL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729552AbeJ3H3x (ORCPT + 99 others); Tue, 30 Oct 2018 03:29:53 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:33610 "EHLO mail-pf1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbeJ3H3x (ORCPT ); Tue, 30 Oct 2018 03:29:53 -0400 Received: by mail-pf1-f171.google.com with SMTP id a15-v6so4768365pfn.0 for ; Mon, 29 Oct 2018 15:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GCDL5HjfMRA9Z+YoLFhDcK8284h7+Eps8+wZFS6kUO4=; b=n7Xr2MHLngQgRv10jnQHb9fkhPso4Am21zeU97jetYTcw13bAtoRq8ZBvdLALlw9Un 0vRvPLrjaN1yzmiq2XqJ8JlGY4T3sF22mr728k+wlo14xn4vScVj7C2KXy17V/SLO8Ep NFfnMH4OcaC46frJ6H6YiJPX+OXxDDJUXlHWsTcPQnof+0rMqcWnDg7NQzmlomsaMYOn 5VPMj6Fh4h05TQdoYNSFcOMDYwrFNU0cd8EMsXCWO7NStSrWpcrahk2Yczu4XAnoifsV 5JeR0phyKqiD93hFwvZZEVCBPqbNqP36GhIX710ZmU7FyUjKkvYYijj0iKxwBx1kYRHS wWFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GCDL5HjfMRA9Z+YoLFhDcK8284h7+Eps8+wZFS6kUO4=; b=trxIN9ZIrqYz5CwG63ADkxjD+CkpS6SexG6sAF+3CTuzz3HPtxyIYqt4SOUWYHMa+i yyia5hbCW4v8Fpv1tLl+cIQJ+15gFgBFEylLmFX8TPifbkFkSYW9MCS7L3QXpgJCatw+ snJvnH+748RSL289YbXTGGYh56HjRCGpkusfk4wfnJHwFaIXU1PlsiDoxgiMp+ZUWXeM BMaj1nt/B7UbRArsEx6wzv8akkQIgGpeJHbesSXDAQ6FwW/l0/nK4s8Hfo/dISOyY2Uc lAkiD3LE4w0dIRkrRcljrbWJzfONuRD6YOFfY0q7IyPR7CtWbMdahAlSfDFCuVXJjKK1 ObLQ== X-Gm-Message-State: AGRZ1gLaMdX/7eGpfu/wS1RPPyk9X4QDb40Pw+a9Hi/Ct5m46Gsp6RxR fNL6derpXRtFcvkf2lxEs2APblb8HjU= X-Received: by 2002:a63:eb0e:: with SMTP id t14mr10719994pgh.445.1540852748541; Mon, 29 Oct 2018 15:39:08 -0700 (PDT) Received: from [192.168.1.121] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id a19-v6sm4723196pfi.138.2018.10.29.15.39.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 15:39:07 -0700 (PDT) Subject: Re: [PATCH] Add cmd_flags to print_req_error To: Balbir Singh Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181029005732.21040-1-sblbir@amazon.com> From: Jens Axboe Message-ID: <543de76a-e43a-9f4d-c781-e3251ea0e749@kernel.dk> Date: Mon, 29 Oct 2018 16:39:05 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181029005732.21040-1-sblbir@amazon.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/18 6:57 PM, Balbir Singh wrote: > I ran into a bug where after hibernation due to incompatible > backends, the block driver returned BLK_STS_NOTSUPP, with the > current message it's hard to find out what the command flags > were. Adding req->cmd_flags help make the problem easier to > diagnose. I recently did the same thing to debug something, so I like this change. One comment: > + printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu flags %llx\n", > + __func__, blk_errors[idx].name, > + req->rq_disk ? req->rq_disk->disk_name : "?", > + (unsigned long long)blk_rq_pos(req), > + (unsigned long long)req->cmd_flags); Why are you casting it to unsigned long long for printing? A simple %x should suffice, no cast necessary. -- Jens Axboe