Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1664371/?format=api
{ "id": 1664371, "url": "http://patchwork.ozlabs.org/api/patches/1664371/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20220807192709.21717-1-pali@kernel.org>", "list_archive_url": null, "date": "2022-08-07T19:27:09", "name": "ubifs: Allow to silence debug dumps", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "93b05aefa06ba059ad13617089ddb0f1f52233ff", "submitter": { "id": 78810, "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api", "name": "Pali Rohár", "email": "pali@kernel.org" }, "delegate": { "id": 1691, "url": "http://patchwork.ozlabs.org/api/users/1691/?format=api", "username": "hs", "first_name": "Heiko", "last_name": "Schocher", "email": "hs@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/mbox/", "series": [ { "id": 312887, "url": "http://patchwork.ozlabs.org/api/series/312887/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=312887", "date": "2022-08-07T19:27:09", "name": "ubifs: Allow to silence debug dumps", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/312887/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1664371/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1664371/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=E0N+Xj1j;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"E0N+Xj1j\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org", "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4M18Vk3js6z9sB4\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 8 Aug 2022 05:27:38 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 06B8283EF2;\n\tSun, 7 Aug 2022 21:27:33 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 8E799844E3; Sun, 7 Aug 2022 21:27:31 +0200 (CEST)", "from ams.source.kernel.org (ams.source.kernel.org\n [IPv6:2604:1380:4601:e00::1])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0BDEF8300F\n for <u-boot@lists.denx.de>; Sun, 7 Aug 2022 21:27:29 +0200 (CEST)", "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by ams.source.kernel.org (Postfix) with ESMTPS id A68DAB80B45\n for <u-boot@lists.denx.de>; Sun, 7 Aug 2022 19:27:28 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 202BFC433D6\n for <u-boot@lists.denx.de>; Sun, 7 Aug 2022 19:27:27 +0000 (UTC)", "by pali.im (Postfix)\n id 65D9097B; Sun, 7 Aug 2022 21:27:24 +0200 (CEST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no\n version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1659900447;\n bh=5oM44NzsWtpRXXFHeRmkR3DZkxRx/jX4zPPwnN4GIB8=;\n h=From:To:Subject:Date:From;\n b=E0N+Xj1jJ7FkBDhobjyxkSH+a5/V50ZqLk8DGyNM4TiujTSG+ycFKWuiHU2pJ2qOX\n YuToBdz296zmf9o1viIu7Cf/ZUFw1puI3uQPcNGjikd9Vv0RwY/rw4kqaoO1+KlXYX\n 3LTjyNgTcx3Ckif412oIp4mHewoJJcLA9UDuHmRubOGjfcuTNEncNSpri8HxBtSAtC\n 2opayJfgcibzt+L5kgWY8eVNtU1CNHHnHyasF9l26iNoJ5Z9aU5CL1dsi9+lTppgx9\n 27R0Jxus+Rpho2EBpJ5L4VUaBZkacn+O7oS9aRNiFj1z/EjLNm1OEUhfVJWMpIbA3A\n cVMDNpWiWcYnw==", "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>", "To": "u-boot@lists.denx.de", "Subject": "[PATCH] ubifs: Allow to silence debug dumps", "Date": "Sun, 7 Aug 2022 21:27:09 +0200", "Message-Id": "<20220807192709.21717-1-pali@kernel.org>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.6 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Debug dump logs are not always required. Add a new config option\nUBIFS_SILENCE_DEBUG_DUMP to silence all debug dumps. On powerpc/mpc85xx\nwhen enabled this will decrease size of U-Boot binary by 11 kB.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n fs/ubifs/Kconfig | 8 ++++++++\n fs/ubifs/debug.c | 28 ++++++++++++++++++++++++++++\n 2 files changed, 36 insertions(+)", "diff": "diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig\nindex 9da35b8a3794..949b28841194 100644\n--- a/fs/ubifs/Kconfig\n+++ b/fs/ubifs/Kconfig\n@@ -4,3 +4,11 @@ config UBIFS_SILENCE_MSG\n \thelp\n \t Make the verbose messages from UBIFS stop printing. This leaves\n \t warnings and errors enabled.\n+\n+config UBIFS_SILENCE_DEBUG_DUMP\n+\tbool \"UBIFS silence debug dumps\"\n+\tdefault y if UBIFS_SILENCE_MSG\n+\tdefault n\n+\thelp\n+\t Make the debug dumps from UBIFS stop printing.\n+\t This decreases size of U-Boot binary.\ndiff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c\nindex 2ff8f1a5f9b1..bede7d01cab0 100644\n--- a/fs/ubifs/debug.c\n+++ b/fs/ubifs/debug.c\n@@ -35,6 +35,7 @@\n static DEFINE_SPINLOCK(dbg_lock);\n #endif\n \n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n static const char *get_key_fmt(int fmt)\n {\n \tswitch (fmt) {\n@@ -230,6 +231,7 @@ static void dump_ch(const struct ubifs_ch *ch)\n \t (unsigned long long)le64_to_cpu(ch->sqnum));\n \tpr_err(\"\\tlen %u\\n\", le32_to_cpu(ch->len));\n }\n+#endif\n \n void ubifs_dump_inode(struct ubifs_info *c, const struct inode *inode)\n {\n@@ -303,6 +305,7 @@ void ubifs_dump_inode(struct ubifs_info *c, const struct inode *inode)\n \n void ubifs_dump_node(const struct ubifs_info *c, const void *node)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tint i, n;\n \tunion ubifs_key key;\n \tconst struct ubifs_ch *ch = node;\n@@ -546,10 +549,12 @@ void ubifs_dump_node(const struct ubifs_info *c, const void *node)\n \t\t (int)ch->node_type);\n \t}\n \tspin_unlock(&dbg_lock);\n+#endif\n }\n \n void ubifs_dump_budget_req(const struct ubifs_budget_req *req)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tspin_lock(&dbg_lock);\n \tpr_err(\"Budgeting request: new_ino %d, dirtied_ino %d\\n\",\n \t req->new_ino, req->dirtied_ino);\n@@ -563,10 +568,12 @@ void ubifs_dump_budget_req(const struct ubifs_budget_req *req)\n \tpr_err(\"\\tdata_growth %d dd_growth %d\\n\",\n \t req->data_growth, req->dd_growth);\n \tspin_unlock(&dbg_lock);\n+#endif\n }\n \n void ubifs_dump_lstats(const struct ubifs_lp_stats *lst)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tspin_lock(&dbg_lock);\n \tpr_err(\"(pid %d) Lprops statistics: empty_lebs %d, idx_lebs %d\\n\",\n \t current->pid, lst->empty_lebs, lst->idx_lebs);\n@@ -575,6 +582,7 @@ void ubifs_dump_lstats(const struct ubifs_lp_stats *lst)\n \tpr_err(\"\\ttotal_used %lld, total_dark %lld, total_dead %lld\\n\",\n \t lst->total_used, lst->total_dark, lst->total_dead);\n \tspin_unlock(&dbg_lock);\n+#endif\n }\n \n #ifndef __UBOOT__\n@@ -653,6 +661,7 @@ void ubifs_dump_budg(struct ubifs_info *c, const struct ubifs_budg_info *bi)\n \n void ubifs_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tint i, spc, dark = 0, dead = 0;\n \tstruct rb_node *rb;\n \tstruct ubifs_bud *bud;\n@@ -740,6 +749,7 @@ void ubifs_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp)\n \tif (lp->lnum == c->gc_lnum)\n \t\tpr_cont(\", GC LEB\");\n \tpr_cont(\")\\n\");\n+#endif\n }\n \n void ubifs_dump_lprops(struct ubifs_info *c)\n@@ -766,6 +776,7 @@ void ubifs_dump_lprops(struct ubifs_info *c)\n \n void ubifs_dump_lpt_info(struct ubifs_info *c)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tint i;\n \n \tspin_lock(&dbg_lock);\n@@ -800,11 +811,13 @@ void ubifs_dump_lpt_info(struct ubifs_info *c)\n \t\t i + c->lpt_first, c->ltab[i].free, c->ltab[i].dirty,\n \t\t c->ltab[i].tgc, c->ltab[i].cmt);\n \tspin_unlock(&dbg_lock);\n+#endif\n }\n \n void ubifs_dump_sleb(const struct ubifs_info *c,\n \t\t const struct ubifs_scan_leb *sleb, int offs)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tstruct ubifs_scan_node *snod;\n \n \tpr_err(\"(pid %d) start dumping scanned data from LEB %d:%d\\n\",\n@@ -816,10 +829,12 @@ void ubifs_dump_sleb(const struct ubifs_info *c,\n \t\t sleb->lnum, snod->offs, snod->len);\n \t\tubifs_dump_node(c, snod->node);\n \t}\n+#endif\n }\n \n void ubifs_dump_leb(const struct ubifs_info *c, int lnum)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tstruct ubifs_scan_leb *sleb;\n \tstruct ubifs_scan_node *snod;\n \tvoid *buf;\n@@ -854,11 +869,13 @@ void ubifs_dump_leb(const struct ubifs_info *c, int lnum)\n out:\n \tvfree(buf);\n \treturn;\n+#endif\n }\n \n void ubifs_dump_znode(const struct ubifs_info *c,\n \t\t const struct ubifs_znode *znode)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tint n;\n \tconst struct ubifs_zbranch *zbr;\n \tchar key_buf[DBG_KEY_BUF_LEN];\n@@ -893,10 +910,12 @@ void ubifs_dump_znode(const struct ubifs_info *c,\n \t\t\t\t\t\tDBG_KEY_BUF_LEN));\n \t}\n \tspin_unlock(&dbg_lock);\n+#endif\n }\n \n void ubifs_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tint i;\n \n \tpr_err(\"(pid %d) start dumping heap cat %d (%d elements)\\n\",\n@@ -909,11 +928,13 @@ void ubifs_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat)\n \t\t lprops->dirty, lprops->flags);\n \t}\n \tpr_err(\"(pid %d) finish dumping heap\\n\", current->pid);\n+#endif\n }\n \n void ubifs_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,\n \t\t struct ubifs_nnode *parent, int iip)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tint i;\n \n \tpr_err(\"(pid %d) dumping pnode:\\n\", current->pid);\n@@ -927,10 +948,12 @@ void ubifs_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,\n \t\tpr_err(\"\\t%d: free %d dirty %d flags %d lnum %d\\n\",\n \t\t i, lp->free, lp->dirty, lp->flags, lp->lnum);\n \t}\n+#endif\n }\n \n void ubifs_dump_tnc(struct ubifs_info *c)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tstruct ubifs_znode *znode;\n \tint level;\n \n@@ -948,14 +971,17 @@ void ubifs_dump_tnc(struct ubifs_info *c)\n \t\tznode = ubifs_tnc_levelorder_next(c->zroot.znode, znode);\n \t}\n \tpr_err(\"(pid %d) finish dumping TNC tree\\n\", current->pid);\n+#endif\n }\n \n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n static int dump_znode(struct ubifs_info *c, struct ubifs_znode *znode,\n \t\t void *priv)\n {\n \tubifs_dump_znode(c, znode);\n \treturn 0;\n }\n+#endif\n \n /**\n * ubifs_dump_index - dump the on-flash index.\n@@ -966,7 +992,9 @@ static int dump_znode(struct ubifs_info *c, struct ubifs_znode *znode,\n */\n void ubifs_dump_index(struct ubifs_info *c)\n {\n+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP\n \tdbg_walk_index(c, NULL, dump_znode, NULL);\n+#endif\n }\n \n #ifndef __UBOOT__\n", "prefixes": [] }