{"id":934,"url":"http://patchwork.ozlabs.org/api/1.0/patches/934/?format=json","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/1.0/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},"msgid":"<200809222107.m8ML76xD029671@imap1.linux-foundation.org>","date":"2008-09-22T21:07:06","name":"[for,2.6.27?,1/1] ext4: create /proc/ext4/*/stats et al more carefully","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"4d9bb9f7758d96c3ad852f90692f4168f9f2c0b8","submitter":{"id":107,"url":"http://patchwork.ozlabs.org/api/1.0/people/107/?format=json","name":"Andrew Morton","email":"akpm@linux-foundation.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/200809222107.m8ML76xD029671@imap1.linux-foundation.org/mbox/","series":[],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/934/checks/","tags":{},"headers":{"Return-Path":"<linux-ext4-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Received":["from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 3742ADDEDD\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 23 Sep 2008 07:08:15 +1000 (EST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752342AbYIVVIK (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 17:08:10 -0400","(majordomo@vger.kernel.org) by vger.kernel.org id S1753013AbYIVVIK\n\t(ORCPT <rfc822;linux-ext4-outgoing>);\n\tMon, 22 Sep 2008 17:08:10 -0400","from smtp1.linux-foundation.org ([140.211.169.13]:59448 \"EHLO\n\tsmtp1.linux-foundation.org\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1752342AbYIVVIJ (ORCPT\n\t<rfc822;linux-ext4@vger.kernel.org>);\n\tMon, 22 Sep 2008 17:08:09 -0400","from imap1.linux-foundation.org (imap1.linux-foundation.org\n\t[140.211.169.55])\n\tby smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with\n\tESMTP id m8ML77QO014269\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\n\tMon, 22 Sep 2008 14:07:08 -0700","from localhost.localdomain (localhost [127.0.0.1])\n\tby imap1.linux-foundation.org\n\t(8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id\n\tm8ML76xD029671; Mon, 22 Sep 2008 14:07:06 -0700"],"Message-Id":"<200809222107.m8ML76xD029671@imap1.linux-foundation.org>","Subject":"[patch for 2.6.27? 1/1] ext4: create /proc/ext4/*/stats et al more\n\tcarefully","To":"tytso@mit.edu","Cc":"linux-ext4@vger.kernel.org, akpm@linux-foundation.org,\n\tadobriyan@gmail.com, adilger@sun.com, ralf.hildebrandt@charite.de","From":"akpm@linux-foundation.org","Date":"Mon, 22 Sep 2008 14:07:06 -0700","X-Spam-Status":"No, hits=-3.358 required=5 tests=AWL, BAYES_00,\n\tOSDL_HEADER_SUBJECT_BRACKETED","X-Spam-Checker-Version":"SpamAssassin 3.2.4-osdl_revision__1.47__","X-MIMEDefang-Filter":"lf$Revision: 1.188 $","X-Scanned-By":"MIMEDefang 2.63 on 140.211.169.13","Sender":"linux-ext4-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-ext4.vger.kernel.org>","X-Mailing-List":"linux-ext4@vger.kernel.org"},"content":"From: Alexey Dobriyan <adobriyan@gmail.com>\n\nAddresses http://bugzilla.kernel.org/show_bug.cgi?id=11321\n\next4 creates per-suberblock directory in /proc/ext4/ .  Name used as basis\nis taken from bdevname, which, surprise, can contain slash.\n\nHowever, proc while allowing to use proc_create(\"a/b\", parent) form of\nPDE creation, assumes that parent/a was already created.\n\nbdevname in question is 'cciss/c0d0p9', directory is not created and all\nthis stuff goes directly into /proc (which is real bug).\n\nWarning comes when _second_ partition is mounted.\n\nSigned-off-by: Alexey Dobriyan <adobriyan@gmail.com>\nReported-by: Ralf Hildebrandt <ralf.hildebrandt@charite.de>\nTested-by: Ralf Hildebrandt <ralf.hildebrandt@charite.de>\nCc: Andreas Dilger <adilger@sun.com>\nCc: Theodore Ts'o <tytso@mit.edu>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\n---\n\n fs/ext4/mballoc.c |    9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff -puN fs/ext4/mballoc.c~ext4-fix-11321-create-proc-ext4-stats-et-al-more-carefully fs/ext4/mballoc.c\n--- a/fs/ext4/mballoc.c~ext4-fix-11321-create-proc-ext4-stats-et-al-more-carefully\n+++ a/fs/ext4/mballoc.c\n@@ -2792,6 +2792,15 @@ static int ext4_mb_init_per_dev_proc(str\n \t\treturn -EINVAL;\n \t}\n \tbdevname(sb->s_bdev, devname);\n+\t{\n+\t\tchar *p = devname;\n+\n+\t\twhile (*p != '\\0') {\n+\t\t\tif (*p == '/')\n+\t\t\t\t*p = '!';\n+\t\t\tp++;\n+\t\t}\n+\t}\n \tsbi->s_mb_proc = proc_mkdir(devname, proc_root_ext4);\n \n \tMB_PROC_HANDLER(EXT4_MB_STATS_NAME, stats);\n","prefixes":["for","2.6.27?","1/1"]}