{"id":2234913,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2234913/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508093428.5814-2-liubaolin12138@163.com/","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/1.2/projects/8/?format=json","name":"Linux ext4 filesystem development","link_name":"linux-ext4","list_id":"linux-ext4.vger.kernel.org","list_email":"linux-ext4@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260508093428.5814-2-liubaolin12138@163.com>","list_archive_url":null,"date":"2026-05-08T09:34:26","name":"[v4,v4,1/3] ext4: add blocks_allocated to mb_stats output","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"9e211f6695cf400a3b5b0eeb1a749d2521e72b3a","submitter":{"id":89479,"url":"http://patchwork.ozlabs.org/api/1.2/people/89479/?format=json","name":"liubaolin","email":"liubaolin12138@163.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508093428.5814-2-liubaolin12138@163.com/mbox/","series":[{"id":503354,"url":"http://patchwork.ozlabs.org/api/1.2/series/503354/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/list/?series=503354","date":"2026-05-08T09:34:26","name":"ext4: improve mballoc statistics reporting and control","version":4,"mbox":"http://patchwork.ozlabs.org/series/503354/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2234913/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2234913/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <SRS0=/GsS=DF=vger.kernel.org=linux-ext4+bounces-16359-patchwork-incoming=ozlabs.org@ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-ext4@vger.kernel.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","patchwork-incoming@ozlabs.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256\n header.s=s110527 header.b=F8rz2NEs;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=/gss=df=vger.kernel.org=linux-ext4+bounces-16359-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)","gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.105.105.114 arc.chain=subspace.kernel.org","gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=163.com","gandalf.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256\n header.s=s110527 header.b=F8rz2NEs;\n\tdkim-atps=neutral","gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16359-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=163.com header.i=@163.com\n header.b=\"F8rz2NEs\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=117.135.210.2","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=163.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=163.com"],"Received":["from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBkW80WK8z1yKd\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 19:35:32 +1000 (AEST)","from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4gBkW766twz4w9g\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 19:35:31 +1000 (AEST)","by gandalf.ozlabs.org (Postfix)\n\tid 4gBkW75pm7z4wL0; Fri, 08 May 2026 19:35:31 +1000 (AEST)","from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4gBkW34gtKz4w9g\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 08 May 2026 19:35:27 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id C5CC73043394\n\tfor <patchwork-incoming@ozlabs.org>; Fri,  8 May 2026 09:35:25 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 58B6B3A9015;\n\tFri,  8 May 2026 09:35:22 +0000 (UTC)","from m16.mail.163.com (m16.mail.163.com [117.135.210.2])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id AC2AD3203B6;\n\tFri,  8 May 2026 09:35:18 +0000 (UTC)","from liubaolin-VMware-Virtual-Platform.localdomain (unknown [])\n\tby gzsmtp2 (Coremail) with SMTP id PSgvCgDXeCEprv1pUW9wDg--.60442S3;\n\tFri, 08 May 2026 17:34:52 +0800 (CST)"],"ARC-Seal":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1778232931; cv=pass;\n\tb=NbiLeQIO0AXdJxpkLwpyDgnYNk7ZjehRKWkKhexTKfz04nt2EsIyygGuFGCFFAkSEWyLBHt32J0ADiPO+srWJi1Hj1uoxWvljb1KPJuCSo1UaOsmWf7MB2ldwemyXPW2uhO7A2S5cUbypS9H3o0s7aUbhfVaTCI8/W5PP/Dcz889Yke85SJDUjReL9NAEFypXghaB8W2+piNZxt6eeoVn8nvtDjU122AbLr801OYCU1LavVxNXIOtg6OTgbesZtpvXp2NC934Jv/baOHvjvSIO/Q9J7xaDgQz4pQtkRpWUOpjH8PUOeUYms5LRQ80E9LDfKEV/S1kEZOtYE5YcDVxA==","i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778232922; cv=none;\n b=OHxNOm3vMe39ZNUnCWw7JpFHuSiYdo3c9Fn/MoY7njeivhjuKLIEF8YW+O1FOW8HE0yI47rvF64s+4sFiGTtVUM7QV2V9Pg/LNNMI8hVx6lE8tiL8SkOZ6Sl0rOENdrgUeMIjp4NqRmamF36jckmot+xUe4LTBCWocsQc0uu2xE="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1778232931; c=relaxed/relaxed;\n\tbh=45c6wya7N0PUbeskGcHwwrqhFeuHXefamz6GyNQYArQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Q2hZuo0PsTVeDa9DstuioFTAB2mWRVb1ehUZeaRWKy/V58lwZdKADhUu0rPDWExMY90sZ6h/2+YBxqFFlTngpdENxqSg3HklOpeRNtpD1s3nunYo0s/sLI2L7DEKK0E8DPLqLZvAD4iIjx0HDl5wUJJVufeJAvbJptPfRURmqh0ZVV6hTy2/31PKu/5hD9h86Q0RoxnQqe2PGX51P39cg0wo8sJGRSvtGhzLJ+dPvE6AKu1GXtUeGXgBzBzNMn3SYfI9bJT13BUztEZLbfR/cxnZUsPZuy56NQexUvHMbCAQGyqV5N5x1HpuN2w0z5Q0THfNNuzwdog3bXNvWmpIxw==","i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778232922; c=relaxed/simple;\n\tbh=SiyEP1WZSP5zJJz4PdRF92qWLnENtw7v20M5ZPSdrjA=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=DCQ9ACIe7jHh0efW4Tlrx+qE6qN6BzTtjbcPj4HALNr6taGtQRwR6H1Uq4jMaoVfqplQLH7pXHzrMRdTxJWLbTxoo7tAapl3LAGHkDdK6a0fmNMEGe11Jb7lm3Qi6o1eXbh6ph0dpcOD+tBMz3gwJ3owqQAweQc9Z0DRoZbKTyI="],"ARC-Authentication-Results":["i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=163.com; dkim=pass (1024-bit key;\n unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256\n header.s=s110527 header.b=F8rz2NEs; dkim-atps=neutral;\n spf=pass (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16359-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org","i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=163.com;\n spf=pass smtp.mailfrom=163.com;\n dkim=pass (1024-bit key) header.d=163.com header.i=@163.com\n header.b=F8rz2NEs; arc=none smtp.client-ip=117.135.210.2"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n\ts=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=45\n\tc6wya7N0PUbeskGcHwwrqhFeuHXefamz6GyNQYArQ=; b=F8rz2NEsJ4GrLXqxx3\n\t06QVrnvyywfCS4xk0U7XYAh/80JxTseBEv6xbtaxh50Sd41KH2PAbv+snFkviFLg\n\t9dhjQ7PSJOW7KBhk82YOPJl+1EtHNqEwOHiJ48OLdWHj7pPUNT4sFCGIFP+FVujH\n\tRD5lBzTmVCZgbB4ziJXBBix6o=","From":"Baolin Liu <liubaolin12138@163.com>","To":"tytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tlibaokun@linux.alibaba.com","Cc":"ojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tyi.zhang@huawei.com,\n\tlinux-ext4@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\twangguanyu@vivo.com,\n\tadilger@dilger.ca,\n\tliubaolin12138@163.com,\n\tBaolin Liu <liubaolin@kylinos.cn>","Subject":"[PATCH v4 v4 1/3] ext4: add blocks_allocated to mb_stats output","Date":"Fri,  8 May 2026 17:34:26 +0800","Message-ID":"<20260508093428.5814-2-liubaolin12138@163.com>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20260508093428.5814-1-liubaolin12138@163.com>","References":"<20260508093428.5814-1-liubaolin12138@163.com>","Precedence":"bulk","X-Mailing-List":"linux-ext4@vger.kernel.org","List-Id":"<linux-ext4.vger.kernel.org>","List-Subscribe":"<mailto:linux-ext4+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-ext4+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-CM-TRANSID":"PSgvCgDXeCEprv1pUW9wDg--.60442S3","X-Coremail-Antispam":"1Uf129KBjvdXoWrtr1Utr4xurW8GFykAryxKrg_yoWkGrX_Ka\n\t40yr18ur45Jr4xuF18AFsa9rZ0k3W0vFn8W3sxJrZ3Wa4DW3y8ta98Ar4rXr1xGr42krW5\n\tA3Z3Wry8JryvvjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT\n\t9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sR_QzV7UUUUU==","X-CM-SenderInfo":"xolxutxrol0iasrtmqqrwthudrp/xtbCwR2UX2n9rj07fwAA3U","X-Spam-Status":"No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tFREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY\n\tautolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"},"content":"From: Baolin Liu <liubaolin@kylinos.cn>\n\nAdd blocks_allocated to /proc/fs/ext4/<dev>/mb_stats so that the\nreported statistics match the mballoc summary printed at unmount time.\n\nReviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>\nReviewed-by: Andreas Dilger <adilger@dilger.ca>\nReviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>\nReviewed-by: Zhang Yi <yi.zhang@huawei.com>\nSigned-off-by: Baolin Liu <liubaolin@kylinos.cn>\n---\n fs/ext4/mballoc.c | 2 ++\n 1 file changed, 2 insertions(+)","diff":"diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c\nindex 20e9fdaf4301..1e13ef62cb9d 100644\n--- a/fs/ext4/mballoc.c\n+++ b/fs/ext4/mballoc.c\n@@ -3211,6 +3211,8 @@ int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset)\n \t\t\t\"\\tTo enable, please write \\\"1\\\" to sysfs file mb_stats.\\n\");\n \t\treturn 0;\n \t}\n+\tseq_printf(seq, \"\\tblocks_allocated: %u\\n\",\n+\t\t   atomic_read(&sbi->s_bal_allocated));\n \tseq_printf(seq, \"\\treqs: %u\\n\", atomic_read(&sbi->s_bal_reqs));\n \tseq_printf(seq, \"\\tsuccess: %u\\n\", atomic_read(&sbi->s_bal_success));\n \n","prefixes":["v4","v4","1/3"]}