From patchwork Mon Jul 1 21:57:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6869E14F6 for ; Mon, 1 Jul 2019 21:57:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F02D287BF for ; Mon, 1 Jul 2019 21:57:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 536CB287C3; Mon, 1 Jul 2019 21:57:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9507287BF for ; Mon, 1 Jul 2019 21:57:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F1016B0006; Mon, 1 Jul 2019 17:57:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0A1988E0003; Mon, 1 Jul 2019 17:57:46 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED2338E0002; Mon, 1 Jul 2019 17:57:45 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f205.google.com (mail-pg1-f205.google.com [209.85.215.205]) by kanga.kvack.org (Postfix) with ESMTP id B5EAC6B0006 for ; Mon, 1 Jul 2019 17:57:45 -0400 (EDT) Received: by mail-pg1-f205.google.com with SMTP id x13so8311009pgk.23 for ; Mon, 01 Jul 2019 14:57:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:ironport-sdr:ironport-sdr:from:to :cc:subject:date:message-id:in-reply-to:references; bh=4J0XDwPxe+pXlEZw06fCMQH6UCnEp0VAm5ojSFh5jUE=; b=ZEdgg8TAwkcTy0541k7mo+lnPpHTwF+JMat/2fF0pif9rv+vad63q+MiH+nRgAd2ST 7dMPcffVotorqwreNHPnAG5IYstb2Gi80SXFqpflccywgBombL8oJfkyKmsAa4wzU2BG Fd7U/xxoEoNUMEpXs6GNyAJXPamvbZZsDyeeP7DJ96pOOMUDk7go9+Sf8rWB64EbJsEI Ovg5y3wipL663Qls9CtDIcms6xk/z4BEMMxDH/jks7RCctZG2iJdAQHYjsDe07TrOyUA 7X5E3DE886W6ArZVHuZuQkA2SBMqfn+HG/BVOJ4KntsjO39BPXzOyim4fXblpZxtaKJ+ NtjQ== X-Gm-Message-State: APjAAAUXy/2VuQa9FZjNb1N9yz/oz1ov5OBWeCJldkKHsQPD4ly/wZZG 8xzkMsp37vavw9mF2arrYADkOEWIcCdpuj2VGIRtfN4kDOmxtXaFpmkbam3Wjdmi9vDMq8pH3gu Eq/aj2oc5AKgmF7zweUK17SCihW5qTFejKNrp9BaVuAIpHShsf9JcmExNGR00BHn24w== X-Received: by 2002:a63:4c0b:: with SMTP id z11mr27288462pga.440.1562018265234; Mon, 01 Jul 2019 14:57:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwni768YkBFZF0LM5Rdqq0ZptNHKvD4UiQ9HHzro6HSGwOixciXmDTEMtMSlm8VsbxQAn6b X-Received: by 2002:a63:4c0b:: with SMTP id z11mr27288401pga.440.1562018264438; Mon, 01 Jul 2019 14:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562018264; cv=none; d=google.com; s=arc-20160816; b=ImGZozmkGWDsLK4nakd2LDpt8bIUbdveR8MnUXPLAbnEVMQx/YHKHKyVrWNIpU+7T4 +OdJafITOOnqdkBjMJnPiKk30xFkuX05MTXspz5DE8ODEZysuJ3QqDIhQcPIh9/TZCBB 5JPbB4HFXaLU06wMwsbWUMg1iTr2kdiBL4nbQOKoxJ4PBHa0C3kl1x8RVbDSjLkEAUkM qkCRY6tSAMFV1HXJn5DVouo7bM0fw2PFlwjWWoh55AsRtlqFfBmEWtASRFFeVjqlEb5F ID98M64rGS3SvL5W6V/Ex85Xs6yYUlIlcjFjM3uibvbllAH+ErBz26636So4WfAe7p1w rUXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr:dkim-signature; bh=4J0XDwPxe+pXlEZw06fCMQH6UCnEp0VAm5ojSFh5jUE=; b=EcVhCMMFuRjTPNdTUK+ERLitBjlP7WeiEFo1bqxUHi2LDEXTntpMw8Ci67lTfGTARQ IgnDbVo0XBfkPHVTK+NCaRIlzcCx1kJp+11KMQtM576woXvBxKanziSoW6GxMECjeFBV xJ0pY7gK7JsZV0MMhmIVP74gN3xDRpHDB61EqcXdpNyD70sk9Zyxcde1CDxoXdJSp/ko foR+9WtGdQf/ep69791CfpWB7v3kXRK4YJvSoMV5fbejV2jaQAFOufBD5rqEPVMkRR7J z4tgWt11qBEJYLA29CX5JJIRG6r+h9t2ggYzqru/N+5NShRKR7v+sQlrrSJ8FSMbZtxa ceyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=JL8GBMnD; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com. [216.71.154.42]) by mx.google.com with ESMTPS id m71si577064pjb.26.2019.07.01.14.57.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 14:57:44 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.154.42 as permitted sender) client-ip=216.71.154.42; Authentication-Results: mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=JL8GBMnD; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018264; x=1593554264; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=OqaUD3tyvurJZF4iy8UPTGJAVxI+8vvw75Zn9sBYYZc=; b=JL8GBMnD50HsHxgTVbE/yudd7jbD/7ZzaeJ1kmcC2u4H3RKLDFj0uAoH FMfGIutJ2q9Sq765r8PJg40eiIySg1OIlYLypuBCBDKKXUu4pyzxI2QgA vX/hVCmuz+5SK8d8mHdsT0kQnJtb9sw1zIrWw4zOHs86b662iDiqgUmoT z8luDl6zCzrqtxVpoiL6jPwKL8cfvgV1ljVoxA6A57LJ3IxhtAgQCkVcI ANQDD9KsExm3ERXg3kOf5GVI0UhsegHo4Dff5XIOaFbqmoKu41PMowi44 KxFELNp6a29fN7h/r9EMRWk/z7aPwGlL0JAx5u+flxrH/nu95YSvUFZTb Q==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="111992767" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:57:44 +0800 IronPort-SDR: 6tuCbBgfRDKnMjDdNUKivRlmIP0d4+OSfMQyfizQeqjHYczFsSDX1D3kZPxTfq3LBftHAvTmT6 Itn/NRh1OmTQb7I3YGoOhaXSrBu7tVtNU08ryY8TebPXx6PndINtgMvVySf9XNmR4/gr4VCEWt OsqLh8o9bcw6c+qbGrY668K3VwCJ6WsoSn34wF5giwzdggS33KVWer8OxIDSOhhwLYY75prB+l 9RQ9NCm/YBJvNUuKBpLq0YNn7f70JaZZ7KZ+Q+ZISv8aAfYMGfnsRwobim2wXScxp3XpIFV9I9 1FWLHpqTLCpgdC2sYOcrvc0V Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Jul 2019 14:56:44 -0700 IronPort-SDR: wxv1jtI14V0dynykEUh694Gd+y7cQjWb6GNJY2Fh1io9Yv2yWDaMNS0U/JIdWHAae8H+x4yL1W N8sJUPfXtNew4R3FGvi5vtEkUUuC+o/5h7G8ONNS4DBhdnjyj/KMZDZp04wpV/yvF7Z8u/99sA uBVwShEzK5Us0emedzyRYuwUbykkGHGjaXjaDb5eWT8VBIRhR7ziI9lLDS6iqG/8fpLe8oLFHM NE+ShJ7xGWHPzrWAT26BbsgntAdjRye8w3WoQUUyGZwqC1uRL8WOE9kirSgjy8CNKNo5LagRUC I1I= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:57:44 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 1/5] block: update error message for bio_check_ro() Date: Mon, 1 Jul 2019 14:57:22 -0700 Message-Id: <20190701215726.27601-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The existing code in the bio_check_ro() relies on the op_is_write(). op_is_write() checks for the last bit in the bio_op(). Now that we have multiple REQ_OP_XXX with last bit set to 1 such as, (from blk_types.h): /* write sectors to the device */ REQ_OP_WRITE = 1, /* flush the volatile write cache */ REQ_OP_DISCARD = 3, /* securely erase sectors */ REQ_OP_SECURE_ERASE = 5, /* write the same sector many times */ REQ_OP_WRITE_SAME = 7, /* write the zero filled sector many times */ REQ_OP_WRITE_ZEROES = 9, it is hard to understand which bio op failed in the bio_check_ro(). Modify the error message in bio_check_ro() to print correct REQ_OP_XXX with the help of blk_op_str(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im --- block/blk-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 5d1fc8e17dd1..47c8b9c48a57 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -786,9 +786,9 @@ static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part) return false; WARN_ONCE(1, - "generic_make_request: Trying to write " - "to read-only block-device %s (partno %d)\n", - bio_devname(bio, b), part->partno); + "generic_make_request: Trying op %s on the " + "read-only block-device %s (partno %d)\n", + blk_op_str(op), bio_devname(bio, b), part->partno); /* Older lvm-tools actually trigger this */ return false; } From patchwork Mon Jul 1 21:57:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4627138D for ; Mon, 1 Jul 2019 21:57:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA2DD287C2 for ; Mon, 1 Jul 2019 21:57:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE563287C8; Mon, 1 Jul 2019 21:57:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 531A0287C2 for ; Mon, 1 Jul 2019 21:57:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 70A208E0003; Mon, 1 Jul 2019 17:57:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6BB588E0002; Mon, 1 Jul 2019 17:57:52 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A9E98E0003; Mon, 1 Jul 2019 17:57:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f208.google.com (mail-pf1-f208.google.com [209.85.210.208]) by kanga.kvack.org (Postfix) with ESMTP id 2249C8E0002 for ; Mon, 1 Jul 2019 17:57:52 -0400 (EDT) Received: by mail-pf1-f208.google.com with SMTP id x10so9565576pfa.23 for ; Mon, 01 Jul 2019 14:57:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:ironport-sdr:ironport-sdr:from:to :cc:subject:date:message-id:in-reply-to:references; bh=Qfro/XB57m4RkRb3pamnEYt3ZcrE/2bJNg979yXC2es=; b=HVXaETbZxnOsrh3D2vuErEBf71rYqtxW5VztqM8ulx5Aa0MkGaYsJnpAqYVpYWDT98 7A100KDdf3sZQH8ZK7HSdfA4Vk7iZRBOvG9PpgWubTYBvzT2HILv0jhdSi+D3Z33q906 5KZsebtbgQiRLdLAeEeNCK68CHBWcdgK9fbEo3RCvM0dSs/+RC0rXQ9XxxgxYtRMILRg lgXXj4Gl3dL5e836MYsfmznp5hutolXGPt3O5TtBVUddGOciDm2mKqlsGCxfOsbRZGBN AKjOaPf4aoE1zee1jJHFJgo1NhMj934d6faMIdfh2h2d9giI5l0ACxejMgcS5s9/cTiv rLOg== X-Gm-Message-State: APjAAAViaxVQmMPcM7HzkNuPeTG3JCFDlAVAwjyT2fpARLRK1Ab9i/oJ YQ/9+Xfv2ZDcxfSd1ytUPYNm0xqX/30GsplxPAltsUvg7HVvvLHCqC2Q/nn/zMbL3bTTQtC4xdv 9ofexDzIiJQ4KSS4hHd5/Qyx/Xq/DbzafuP0dORRqP56Vp7ScN2qjthQ8hGJbL/eMXQ== X-Received: by 2002:a17:902:1566:: with SMTP id b35mr32273769plh.147.1562018271775; Mon, 01 Jul 2019 14:57:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV+Fs3PmawkEO9Ml9iqhMtq6fmUYtHv+6IwBsz9c5DHRDZBGwVno6E+00phgiBD4etYnbv X-Received: by 2002:a17:902:1566:: with SMTP id b35mr32273728plh.147.1562018270859; Mon, 01 Jul 2019 14:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562018270; cv=none; d=google.com; s=arc-20160816; b=BJimqDMt5GQacJGLZ3JZ8XYIkioT5cg7/ml4JnDyaHHXHVRlPeQ80DwhHZvQRgBpn3 JyWxWuyLnSxpTg0Et572kdciX84VtXEWVfVHbS9GfZuiXTvyYpt9P4lCp1V+u+jQZZHV rfnnRlveF+M/8xBEEF9DcT8bURce1lAQR8HuAY4xqM7LGIGtbb16MzX7NFmv8+325p13 IL466lqqrdCpDAC4d32G0/0KKf4d3zEFt3ZM+voHA2BRUAcNsx+NFOkeBlwoMy17lYO3 sPT/6CZ5O8J6Rr5KJh8PoHfMpPIZYshuWSyzx9T1sPZo7j2Zvly5GKKtez9MOD17mzgO ZBwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr:dkim-signature; bh=Qfro/XB57m4RkRb3pamnEYt3ZcrE/2bJNg979yXC2es=; b=aA/dc2Ed4Wn+GDaH7RDRH6ZmXSSScfx6s2VknFXKNnzo+rxCXUwkKc/cjuRBoyofgi UmW75OrJRzUQBpKoLxTtQBtLEyKoNn9CYGxWrb+li3Xmn9TP0IiiLgHJBF1FxnofwDgH lCIk5JxmtA1tYZHLiz1c10jNmt4+M8nrTBdT0AvSV+NylTD0+SijpyhHxSG/bgdgBm5x 8J9/rAaZBR8PL/pwYmfq+RtzRO2TEqeQNinVzrZiW4dsVyjl2U2rTnDPykPhG01HGbIf Yj/79+M7mUPpQBQ2UgubHSvlKiBqCrYYAwl3UGO6IwtEikZFXNWGUv9hkZ6W8ucc+3nh madg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=GJwgOI24; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com. [216.71.153.141]) by mx.google.com with ESMTPS id c11si606364pjq.0.2019.07.01.14.57.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 14:57:50 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.141 as permitted sender) client-ip=216.71.153.141; Authentication-Results: mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=GJwgOI24; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018271; x=1593554271; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=9J1OfplonnbynoEAMgNYcUvjFmcuTdb/IR5OisFEtak=; b=GJwgOI24cJR3VFJwNiZp95QuWt5AWq2uUdk7q9izC+kN8WZAsIFXBlCH 9cqWIcp5x9AJM9OthM/z6/Js1aWFEmWtzCHvV7loUwIkI20ykMjhNprGE WbnAbzZuPlrzsp+QhG+IWglUA4a3l/5jaLtXf7OJAUFdmMyks1bYCs5lU yt2bn3e7W1221gKIfO+XzeTHbsX/utwvS3rmS7ZE7VBL+TmCdN8XNftT9 L6fXl106XTCUSfYqy9VAv9T/m4P2DlFFU0v2VGkrpKSI78+Ptvkvmrnz4 qyJ2TWCPwqHMHd4M4BMdagYduO6Yhj1FZsjJEtI6O2TpGvfrWjJC8ATtz Q==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="116844010" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:57:51 +0800 IronPort-SDR: 6xzCaxW29mLPFV6IJr/NiJP+8796x9RLBm3SrvMJuS/mgh4LeyFIMNnGLOICtDlKh3yJGQS/5P Ym9osdSqWfkDal7V9ALdKh3klhusPgNpqUBXD/virkbgXvUwvmovkrBOJYwFBI+gnDNehkaH0Z iPp4wS4cY4ZSz+7ulz3TamyTRmusBfwqqyFR2zj4FOnCpso8ZprvOiE0gNTXcbh7eIJ2ka1tOi gWfW1+w0HPSEzgIkXAN9Y9QkQBkiHSvXWmQYVQqP0kWw8SM//xO+VMidt5PRvjve9TvkAdTBge +1uAHswdNGw/vP+RR0yaCA5s Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Jul 2019 14:56:50 -0700 IronPort-SDR: RUT0zDud5mdeTiDe1oPpuNFjDkJ3uuMy6naMhD7jlFJOo5Lx94cNdS/Nkt7n9zdRsqDaX8I6aS kpaO5xs/asgCHLZQqRzj68/bAQY1ftPJ1LuuI+Mm0adufqE1zU2V1QalNgVa5v+cw+tQbBCrsx z5HtwnIeWwhelc9wuGhNRmFmJqPGDwu9W68q3GBRjOdrZ8nIYKVL2ZoE53gzE6nYvBvV79r5Oi iHsMW4+fL3q2Caum4SGUrUHvk/O18aCQYKP5YevyAbm4yOdXJpq0lIPCo89V0C6rqMGJesnYkn MW0= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:57:50 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 2/5] block: update error message in submit_bio() Date: Mon, 1 Jul 2019 14:57:23 -0700 Message-Id: <20190701215726.27601-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The existing code in the submit_bio() relies on the op_is_write(). op_is_write() checks for the last bit in the bio_op() and we only print WRITE or READ as a bio_op(). It is hard to understand which bio op based on READ/WRITE in submit_bio() with addition of newly discussed REQ_OP_XXX. [1] Modify the error message in submit_bio() to print correct REQ_OP_XXX with the help of blk_op_str(). [1] https://www.spinics.net/lists/linux-block/msg41884.html. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 47c8b9c48a57..5143a8e19b63 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1150,7 +1150,7 @@ blk_qc_t submit_bio(struct bio *bio) char b[BDEVNAME_SIZE]; printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n", current->comm, task_pid_nr(current), - op_is_write(bio_op(bio)) ? "WRITE" : "READ", + blk_op_str(bio_op(bio)), (unsigned long long)bio->bi_iter.bi_sector, bio_devname(bio, b), count); } From patchwork Mon Jul 1 21:57:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EAF314F6 for ; Mon, 1 Jul 2019 21:58:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4460D287BF for ; Mon, 1 Jul 2019 21:58:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38EA4287C3; Mon, 1 Jul 2019 21:58:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC251287BF for ; Mon, 1 Jul 2019 21:57:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E5DA18E0005; Mon, 1 Jul 2019 17:57:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E0EF78E0002; Mon, 1 Jul 2019 17:57:58 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFE0B8E0005; Mon, 1 Jul 2019 17:57:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f206.google.com (mail-pg1-f206.google.com [209.85.215.206]) by kanga.kvack.org (Postfix) with ESMTP id 9BE6B8E0002 for ; Mon, 1 Jul 2019 17:57:58 -0400 (EDT) Received: by mail-pg1-f206.google.com with SMTP id x19so8326198pgx.1 for ; Mon, 01 Jul 2019 14:57:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:ironport-sdr:ironport-sdr:from:to :cc:subject:date:message-id:in-reply-to:references; bh=XgWwsa61aZBxJ2BDh3Q0RgZD8d2w9bfc/L2B41XFq4E=; b=pjjpav9qeoDzLj69y3pmjutbUQl99bs9FXBwQdWpb4no3TSycmSgf7f/wjPd3Ytf+S 68hf0wApzmcNbMNMvUKVgJRCKyzGtfoyFhGnuPA8eIZKc7uu5DQh11usKk1it/JFJDdp 5Aq6WlWwIZ2FU984R7aDSEEq2VVQqfJ1hxscBDdE/rypQRMiOeFtcNFv0hX/YkHpZJWk mB7CFMyklIMJolP2r78DrQR0YdmbJj/ga8o81ihZ2NYGLIwx7kz+N95Aap+NDH65SJao OAtPRdeCjGpgdlT/AOdKRgXl+jAKK+IN+UkjAJKhv8yHVjrysUuJrMz0AyJbV8Hq++iI b9mw== X-Gm-Message-State: APjAAAVHfSiWesstqNn5sC6qUHcDSA251G2M4V4XnP9f1n0DaclC1agy yVnAxwE9AHrvM11MVRDk/j9HCp4USlX4OElU4GAzRfiyttAWTCJtgROqLJbDjRr8w/VpijIcNP4 oBSHlHQYTeKzU/x/jjg1LJa/ZEkOZBmsp9jkoWTUc3i2B986qwFVSJfG0EDAU5wNqOg== X-Received: by 2002:a63:4d4a:: with SMTP id n10mr26347356pgl.396.1562018278264; Mon, 01 Jul 2019 14:57:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqy56B7Lyz+JN2zNjYPX6KwgkHeargLXL/VeijlTNQRi4sslNZItdnBz/z1GBSk3YHSd7Srn X-Received: by 2002:a63:4d4a:: with SMTP id n10mr26347320pgl.396.1562018277415; Mon, 01 Jul 2019 14:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562018277; cv=none; d=google.com; s=arc-20160816; b=dxxczMoYYEpZVvFwtzastbv2sjqUzLnOX0S/9TzF4VwwYxFn+13I1foNpk21g86xgl yoUSwTFCj5RupkDV5pfpDy0Mea7cZDYW614Ti+xlLaKYvnOYdetH/Dph/5FAji8Q4Qkp Ff/EnhBFD0am6wWdeoJMusKaM7MJWCJadBiK+ED3rzVFL3KTgrhn8vNfGyoW8crEoFGc yk080xOQx9Z/97/lH+iF1WnH5cUitE+DQhJKkx4WrpQ4xwh6OSrh85X6zxQvX1Lt3usJ gg3wkTYMv7MFdtM/sVXNPd42Ph8FKSuaoNwDoNhJCAzheV76iZRdPjEK7j3ImbxcZAQI 7NiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr:dkim-signature; bh=XgWwsa61aZBxJ2BDh3Q0RgZD8d2w9bfc/L2B41XFq4E=; b=X7+MgA4H1rIv5WhdTaQmAtj7nQyD477E0V3aiV8sJHIAFf9ysa8l9O70HOheiNw1PO 9tNbHwKUK/Is1nqH4GmmbUQsSdR5WKYULOLf0YKpnTAR9As9SS4g0HDQtluujTTts52K 8mscIVvXtfHRJoQuksCHjCKcG3I831cNcxLk0Gi0Lq8+MQsSikwrUD4VTiy06s8C7QvQ CFEAR9ChebpfXD5sHf9mO/RnClEO8yPaz6jtouIdRaJSa5jzG6AyGVTfzqY7m65u4btq ucfqDlMmAoZ3/TKyLMTQmYs+LdafW0JTdqm+Gr+SwU6W6l4e9JUNiPf6WH5ZckN+dqXg lHqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=KADS1dQg; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 68.232.141.245 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com. [68.232.141.245]) by mx.google.com with ESMTPS id q75si11016093pgq.538.2019.07.01.14.57.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 14:57:57 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 68.232.141.245 as permitted sender) client-ip=68.232.141.245; Authentication-Results: mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=KADS1dQg; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 68.232.141.245 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018277; x=1593554277; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MbHOnCWpKU9OhNQ3wNRN8l4gA1/62SoaCYINRxhsjOE=; b=KADS1dQg4EU8mbhayi4lwtDMVqy1/AZq7XFlZ0iE2MZq93d3hNbrTWlL mLtH4gklBoX+iXQOE0f6PiuSdl5xN6sewsBYu5sJx180CvwQzCSC5WWIL vX66LVl8ju69JpJueAnZN5PjuH0yQ/4o1Y1OqfjPkIQ8a7YDTZSXmYNE+ 0K7aJeHvWizPSjGbAYz0ex3sgXj2BhUPLDPu5CDVEnpBbunPDOpJt3vGw VwOABnPAN3QHh/kBdVJUGyIEAMN1ji1crbYs4krByxz7GUPIfIcj2/JeS 9MlVySUBYlhFni5o0CzChLLYuDsGoJKPPv0OdWJ0BjLVZyIDh8vv8MKqp g==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="218377243" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:57:56 +0800 IronPort-SDR: uOCNjcB0VeIAXzsYZ0vqGaLmBbdvmEYbsbhef4UJCj+xdD3inJpUD5T6JGiBRTlbB4G800KN8o /6jvcQPqtbmkJFRCci+WM65IXEl/oBa0TP797chQ0fPwqBeR8ZL+kHhLnqdPHd5HgRQZsgCCiO 1r1dCCV2Ug6HHoUwbXKAdDgkZAC7h2flGLmfzDwSsm7YjFaQzOB5LEe6VXbHPEE6gdYTPCsBp8 gxmdWH+KYQNMtNF4Mqv7w0pbGsSMR4eJ47r+5PxiW+jpL9rRGwwDOUHDjGR5Wu+p22+i/iqMXb mOBnoTz70NisaT8JOIqjxVsq Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Jul 2019 14:56:57 -0700 IronPort-SDR: CL+xf59TlgjtZyTlFRdcDLuFt75xQy3gXKfSxFmbCWJT5LpCjDOhLvVhJA8iyfcFX8teiNIU61 JS6nyhX2Ks1O0rTthsOcqUEA8YwUv0TSYQVGKXjnChLzxvglb4z6E2l2b22Mx69PqCKDUgabxq z+flC2nm/UzUtye/ZE8/A8OzzamaJyVuGujFyj+kM5z3Ul371Uu9BPqEO6baKu5HavSUMM/V2z T3UMAzRyJNRY+iQgrLC/LgbFgJNzaxW0R7TuHnASZhh7TGWl6LIKon4o4jEMddBsNPFxtsL3Cn T7w= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:57:57 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 3/5] block: allow block_dump to print all REQ_OP_XXX Date: Mon, 1 Jul 2019 14:57:24 -0700 Message-Id: <20190701215726.27601-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP In the current implementation when block_dump is enabled we only report bios with data. In this way we are not logging the REQ_OP_WRITE_ZEROES, REQ_OP_DISCARD or any other operations without data etc. This patch allows all bios with and without data to be reported when block_dump is enabled and adjust the existing code. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im --- --- block/blk-core.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 5143a8e19b63..9855c5d5027d 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1127,17 +1127,15 @@ EXPORT_SYMBOL_GPL(direct_make_request); */ blk_qc_t submit_bio(struct bio *bio) { + unsigned int count = bio_sectors(bio); /* * If it's a regular read/write or a barrier with data attached, * go through the normal accounting stuff before submission. */ if (bio_has_data(bio)) { - unsigned int count; if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME)) count = queue_logical_block_size(bio->bi_disk->queue) >> 9; - else - count = bio_sectors(bio); if (op_is_write(bio_op(bio))) { count_vm_events(PGPGOUT, count); @@ -1145,15 +1143,16 @@ blk_qc_t submit_bio(struct bio *bio) task_io_account_read(bio->bi_iter.bi_size); count_vm_events(PGPGIN, count); } + } - if (unlikely(block_dump)) { - char b[BDEVNAME_SIZE]; - printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n", - current->comm, task_pid_nr(current), - blk_op_str(bio_op(bio)), - (unsigned long long)bio->bi_iter.bi_sector, - bio_devname(bio, b), count); - } + if (unlikely(block_dump)) { + char b[BDEVNAME_SIZE]; + + printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n", + current->comm, task_pid_nr(current), + blk_op_str(bio_op(bio)), + (unsigned long long)bio->bi_iter.bi_sector, + bio_devname(bio, b), count); } return generic_make_request(bio); From patchwork Mon Jul 1 21:57:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2FD6314F6 for ; Mon, 1 Jul 2019 21:58:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2655528793 for ; Mon, 1 Jul 2019 21:58:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A97C287BF; Mon, 1 Jul 2019 21:58:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF8A428793 for ; Mon, 1 Jul 2019 21:58:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4BF18E0006; Mon, 1 Jul 2019 17:58:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CFBF88E0002; Mon, 1 Jul 2019 17:58:05 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9DD58E0006; Mon, 1 Jul 2019 17:58:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f205.google.com (mail-pl1-f205.google.com [209.85.214.205]) by kanga.kvack.org (Postfix) with ESMTP id 82E728E0002 for ; Mon, 1 Jul 2019 17:58:05 -0400 (EDT) Received: by mail-pl1-f205.google.com with SMTP id 59so7879648plb.14 for ; Mon, 01 Jul 2019 14:58:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:ironport-sdr:ironport-sdr:from:to :cc:subject:date:message-id:in-reply-to:references; bh=Rz22BLRkwdteKQIL4HVAbq/33QcMnCT9Tx0pA4ANBrI=; b=Np02RTCLz2YepTAo79p+6W6lwkDb7Z8uXIqu47YCjBL43A9vXIZSG7/YXBNBwW/jAM QM0T4HMZZGDhumUhPnVxepI8NrEJglP4QhEusC7O8lfYmIkfENqDQcfqobcMeT6AakGh e0ZCAJqWaO5EtayfPIqNcXUpC9z8dEYDL74vKGTMabLKB4vBL4AE/2/9DEopIrP9TlmR eHmAZkDIOHSVOwwccIZomLzi8EMwYnioAhwCVPMoCHbJiz3LHs3dOuejphJzdiIfGRh3 qtxvHr19U/om+zGLLmbDENCtNpeomxawYGIceDdFR/2lPpPETqPG2m+MjFM7L8HRmGls nf7A== X-Gm-Message-State: APjAAAXT41HR7Bd9cjHlf1QqWr6PhAaLQiBOfiebMbBarASm/mX7FyWR /hueh3jknOSUs3BwPm4veMG5rLWA+I252M+lzSK34Pyd8SePxqiMMBPJj3o3aWTyvsDNaXZNTas ILYfWXrgMzrTaJyt0bc90RGwgxvmsZ4GJJah0/hg8hfuoJFH4O+9Jt3i4QOXRqaLc8w== X-Received: by 2002:a17:90a:2525:: with SMTP id j34mr1654170pje.11.1562018285223; Mon, 01 Jul 2019 14:58:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqum+Gbt12hxHcva0fVt5dsQ6pppzAkwOt4H8WM777VVqoy8YE/TiWzALlf5CAHmLOwDcu X-Received: by 2002:a17:90a:2525:: with SMTP id j34mr1654130pje.11.1562018284595; Mon, 01 Jul 2019 14:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562018284; cv=none; d=google.com; s=arc-20160816; b=jlK3vX2J36hOa1E4kijG9dmR5KEhBgom4SWZV0b7q42sZcmCgucuSIIhAyQWA7QHa9 GcmVKzBrEBRU8xQ+SKfRvI93xAQmha1f6UcZjWqrLOkPEiDWFFr3360eQtbEPGds5tM7 pk3G5kUh4TF3L3bXn+VSd2dhGp7Vw/FbNu1tjsUR4z4B+x0X/OFY7I09MNdYrdV805h3 vUcwEe8II7TU1m0A3PeM8FsDFPLXxE4AjjMPLPoQ5tCJ74ftgsVd3QbMrbRL1hs/3ke+ YZJHu3B0nP5iCIkHQd5WYV6LPtbR79et2GkpidmVX5khlG/YiFYEZAAnswPufYlBdqzQ j4Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr:dkim-signature; bh=Rz22BLRkwdteKQIL4HVAbq/33QcMnCT9Tx0pA4ANBrI=; b=MD7hSnfHwwltYlCCei+Sk5AdJQWkaBecSLhEtCIYWlvFf+/t6LoBUOuKq7hMsGdDAg Um41qwhwU5yzu8pXlTV3awECVj+cBmBIj9ioB6qVkBfkWIzOjn+Y245zNe1EFkcvo6e2 wJWmMG74/a5KM58SKtf7lZnqBNA4/cBBk9rQBj2XVpE/liNSji6pjhhxe+6VK++qh/aN 8joRJwWcAr1zuN4Vi8heAHPulJVkaWzig2x7jwN8ORJbUP2gXRGwQotgRafBYVEQ8xOf uJ8Qyd/a768X82OpeL1Jxrj5z0PMytnRWQEDIBeOQJsyDkyQYesZx/JTLePnHxaYDkog +EUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=ZZIFA9HV; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com. [216.71.153.144]) by mx.google.com with ESMTPS id q39si596559pjc.55.2019.07.01.14.58.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 14:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.144 as permitted sender) client-ip=216.71.153.144; Authentication-Results: mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=ZZIFA9HV; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018284; x=1593554284; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=SM4vBhjIMuIjQIIkPMmNSjGDUMbO4rTKMZzMc8UskaU=; b=ZZIFA9HVeSYt9Y8HlXxKic9FrxKeWNYAzpDjhnh8guDtK9L7jXKwK6Wm w105ZKNaZzep5NMpbluGb1G7bojNk5D90MDLORDtaqMxz16dShWHpfPON THSSTYs7mCdkLDF9LxOpdZ5tWTpzwaP6fBLVAvRUjeKlYfh8FMhDmSXEE 8Sz084LfWBifFBxlMbxMBv0Ox0PquI8W/UbS8Xalo+TYS2RBCRY+polIS t68MZQDLxytiaRyPN9TPjSYGcNVX0Cfzt6diGVhrp8NR2Jh8Bq8KeUzzg dUzY7QPNKoq7mvHYHrsn3koDjEwSu5eoF4qzAkFAuJKICs9uFek1/Yx7b Q==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="113190459" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:58:04 +0800 IronPort-SDR: Pe/XRq8dFo9R6f/s3JFaCg3zrjbfWhREBV6UkkVkJIhqpxpMiIQOUexbyjMbj1u7HPSi8AB4SQ D6TWFgq1urJHsH1CJ6zQzU4zODA/uAO+JZ5bm45f6xOitB6RV5MfkQI+qfDSafdozLThxVnpWD rJbhy4bJs1zVbNxUdmOMdYmWzfOtm5VBW80jPKKgqMtg52XBPuTip+82c+g3T+t6caT9OdPEst nMSpftaHYAQX3NTYF9y0hoNw1jULxMCg8IrgxOZvnRIPaBjL3s/W8g0Grl7YQ9MjVf7fgqCpEG tc4oxyMGwiBr0H97PCECmpYY Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 01 Jul 2019 14:57:07 -0700 IronPort-SDR: e+BRmQAwH57/flmFvsQ6Pi8GWmwJl0oZ71gtjgNdmCq2EN3CldpqQ1InjNWVtGq0B1oBeOBsd+ kFszZuOSH18RLPIwDQuKI4Xt94EU0l8vAv40wQPezVoRtOtGcS3DhfqFKo3eZoEEF7cqOlXdaL bv1kLKT8vZz+a1WGE8clxQDtDrXl/ApwMerjBGhUmCmmTEmTFNhoRp6K1sboM6C2xXyBHPjxmY h9eYIBUbtUcMBrxqcroJweQRK4ZibJt9YOvzlfmlJ5tyPVhAc+V2PrYsnrLymBfxnDADKmxVAS QQI= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:58:04 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 4/5] mm: update block_dump comment Date: Mon, 1 Jul 2019 14:57:25 -0700 Message-Id: <20190701215726.27601-5-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP With respect to the changes in the submit_bio() in the earlier patch now we report all the REQ_OP_XXX associated with bio along with REQ_OP_READ and REQ_OP_WRITE (READ/WRITE). Update the following comment for block_dump variable to reflect the change. Signed-off-by: Chaitanya Kulkarni --- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index bdbe8b6b1225..ef299f95349f 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -109,7 +109,7 @@ EXPORT_SYMBOL_GPL(dirty_writeback_interval); unsigned int dirty_expire_interval = 30 * 100; /* centiseconds */ /* - * Flag that makes the machine dump writes/reads and block dirtyings. + * Flag that makes the machine dump block layer requests and block dirtyings. */ int block_dump; From patchwork Mon Jul 1 21:57:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 151561580 for ; Mon, 1 Jul 2019 21:58:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B7EA28793 for ; Mon, 1 Jul 2019 21:58:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3EBC287BF; Mon, 1 Jul 2019 21:58:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D99A2879E for ; Mon, 1 Jul 2019 21:58:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A173E8E0007; Mon, 1 Jul 2019 17:58:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9C85D8E0002; Mon, 1 Jul 2019 17:58:12 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B7858E0007; Mon, 1 Jul 2019 17:58:12 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f206.google.com (mail-pl1-f206.google.com [209.85.214.206]) by kanga.kvack.org (Postfix) with ESMTP id 553D38E0002 for ; Mon, 1 Jul 2019 17:58:12 -0400 (EDT) Received: by mail-pl1-f206.google.com with SMTP id bb9so7899142plb.2 for ; Mon, 01 Jul 2019 14:58:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:ironport-sdr:ironport-sdr:from:to :cc:subject:date:message-id:in-reply-to:references; bh=yhezopFiPHG0c2M8IFRRD4+hJzOPOYJ+sB8spnfElWM=; b=XsYBVwnw4RM4czMMlBgh4wU/A+pkL5tuOKXnaqge+45Zp87fE2TWBcZnZmxn969x15 LcDoociQWn777db20YDIulOI/YL2W7Xk3mbDv2rUQjB4fo/B252MXQRRPk/6H+5jjxqs jre1RaVMlNVuxVIInRDtfgpkibGKdonUcHmsAHBu2mR8ezlPfEKB2ZdjT/iuk2wze1x5 m2gOPk7Nu9whqxYy7wdDNdOLnB0ECnkqL6p4FtPnjj8Pkif0zehTof3sXAD36jIXOO1y u0srrq/yfBIDzOqw/mR0iXNZDkC7SouzNJyrHA5vY9pqCpfc7+zfaTP3YfISm80viM9D tf6A== X-Gm-Message-State: APjAAAVfYMeP43SGFpVTBXU48gxiQJFeBGLYD2vVxQepz3/l6KZ5DtFD +B0rqtNdiYhogClc+p4tXBNsYM/+LdNtHI5+oL9IDJe226j+ARJ8UvGeJpTsdbUHOtRJpUcjRsw kQijeLZr5uwApm54ZBMM8oKYMpBdK2UShM0VsYFgVVPP1XrCcw+4ommsgNiv4zDdBrQ== X-Received: by 2002:a17:902:ea:: with SMTP id a97mr31154025pla.182.1562018292018; Mon, 01 Jul 2019 14:58:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwY3U+sW1zE+6KCQMEUI+brsOgh+vj5B/75KxGDh7Y0udBHzpWv0L5R4PGU/OZQoxs+3fNB X-Received: by 2002:a17:902:ea:: with SMTP id a97mr31153986pla.182.1562018291277; Mon, 01 Jul 2019 14:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562018291; cv=none; d=google.com; s=arc-20160816; b=Vc3qn2rC8Ib5tXBRtAo4ecabULoWB3mWmnx8+h3lZmw8lFORXUy39LLnFlDrsVLGVl tFbgdWaG9tP80zaX8JMeBq6dM/FSUSZxqLg8mZ2uHIK+haWjEzU0tkJ58Ht6VzyIYdjP omMbSroXCCCqIkl3/jYf92hCWcodOCbQ2Wq+cZ24mejecV5pXyda88ly/1Iy9QSe+oD5 MC5clswKS58eHlNFYeoDJs5zY1LUgNrEnB/j6k3Cj7FFvXzTAR7jXavAVFgqb/S+aTpA wWGHunusvBlvPm89Jzyjq9FJ0DrJDtC5yOCeVbbvu93wYDQPHrjxYEOjoWsEerawtIdh QPEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr:dkim-signature; bh=yhezopFiPHG0c2M8IFRRD4+hJzOPOYJ+sB8spnfElWM=; b=aJs0vyCmQzfp2uKrP0XiyPkHe7YLDE50kPjc0lpAceZA/qucl86rSFNLJbGidwnKvJ HRRSDVbze2/KfbLW1+0ftYHAD9UIuuCSmlYHqAq/XF+NwN8Gkz3KDfwYYRFotAQo/+CU Iz0wfAZF7IszvvWn90re348ntWA9lOZ1xRwJ6Uz0D09suCLlJeEKU29AUuuxvCdOCbpO eO6d+CNo8D+kJGm9gmAx7SksJg7gzepTWIj/WNTZn273AyZtvKBetzIO3NLLIzdIcWU4 iuiLehiKzSMx82XyZfUYf5DMXVX3N6sBxg8n3/zX6qJRhoNzAByIRdjzCIILLxwXKZu1 1/iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=HiaK+qya; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com. [216.71.153.141]) by mx.google.com with ESMTPS id a36si598675pje.14.2019.07.01.14.58.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 14:58:11 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.141 as permitted sender) client-ip=216.71.153.141; Authentication-Results: mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=HiaK+qya; spf=pass (google.com: domain of prvs=0789f8ff9=chaitanya.kulkarni@wdc.com designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=0789f8ff9=chaitanya.kulkarni@wdc.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018292; x=1593554292; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=b0wGW7WtfWxUwKfj2wVFwZxNHKIT6iMJAeEE2CY/GA4=; b=HiaK+qyawfwTkLlcPMFVDdCO+lbjrQkpvs+W88RVRTrk7UkD5jqF+XMl FUuaIi6FU7s45v/ReDlqXJQ+xuXtDeEFqwLY7P/JmH9fxex7PHOYNqpPG dv/NwWi80UAnlCc6tzXFKkafNxNJJJ7sYLf1RCS8hsS59/iOg5hUMSJhm Y73uBoiyDaVNCjoYPuNlfSteuZa4lhbZNeApRlcDxTOmW9Vrx7j6SkUBi J0jEH4NLFUxNmCltShAlRsLmli92W2W468Z2Ew0ERITyl+BJf+FG+Ri0W KsIKxesHFngPEYCxCoVW6ybKfVx9brWgJJ4GWoYwv7qTls1SfzygSkcjI w==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="116844043" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:58:11 +0800 IronPort-SDR: sTyeICXNyASzqaVJh/x7bFc71ryJtwPmzGpR6ru3C844qtZvkTh15I2z1yZJOKlx5WvGRIF2ia 4Ekb7RBw2k4iNBRuDl0TSB0d+caVgWvxr82XzfshorCuGE7XkrsrM5L+hJWR5yFB3MBu1Xz+N9 3eE4B1pE9bII76EphGGieLowwe3oRpyrEICrFP8WtmqBrxTFlN7NVvjR8YQPW7pOlP8qP5/s2V 2q46hZvehEGbFftDa+L4wAoUrQUInkLu1aF8zt6GMWek2bvXMDDv7zxu7pQv1cd1hixhB/L0kt 4i4yK8PAlDYMykR4+tJROiba Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 01 Jul 2019 14:57:13 -0700 IronPort-SDR: AABjtBQ8ZjxtlIypq0AuDMGuICj3Ru7OQR6RTokwwI5NwnheQDs9XZu6EHSysDkGvnSbjLSLzk svQHsZ3L9KuVfcFTjFKgPOsuSl7tPlG11lsjBb8z5kXGyUSeWfzv8y2JNrHN9XFqAP9GIoh801 6/k7//Wxd+PiVP+eMja3fbegfEx0pWIXUEx/YSComqBkOzV5tvEeCB40Ty18Wl8YUlGpamcA0W YnMn0/OE8nFdC37M/MT1FRhMxXORwaN4jwQ92KCK2O3IsgCDvM1qCknYbY7bB2yB2W4O2NYyqp t5U= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:58:10 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 5/5] Documentation/laptop: add block_dump documentation Date: Mon, 1 Jul 2019 14:57:26 -0700 Message-Id: <20190701215726.27601-6-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP This patch updates the block_dump documentation with respect to the changes from the earlier patch for submit_bio(). Also we adjust rest of the lines to fit with standaed format. Signed-off-by: Chaitanya Kulkarni --- Documentation/laptops/laptop-mode.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/laptops/laptop-mode.txt b/Documentation/laptops/laptop-mode.txt index 1c707fc9b141..d4d72ed677c4 100644 --- a/Documentation/laptops/laptop-mode.txt +++ b/Documentation/laptops/laptop-mode.txt @@ -101,14 +101,14 @@ a cache miss. The disk can then be spun down in the periods of inactivity. If you want to find out which process caused the disk to spin up, you can gather information by setting the flag /proc/sys/vm/block_dump. When this flag -is set, Linux reports all disk read and write operations that take place, and -all block dirtyings done to files. This makes it possible to debug why a disk -needs to spin up, and to increase battery life even more. The output of -block_dump is written to the kernel output, and it can be retrieved using -"dmesg". When you use block_dump and your kernel logging level also includes -kernel debugging messages, you probably want to turn off klogd, otherwise -the output of block_dump will be logged, causing disk activity that is not -normally there. +is set, Linux reports all disk I/O operations along with read and write +operations that take place, and all block dirtyings done to files. This makes +it possible to debug why a disk needs to spin up, and to increase battery life +even more. The output of block_dump is written to the kernel output, and it can +be retrieved using "dmesg". When you use block_dump and your kernel logging +level also includes kernel debugging messages, you probably want to turn off +klogd, otherwise the output of block_dump will be logged, causing disk activity +that is not normally there. Configuration