Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325956

Re: [PATCH] ext4: add a line break for proc mb_groups display

From Andreas Dilger <adilger@dilger.ca>
Newsgroups linux.kernel
Subject Re: [PATCH] ext4: add a line break for proc mb_groups display
Date 2016-02-03 22:20 +0100
Message-ID <qYd0e-7f0-15@gated-at.bofh.it> (permalink)
References (1 earlier) <qYac2-5uj-35@gated-at.bofh.it> <qYavo-5AG-13@gated-at.bofh.it> <qYbrs-6bI-11@gated-at.bofh.it> <qYbrs-6bI-17@gated-at.bofh.it> <qYc4b-6E7-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Feb 3, 2016, at 1:07 PM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> 
> On Wed, Feb 03, 2016 at 11:38:33AM -0800, Joe Perches wrote:
>> On Wed, 2016-02-03 at 11:32 -0800, Darrick J. Wong wrote:
>>> On Wed, Feb 03, 2016 at 10:30:32AM -0800, Joe Perches wrote:
>>>> On Wed, 2016-02-03 at 10:13 -0800, Darrick J. Wong wrote:
>>>>> On Wed, Feb 03, 2016 at 09:19:06PM +0800, Huaitong Han wrote:
>>>>>> This patch adds a line break for proc mb_groups display.
>>>> 
>>>> Using 2 lines for output might break any existing users.
>>>> 
>>>> Are there any?
>>> 
>>> It's a multiline file if you have more than one blockgroup; this just makes it
>>> so that you don't have to special-case BG 0.
>> 
>> And existing scripts might do that now and might fail
>> to do properly after this change.
> 
> Or they might have sed -e 's/]#0/]\n#0/g' in which case they won't be affected.

I suspect that any scripts which handled this in the past probably didn't
even notice and just missed the bg=0 line at the end of the header.  Users
looking at the output probably saw it line-wrapped by the terminal and
didn't notice either.

>>> IOW: mb_groups scripts already had to parse multiple lines, and most likely any
>>> script parsing it would inject a newline after the header.
>> 
>> I've no dog in this fight really.  I just wanted to make
>> it clear that this could cause existing scripts to fail.
>> 
>> proc output is supposed to be unchanging except maybe
>> adding new fields to existing lines.
>> 
>> Your choice.
> 
> Ted's, really.  I have no idea which scripts do with various per-fs /proc
> files.  Usually poking in mb_groups is only done as part of failure report data
> collection to see what's mucked up the fs this time.
> 
> Anyway, I'll defer to the maintainer. :)

I think it makes sense to accept the patch, since I doubt any scripts will be broken, and it is the "right thing to do" rather than perpetuate a bug.

Cheers, Andreas





Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ext4: add a line break for proc mb_groups display Huaitong Han <huaitong.han@intel.com> - 2016-02-03 14:20 +0100
  Re: [PATCH] ext4: add a line break for proc mb_groups display "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-02-03 19:20 +0100
    Re: [PATCH] ext4: add a line break for proc mb_groups display Joe Perches <joe@perches.com> - 2016-02-03 19:40 +0100
      Re: [PATCH] ext4: add a line break for proc mb_groups display "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-02-03 20:40 +0100
        Re: [PATCH] ext4: add a line break for proc mb_groups display Joe Perches <joe@perches.com> - 2016-02-03 20:40 +0100
          Re: [PATCH] ext4: add a line break for proc mb_groups display "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-02-03 21:20 +0100
            Re: [PATCH] ext4: add a line break for proc mb_groups display Andreas Dilger <adilger@dilger.ca> - 2016-02-03 22:20 +0100
              Re: [PATCH] ext4: add a line break for proc mb_groups display Joe Perches <joe@perches.com> - 2016-02-03 22:20 +0100
  Re: [PATCH] ext4: add a line break for proc mb_groups display Andreas Dilger <adilger@dilger.ca> - 2016-02-03 22:20 +0100

csiph-web