From patchwork Tue Jun 18 05:42:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11001017 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 6B75F14DB for ; Tue, 18 Jun 2019 07:04:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BCB9288D3 for ; Tue, 18 Jun 2019 07:04:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 449DA28A16; Tue, 18 Jun 2019 07:04:12 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D97B9288E8 for ; Tue, 18 Jun 2019 07:04:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbfFRHEL (ORCPT ); Tue, 18 Jun 2019 03:04:11 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7915 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfFRHEL (ORCPT ); Tue, 18 Jun 2019 03:04:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560841451; x=1592377451; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=437NbzGWjNTmwxRY1Fdvft+RTI2X8/BOyqds1LngC2Y=; b=VOWz7yewQVPS50CMPNk7GeD/wROqmrwQt1oP8EQiTvaAuo4WEKMYSWcG psAkE05ntERLd4TSM4W4Dv1buKpdjU7CesUpXmgiSDuY7IKVNpEOFBUmo WkcB/v/AybyXHmtH0KMHI00FmZ7qAcNIpRBlKth0qHQctZHBaIC5YLXHF Hg+JKo5+LI8p8U4c+UQnDqbch4Bhx6svYb+QnKTFnS3LBp0Ye0bNn5VDT U/YOW/fAn8fZ+HeepgbdMv2ZfYUHvb/oNfGDEQMhMu296EAKC881cgGMW EhqKw4nUmNk5hgUfzdQcI6yEiTR6dolhVV75VSDqV6jvmLppdOcoM4A3R Q==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="115733426" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 13:42:31 +0800 IronPort-SDR: qsZG/6YfoPQmDZnZ/ON+gr1Tjs57F95bBy089efIigxT5vxUZ5E/4A3/nMsvbAnzcxddFfaX+R f2DDB4qIRemnEGdqYLP7FcusEDskuv6rCNg3udRaLCauHUUItnd1kwEF2O7eW0UT2gqJjVGQcW +ClHdE8jkocJ0uXYyS3M431yE/GH/aTXgDwfiqQIBAQ83DF/lojhhRJ7WHQwWsoB4yVr7AFlBD t7SsCavDDpnOyCuKdxYpODZzcnT0bF/+wBwJOvP0mlSE/J5HCP42BDkThQ4EAHaalzcEjxczy2 H0BiBaOm7j0qakoY2G3BRkwR Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 17 Jun 2019 22:42:00 -0700 IronPort-SDR: KVk8FCHx8bEFX7vuVKzIfcmpZTJh/nOotSwEXnCdLtYOrSG4LmUohUqPZPweAgzqJNnCRKe6uH btNGye4DTpe9zys6XJYfjhLBQ/cVDeEX44kVM9+/c0md4rhPhgR9QA+zZE5SVA09R7KSyabRyY 9Gcp3pSZwHEntdwL3v3NexaAV7fN5yMRDXJNECgGNXlcJCjjnMxGsjgHF5sX6iaFDtB/nk6SZZ RgBpIQndT13iAQIoUFaFK5+f+h3YBJt9IzNRktAkG2dgVOO5+SvM/LmzZnKhkqEA22zXLnRu1h Owg= Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 22:42:30 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: jaegeuk@kernel.org, yuchao0@huawei.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH V3 1/6] block: improve print_req_error Date: Mon, 17 Jun 2019 22:42:19 -0700 Message-Id: <20190618054224.25985-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> References: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christoph Hellwig Print the calling function instead of print_req_error as a prefix, and print the operation and op_flags separately instead of the whole field. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- block/blk-core.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 8340f69670d8..6753231b529b 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -167,18 +167,20 @@ int blk_status_to_errno(blk_status_t status) } EXPORT_SYMBOL_GPL(blk_status_to_errno); -static void print_req_error(struct request *req, blk_status_t status) +static void print_req_error(struct request *req, blk_status_t status, + const char *caller) { int idx = (__force int)status; if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) return; - printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu flags %x\n", - __func__, blk_errors[idx].name, - req->rq_disk ? req->rq_disk->disk_name : "?", - (unsigned long long)blk_rq_pos(req), - req->cmd_flags); + printk_ratelimited(KERN_ERR + "%s: %s error, dev %s, sector %llu op 0x%x flags 0x%x\n", + caller, blk_errors[idx].name, + req->rq_disk ? req->rq_disk->disk_name : "?", + blk_rq_pos(req), req_op(req), + req->cmd_flags & ~REQ_OP_MASK); } static void req_bio_endio(struct request *rq, struct bio *bio, @@ -1373,7 +1375,7 @@ bool blk_update_request(struct request *req, blk_status_t error, if (unlikely(error && !blk_rq_is_passthrough(req) && !(req->rq_flags & RQF_QUIET))) - print_req_error(req, error); + print_req_error(req, error, __func__); blk_account_io_completion(req, nr_bytes); From patchwork Tue Jun 18 05:42:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11001019 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 AAA631932 for ; Tue, 18 Jun 2019 07:04:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A538288D3 for ; Tue, 18 Jun 2019 07:04:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D0C1288E8; Tue, 18 Jun 2019 07:04:12 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2775928A15 for ; Tue, 18 Jun 2019 07:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725900AbfFRHEL (ORCPT ); Tue, 18 Jun 2019 03:04:11 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7917 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfFRHEL (ORCPT ); Tue, 18 Jun 2019 03:04:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560841451; x=1592377451; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2x8H+F+wWnz/8z9MIEDVkVlyQPehgZ4esjqKHNd3FQA=; b=VLaXN9c+7+cm5EoV5i1y5BtZ6ETJnCgo32vkpyg6mjmZruTTaRLmXbKI F+GAY1udlfj2M4rvQOtQNHQ1Jo92cyz6HH4fF9b6APtwRp3a4HXFQR5a8 LFkhBWtDQZoST+1v6bMBvR60hehim09IUMqIgbhEGyzlg/sx/vrqZtF4X vltJ3Gdis7QxbIBiuDpvKjP9vFmGX9bWyfSbXwQh//xEATakNyDUSypBs K7SXXfmOmVMmKbTsUcxjNQueAgHo+ipHXdDytmtUGwN5NKtK6ft0Qe8Fa hgj0uqIuagIwLZlJBGhNQf1IKnkUC+0ZlmlmX+I0788MrhEXubqkgWdiP w==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="115733428" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 13:42:34 +0800 IronPort-SDR: JSwhdaQtP/Ru9kbShkQ21WGP+b/IcM2clvSv7s3DOStixdyBejd6ngaS3MT/RievUyd1v3gJ6w MByht2G1tnh5mxEFrcunNdso1YbOHfy/Ns8Dw7dClKICm2iR2PYad9dv2HnFb/kMEADvKJpMrt Q8NPLsomac4i/jpUVl9//SWFbTP8gZHJuOlz9U3bGrRfAn99PdHU1Go9P8qLB+afbvF+bxJdIU L6wVnSevPFtDAkS3XhdA+CiE9vRoOohCWunyU44naxIwustyUo3Ce6dNDMraS+NnWkAshYg6aP RyJ0nVTD+N0hkNB8u6VM7xgf Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 17 Jun 2019 22:42:04 -0700 IronPort-SDR: /8xoOnj+ple2vDEd5ED/SFyMWOjFvxkICOQ8pT3Qyoyc6zUIxWgXxV2WOlAYhT9SqAo1omOLl4 zEKbxBbm5M+wV2pQEs1LiyKS/6HBLkt9uCmWyWx2yhLVQIiZUWvpnIYqrAwOGmm26Cf0EG38cH in6FqPfzU+tewK7RgOGYhofIw6UntdafqPkvrTQ4kp0yT1kfKtZ32gAlzpwu57kz5qYzhNHJlo 306lrnl+5zvYzew3ti0IAJQ8iZ5CRO6Ou7GsgJnHTRsFEEYyonZ6CbfkFJ1w/UfJLYBz6hYuV/ mZY= Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 22:42:34 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: jaegeuk@kernel.org, yuchao0@huawei.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH V3 2/6] block: add centralize REQ_OP_XXX to string helper Date: Mon, 17 Jun 2019 22:42:20 -0700 Message-Id: <20190618054224.25985-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> References: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to centralize the REQ_OP_XXX to string conversion which can be used in the block layer and different places in the kernel like f2fs, this patch adds a new helper function along with an array similar to the one present in the blk-mq-debugfs.c. We keep this helper functionality centralize under blk-core.c instead of blk-mq-debugfs.c since blk-core.c is configured using CONFIG_BLOCK and it will not be dependent on blk-mq-debugfs.c which is configured using CONFIG_BLK_DEBUG_FS which can be disabled when block layer debugging is not needed by the user. Next patch adjusts the code in the blk-mq-debugfs.c with newly introduced helper. Signed-off-by: Chaitanya Kulkarni --- block/blk-core.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 3 +++ 2 files changed, 39 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 6753231b529b..c92b5a16a27a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -120,6 +120,42 @@ void blk_rq_init(struct request_queue *q, struct request *rq) } EXPORT_SYMBOL(blk_rq_init); +#define REQ_OP_NAME(name) [REQ_OP_##name] = #name +static const char *const blk_op_name[] = { + REQ_OP_NAME(READ), + REQ_OP_NAME(WRITE), + REQ_OP_NAME(FLUSH), + REQ_OP_NAME(DISCARD), + REQ_OP_NAME(SECURE_ERASE), + REQ_OP_NAME(ZONE_RESET), + REQ_OP_NAME(WRITE_SAME), + REQ_OP_NAME(WRITE_ZEROES), + REQ_OP_NAME(SCSI_IN), + REQ_OP_NAME(SCSI_OUT), + REQ_OP_NAME(DRV_IN), + REQ_OP_NAME(DRV_OUT), +}; +#undef REQ_OP_NAME + +/** + * blk_op_str - Return string XXX in the REQ_OP_XXX. + * @op: REQ_OP_XXX. + * + * Description: Centralize block layer function to convert REQ_OP_XXX into + * string format. Useful in the debugging and tracing bio or request. For + * invalid REQ_OP_XXX it returns string "UNKNOWN". + */ +inline const char *blk_op_str(int op) +{ + const char *op_str = "UNKNOWN"; + + if (op < ARRAY_SIZE(blk_op_name) && blk_op_name[op]) + op_str = blk_op_name[op]; + + return op_str; +} +EXPORT_SYMBOL_GPL(blk_op_str); + static const struct { int errno; const char *name; diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 592669bcc536..077a77a4a91c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -867,6 +867,9 @@ extern void blk_execute_rq(struct request_queue *, struct gendisk *, extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, struct request *, int, rq_end_io_fn *); +/* Helper to convert REQ_OP_XXX to its string format XXX */ +extern const char *blk_op_str(int op); + int blk_status_to_errno(blk_status_t status); blk_status_t errno_to_blk_status(int errno); From patchwork Tue Jun 18 05:42:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11001021 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 26ED776 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 148C4288D3 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 088F6288E8; Tue, 18 Jun 2019 07:04: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5A0C28A15 for ; Tue, 18 Jun 2019 07:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728840AbfFRHEM (ORCPT ); Tue, 18 Jun 2019 03:04:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7915 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfFRHEL (ORCPT ); Tue, 18 Jun 2019 03:04:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560841452; x=1592377452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jcHDm4jZNbyc5j1/ToWU/7RDcyYbgsu6A2aVzgajouY=; b=nE5mMTn6N2Xvc22xTizgoe2ml7qGQSvurrOvZn0vg+bpwL5UtTCBm9Qg vW8fxG5DgY/0NgDk1dhdmjUjP+C3sdIiq6A4CKKYHB6+F/LxKSkWj0m0P adGpOyylTwp/ATyXnD7634knUqMDokQGMnerqjaHxTWvTLCpDkeN6yWG7 9ftgDdvtPUQo1YdGTnuv0nRrjEx/jcsZeLwjugr040ZZaoy+L11cnIWvK ZsWfnbW4dbWAS3PGn0y57faQ0T+S3b49Qyu6e1ETBnGNoiniam/RZ3QQ/ KYzPnRBqUp/IC79q5Ujh4tod/KDDX5ebkpN+FnZOAgKlzBvX05rU1CH81 A==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="115733432" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 13:42:39 +0800 IronPort-SDR: G2N1gh+s2t89ytQ6WLnNOV+5YUzMskKQUFuGc8tXDelepIIiwXE2mJ/vZRjDUO1nqIjePcZ/LX n8SvVyzvY+ddNYHB9O/n2+/iFxjoBAKBRWCol+xKv695qm3OObGLMa9vBTq64DiwTt1lO/Bo0g 6d2+gV/qBUK3XQvJRzyaWPV6J9QKWcKof4kp2jY8SBnPzfZLKM1h7ZW/7fpE4S0A/rTzleOxKL doyPJ5W8jY/1UopyDwDu0XUqSDLefTtxaBLgk5C0EmjHtYRKHm84J8ehXJACoWdA7A/zerxC9f nYia3UoZqCZTq5D09rU0j+aa Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 17 Jun 2019 22:42:08 -0700 IronPort-SDR: pHJ5L3YcV0wtQkeSwUTxqGdw7Jj/otOGXWJwv4RKBt0ApOpkUMVHSB7xwb1A/X9PWVw+Xu9z+X d/Hk7Beqtyr3yT8gsK7RzxZpTDSCBV+eeumjQikJwkwlK4Rgh8hIrSpIE4h6OBeLyEXCT2OimY J8RCDF8nlu0fZOnoZEWASuCuC4QSqA4PXV7pWA1hgupzfr6qupv3khtfLpInJ89/5QCM9D74TI SeJE7RKPA7xbnVI5gooIj76MX9ZpyHRU2MAbM41lruRGJsS56qzye+MmjXNzY8OU+v02qCbf/m vyw= Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 22:42:38 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: jaegeuk@kernel.org, yuchao0@huawei.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH V3 3/6] block: use blk_op_str() in blk-mq-debugfs.c Date: Mon, 17 Jun 2019 22:42:21 -0700 Message-Id: <20190618054224.25985-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> References: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we've a helper function blk_op_str() to convert the REQ_OP_XXX to string XXX, adjust the code to use that. Get rid of the duplicate array op_name which is now present in the blk-core.c which we renamed it to "blk_op_name" and open coding in the blk-mq-debugfs.c. Signed-off-by: Chaitanya Kulkarni --- block/blk-mq-debugfs.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index f0550be60824..68b602d4d1b8 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -261,23 +261,6 @@ static int hctx_flags_show(void *data, struct seq_file *m) return 0; } -#define REQ_OP_NAME(name) [REQ_OP_##name] = #name -static const char *const op_name[] = { - REQ_OP_NAME(READ), - REQ_OP_NAME(WRITE), - REQ_OP_NAME(FLUSH), - REQ_OP_NAME(DISCARD), - REQ_OP_NAME(SECURE_ERASE), - REQ_OP_NAME(ZONE_RESET), - REQ_OP_NAME(WRITE_SAME), - REQ_OP_NAME(WRITE_ZEROES), - REQ_OP_NAME(SCSI_IN), - REQ_OP_NAME(SCSI_OUT), - REQ_OP_NAME(DRV_IN), - REQ_OP_NAME(DRV_OUT), -}; -#undef REQ_OP_NAME - #define CMD_FLAG_NAME(name) [__REQ_##name] = #name static const char *const cmd_flag_name[] = { CMD_FLAG_NAME(FAILFAST_DEV), @@ -342,12 +325,13 @@ int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq) { const struct blk_mq_ops *const mq_ops = rq->q->mq_ops; const unsigned int op = rq->cmd_flags & REQ_OP_MASK; + const char *op_str = blk_op_str(op); seq_printf(m, "%p {.op=", rq); - if (op < ARRAY_SIZE(op_name) && op_name[op]) - seq_printf(m, "%s", op_name[op]); - else + if (strcmp(op_str, "UNKNOWN") == 0) seq_printf(m, "%d", op); + else + seq_printf(m, "%s", op_str); seq_puts(m, ", .cmd_flags="); blk_flags_show(m, rq->cmd_flags & ~REQ_OP_MASK, cmd_flag_name, ARRAY_SIZE(cmd_flag_name)); From patchwork Tue Jun 18 05:42: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: 11001025 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 B46B21932 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A319E288D3 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9738428A17; Tue, 18 Jun 2019 07:04: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CFBC288E8 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725829AbfFRHEM (ORCPT ); Tue, 18 Jun 2019 03:04:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7917 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727097AbfFRHEL (ORCPT ); Tue, 18 Jun 2019 03:04:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560841452; x=1592377452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bgxxsw+aFjGTScDcN8vsmnNC5VW5TuLIHgjRPRtB3ws=; b=UALdGP9uHepDtMzCR9zLETNWBl+A0nWLf/NImbDtkEV8oR+FlERQibno R47DWRhlBgt/2paJMz03bnB4L9/5FJy6fdRJW6vNo22fCEQlvnmT8Q1cG xPIYBg4ifQ2AZ/pouVU7+F9UY7CuR2I5H+ZHjXiwfFiKFQdK4QBUr5lDz f2UMv0dQI2zO4IJlv4FfUO7Fo74gRsTyhUmZyAp6x+kF2pUyjj9KjEESl zOB9F2KDtgqTIhRU8I+h4Q7YFudobVBlQdMSwQWyS5JOA/JKi6DiBbJBd HluWt8ZKvL4OmRDD2mUuUBD60uCUTmH8SNs4Af09oHUr5VUypcJQ2qhK9 g==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="115733434" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 13:42:44 +0800 IronPort-SDR: VJ4Y0mXP9GmuQ05NgiZgQoUdDgfw4OG29oWVhEPKEpOCEvxgsCSyT5qO/Sv1q3wpz0tsZOqW7F 1wOQ/4rnVoAgX79TvN9r6W6wazsGSM9wGztJjShloqa5o+hpFUSUINLjRzRUDBs4qnX3JrZ3w2 v0Tw/stEvq7lEoQVFzHyPlZwrx6WEYbHuB3RTEiC2OsriOKzVD65zLnXDUX/deVF2fwFSTumAa 3f7pkWcA1tRRD482/w0dn57XzIri/Pid62xpWgO/COdRdu5C3y7R3jBKU7BxrORuA0weIjSjko N1htzbTxXwT6d9NQ/WgTsqPF Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 17 Jun 2019 22:42:13 -0700 IronPort-SDR: bxbWO8GnNFEEE6QeHVKkvsy0/Op5viMOXOCZEaMXB9kCzI4FGkvFg30WVH0318T3iBTsqxf+WX zND16Ao+JX7XhwoCpRBh9tz8kwIk87PGub6Ypt/kBTUy4UTaDKd1aLRR3VB71gjVP0CHMrMT2G ZZBCPAnEw9LsDyKbn3IP6x/5UQ2XcbvCpAnF9qaNggbnus1Egj+zfwzkSSUQe3L1W48J6W9wlN WtRLLcjcUhxSgIJ+ekPd2a0Ohcu7ykK7rmLvcMkkN1FyyKTqZa7fAd4GuTKnsCRcNHTRenLDeI +Qo= Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 22:42:43 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: jaegeuk@kernel.org, yuchao0@huawei.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH V3 4/6] block: update print_req_error() Date: Mon, 17 Jun 2019 22:42:22 -0700 Message-Id: <20190618054224.25985-5-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> References: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Improve the print_req_error with additional request fields which are helpful for debugging. Use newly introduced blk_op_str() to print the REQ_OP_XXX in the string format. Signed-off-by: Chaitanya Kulkarni --- block/blk-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index c92b5a16a27a..88a716c3dc56 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -212,11 +212,14 @@ static void print_req_error(struct request *req, blk_status_t status, return; printk_ratelimited(KERN_ERR - "%s: %s error, dev %s, sector %llu op 0x%x flags 0x%x\n", + "%s: %s error, dev %s, sector %llu op 0x%x:(%s) flags 0x%x " + "phys_seg %u prio class %u\n", caller, blk_errors[idx].name, - req->rq_disk ? req->rq_disk->disk_name : "?", - blk_rq_pos(req), req_op(req), - req->cmd_flags & ~REQ_OP_MASK); + req->rq_disk ? req->rq_disk->disk_name : "?", + blk_rq_pos(req), req_op(req), blk_op_str(req_op(req)), + req->cmd_flags & ~REQ_OP_MASK, + req->nr_phys_segments, + IOPRIO_PRIO_CLASS(req->ioprio)); } static void req_bio_endio(struct request *rq, struct bio *bio, From patchwork Tue Jun 18 05:42: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: 11001027 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 5513B76 for ; Tue, 18 Jun 2019 07:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 473E1288D3 for ; Tue, 18 Jun 2019 07:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BC9B28A15; Tue, 18 Jun 2019 07:04:14 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3BC5288D3 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbfFRHEM (ORCPT ); Tue, 18 Jun 2019 03:04:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7915 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfFRHEM (ORCPT ); Tue, 18 Jun 2019 03:04:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560841452; x=1592377452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FTS3xe+OMh34VHu9uCStRTNuxPXwWPijIGYDUqe3v/8=; b=pPL1/8lx090cl7/lY0WZ+86I56/3CIGr9vLM1IxxNsxbGUOvzMnnjsxV eAsD51ihefdHxRgKT00E8FA7x2k4eN7xh/OTp/Q1Z170QPaY7Ywmysd5t ZcviO0m/61AE7jgGGx4w31ZKUcH5f0Oa9iHutRsCuZ15kyDs97PHCjz7m 1agejFyOLb4olwPrxXLnkR/PolLdUNnP2bHdchLXAUchbs69obGsQhzJl jpQH5lMz4h557guoTuxUmoNhAJY1FKxgua2xzaufO756kV4YpRJzF+YXu zmeFtso62rn4AFrlawKuqrXZjGhMrYYMcKRITmE2/np6bNwIfQQGEUQHh w==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="115733438" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 13:42:49 +0800 IronPort-SDR: C1ZwNWkDo/B3oHW1uZdlvio2rug+9JENC/7Z7EJOm9wHV7SEQOQhz5t27NH9i8z7woZ3g/RkQX eYqgIAXDyn2PIAKZ/nlI8gyGsdx80YysVs+HO7s7kDyvlBIbiVsEa1pffekljVIoiSvX6W4QSx 2DFqmQ0hLYtUtBUUcjfAk8UZfd4dDfmANvnXbbi/6bxFEOys0S9z4DzAf6nvm7F9DVzjXKkda5 Us2PtjgNVp7QzShUdQYUPPHmsoPZlUOTmeSTwxn2sIVlR8FNNJTrwbv2lpjjATmOgMGcAPalRB Xhwiy03jpIqP6WF2X9n8hcGb Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 17 Jun 2019 22:42:18 -0700 IronPort-SDR: D3yxs5zEAgofk/QwMdynisRv/sbTqSjiMIkc9RjKEcuNtAFbsQU+ALQMqYs5ogCbU9CnRZun0x 4S95b4muqUQ9uS0FW0+8IG0l9ollPlPpReNNvT5tuHmY22KrvgQoHVxJPMtDZuU7c5V5w+80E3 kS0ocELd1ZgqvgKOot90JeA28yiQjL9D3D9dSm+RNt4HLYcYOEUYB3mztjDaYepStKa6t6aUR2 KGSGZ02f63KzLXVIRnM9Qx7eTqf9gcvC0c6QWtWUUVA+jvjFr3LtNL2Kl7p3Bufss1ttpf8Fgm OyU= Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 22:42:48 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: jaegeuk@kernel.org, yuchao0@huawei.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH V3 5/6] f2fs: use block layer helper for REQ_OP_XXX Date: Mon, 17 Jun 2019 22:42:23 -0700 Message-Id: <20190618054224.25985-6-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> References: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adjust the f2fs tracing code to use newly introduced block layer function blk_op_str() which converts the REQ_OP_XXX into the string XXX. Signed-off-by: Chaitanya Kulkarni --- include/trace/events/f2fs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 53b96f12300c..ec4dba5a4c30 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -1045,7 +1045,8 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio, (unsigned long)__entry->index, (unsigned long long)__entry->old_blkaddr, (unsigned long long)__entry->new_blkaddr, - show_bio_type(__entry->op, __entry->op_flags), + blk_op_str(__entry->op), + show_bio_op_flags(__entry->op_flags), show_block_temp(__entry->temp), show_block_type(__entry->type)) ); @@ -1097,7 +1098,8 @@ DECLARE_EVENT_CLASS(f2fs__bio, TP_printk("dev = (%d,%d)/(%d,%d), rw = %s(%s), %s, sector = %lld, size = %u", show_dev(__entry->target), show_dev(__entry->dev), - show_bio_type(__entry->op, __entry->op_flags), + blk_op_str(__entry->op), + show_bio_op_flags(__entry->op_flags), show_block_type(__entry->type), (unsigned long long)__entry->sector, __entry->size) From patchwork Tue Jun 18 05:42: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: 11001023 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 9856A14DB for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89A5C28A14 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DFA928A15; Tue, 18 Jun 2019 07:04: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D213288D3 for ; Tue, 18 Jun 2019 07:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728916AbfFRHEM (ORCPT ); Tue, 18 Jun 2019 03:04:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7918 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728817AbfFRHEM (ORCPT ); Tue, 18 Jun 2019 03:04:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560841452; x=1592377452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bI9j3kj4foQo5nMw5CIMB0dDQiCRAJjycv2LnOj6d8M=; b=NMgKkrJOXXI/rSDOdk5JVvEotSjwYZ8Hnr7/wYFqoCw800/faQmAeh7p 8MK4C/dC8yTNjZOI63Bj1KEHjW4cK658KiSO5Aed/Swwb28/6UnosB5Rl 73Gbnq3+eHL48DpMPyQfNVxVvSbrvY6KkTNrGEGKIZZjig/5sH3OJpwwv 6E305mxSYQWL67538Hj1hKpYz+TBWiRQi7LtqEzBXV4mH9bUFbh0tC0Mj z/bSVHvYhThay1/h9UXSyVQ7z44Lw9+htI7LYc4QWgd9QswTW3hn5kKZN vXs9R9/dQzOhN2pUF2FMpLppsk3Qz44+4mQ42HLJILaYiqkHHAXcCF4of Q==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="115733440" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 13:42:53 +0800 IronPort-SDR: cJKFoeMN78Rif7bRHc1cJbQZqQ5ea1ItFb42/5YHlSn8Fg2NovEBM9FnQtJwEhnZH8SEkKGAFc odAuVqCNbZ/C6r1kkoIErkvztzLXAKieSfV8VLTs8Lb5mUU7Ququ4SGd5rg1xHy7gSbOv/ZfL0 MyHYlXUKttzv3c8EpZaarW6C0nR6SqcncyrMDxLQw2oMVfh3byRSG8ivZ3Pa53qeML0hrofwLI lOIAmrAYF+rIGbdzQYTnuSHVPb5lzE2ZvkI5GaBa1EYwr9tgafGIMOCOhyhcHplw+/8CdYbJNK o/+ees8qKqvrlkNwzKSpLYay Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 17 Jun 2019 22:42:23 -0700 IronPort-SDR: rWvteRosPGCcznMiZ2GtvMH9li4CAROY9IkXL4Cao6MQymnzw/JhttG6av3P0dKBcvUMk2Ogsx J05lwzmGRHY/ptyn3sleRydvvLEsTFToXWHYtiZj/2MxPxoFE7/dBCpB+/GgnjmWWkD7sdBmBr M3ck1JRnfHsJC5JYj6Y1UVeBT+DbZYklgDgf/XCCJrH+nFxUeFjbYBEYft0JMqNo3ByAT+2XSm BlqesJ9ZjdJURu+2yO+HUAKuqkq3G2fhHEVpugDmVkl+4suSLuWGrcMF3LBP7+YasENkKp0+65 nao= Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 22:42:53 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: jaegeuk@kernel.org, yuchao0@huawei.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH V3 6/6] f2fs: get rid of duplicate code for in tracing Date: Mon, 17 Jun 2019 22:42:24 -0700 Message-Id: <20190618054224.25985-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> References: <20190618054224.25985-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have used the blk_op_str(), get rid of show_bio_type() and show_bio_op() to eliminate the duplicate code. Signed-off-by: Chaitanya Kulkarni --- include/trace/events/f2fs.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index ec4dba5a4c30..a8e4fe053e7c 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -73,20 +73,6 @@ TRACE_DEFINE_ENUM(CP_TRIMMED); REQ_PREFLUSH | REQ_FUA) #define F2FS_BIO_FLAG_MASK(t) (t & F2FS_OP_FLAGS) -#define show_bio_type(op,op_flags) show_bio_op(op), \ - show_bio_op_flags(op_flags) - -#define show_bio_op(op) \ - __print_symbolic(op, \ - { REQ_OP_READ, "READ" }, \ - { REQ_OP_WRITE, "WRITE" }, \ - { REQ_OP_FLUSH, "FLUSH" }, \ - { REQ_OP_DISCARD, "DISCARD" }, \ - { REQ_OP_SECURE_ERASE, "SECURE_ERASE" }, \ - { REQ_OP_ZONE_RESET, "ZONE_RESET" }, \ - { REQ_OP_WRITE_SAME, "WRITE_SAME" }, \ - { REQ_OP_WRITE_ZEROES, "WRITE_ZEROES" }) - #define show_bio_op_flags(flags) \ __print_flags(F2FS_BIO_FLAG_MASK(flags), "|", \ { REQ_RAHEAD, "R" }, \