* [PATCH] ext4: add a line break for proc mb_groups display @ 2016-02-03 13:19 Huaitong Han 2016-02-03 18:13 ` Darrick J. Wong 2016-02-03 21:12 ` Andreas Dilger 0 siblings, 2 replies; 11+ messages in thread From: Huaitong Han @ 2016-02-03 13:19 UTC (permalink / raw) To: tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel, Huaitong Han This patch adds a line break for proc mb_groups display. Signed-off-by: Huaitong Han <huaitong.han@intel.com> --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 61eaf74..4424b7b 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2285,7 +2285,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) if (group == 0) seq_puts(seq, "#group: free frags first [" " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 " - " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]"); + " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n"); i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + sizeof(struct ext4_group_info); -- 2.4.3 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 13:19 [PATCH] ext4: add a line break for proc mb_groups display Huaitong Han @ 2016-02-03 18:13 ` Darrick J. Wong 2016-02-03 18:30 ` Joe Perches 2016-02-03 21:12 ` Andreas Dilger 1 sibling, 1 reply; 11+ messages in thread From: Darrick J. Wong @ 2016-02-03 18:13 UTC (permalink / raw) To: Huaitong Han; +Cc: tytso, adilger.kernel, linux-ext4, linux-kernel On Wed, Feb 03, 2016 at 09:19:06PM +0800, Huaitong Han wrote: > This patch adds a line break for proc mb_groups display. > > Signed-off-by: Huaitong Han <huaitong.han@intel.com> > --- > fs/ext4/mballoc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > index 61eaf74..4424b7b 100644 > --- a/fs/ext4/mballoc.c > +++ b/fs/ext4/mballoc.c > @@ -2285,7 +2285,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) > if (group == 0) > seq_puts(seq, "#group: free frags first [" > " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 " > - " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]"); > + " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n"); Oh, heh. Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> --D > > i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + > sizeof(struct ext4_group_info); > -- > 2.4.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 18:13 ` Darrick J. Wong @ 2016-02-03 18:30 ` Joe Perches 2016-02-03 19:32 ` Darrick J. Wong 0 siblings, 1 reply; 11+ messages in thread From: Joe Perches @ 2016-02-03 18:30 UTC (permalink / raw) To: Darrick J. Wong, Huaitong Han Cc: tytso, adilger.kernel, linux-ext4, linux-kernel 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? > > > > Signed-off-by: Huaitong Han <huaitong.han@intel.com> > > --- > > fs/ext4/mballoc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > > index 61eaf74..4424b7b 100644 > > --- a/fs/ext4/mballoc.c > > +++ b/fs/ext4/mballoc.c > > @@ -2285,7 +2285,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) > > if (group == 0) > > seq_puts(seq, "#group: free frags first [" > > " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 " > > - " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]"); > > + " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n"); > > Oh, heh. > > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> > > --D > > > > > i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + > > sizeof(struct ext4_group_info); ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 18:30 ` Joe Perches @ 2016-02-03 19:32 ` Darrick J. Wong 2016-02-03 19:38 ` Joe Perches 0 siblings, 1 reply; 11+ messages in thread From: Darrick J. Wong @ 2016-02-03 19:32 UTC (permalink / raw) To: Joe Perches; +Cc: Huaitong Han, tytso, adilger.kernel, linux-ext4, linux-kernel 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. IOW: mb_groups scripts already had to parse multiple lines, and most likely any script parsing it would inject a newline after the header. --D > > > > > > > Signed-off-by: Huaitong Han <huaitong.han@intel.com> > > > --- > > > fs/ext4/mballoc.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > > > index 61eaf74..4424b7b 100644 > > > --- a/fs/ext4/mballoc.c > > > +++ b/fs/ext4/mballoc.c > > > @@ -2285,7 +2285,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) > > > if (group == 0) > > > seq_puts(seq, "#group: free frags first [" > > > " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 " > > > - " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]"); > > > + " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n"); > > > > Oh, heh. > > > > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> > > > > --D > > > > > > > > i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + > > > sizeof(struct ext4_group_info); > > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 19:32 ` Darrick J. Wong @ 2016-02-03 19:38 ` Joe Perches 2016-02-03 20:07 ` Darrick J. Wong 0 siblings, 1 reply; 11+ messages in thread From: Joe Perches @ 2016-02-03 19:38 UTC (permalink / raw) To: Darrick J. Wong Cc: Huaitong Han, tytso, adilger.kernel, linux-ext4, linux-kernel 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. > 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. cheers, Joe ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 19:38 ` Joe Perches @ 2016-02-03 20:07 ` Darrick J. Wong 0 siblings, 0 replies; 11+ messages in thread From: Darrick J. Wong @ 2016-02-03 20:07 UTC (permalink / raw) To: Joe Perches; +Cc: Huaitong Han, tytso, adilger.kernel, linux-ext4, linux-kernel 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. > > 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. :) --D > > cheers, Joe ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display @ 2016-02-03 20:07 ` Darrick J. Wong 0 siblings, 0 replies; 11+ messages in thread From: Darrick J. Wong @ 2016-02-03 20:07 UTC (permalink / raw) To: Joe Perches; +Cc: Huaitong Han, tytso, adilger.kernel, linux-ext4, linux-kernel 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. > > 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. :) --D > > cheers, Joe -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 20:07 ` Darrick J. Wong (?) @ 2016-02-03 21:12 ` Andreas Dilger 2016-02-03 21:17 ` Joe Perches -1 siblings, 1 reply; 11+ messages in thread From: Andreas Dilger @ 2016-02-03 21:12 UTC (permalink / raw) To: Darrick J. Wong Cc: Joe Perches, Huaitong Han, tytso, adilger.kernel, linux-ext4, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2000 bytes --] 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 [-- Attachment #2: Message signed with OpenPGP using GPGMail --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 21:12 ` Andreas Dilger @ 2016-02-03 21:17 ` Joe Perches 0 siblings, 0 replies; 11+ messages in thread From: Joe Perches @ 2016-02-03 21:17 UTC (permalink / raw) To: Andreas Dilger, Darrick J. Wong Cc: Huaitong Han, tytso, adilger.kernel, linux-ext4, linux-kernel On Wed, 2016-02-03 at 14:12 -0700, Andreas Dilger wrote: > 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. Perhaps it also would make sense to add some text to the commit log about this. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 13:19 [PATCH] ext4: add a line break for proc mb_groups display Huaitong Han 2016-02-03 18:13 ` Darrick J. Wong @ 2016-02-03 21:12 ` Andreas Dilger 2016-02-12 6:08 ` Theodore Ts'o 1 sibling, 1 reply; 11+ messages in thread From: Andreas Dilger @ 2016-02-03 21:12 UTC (permalink / raw) To: Huaitong Han; +Cc: tytso, adilger.kernel, linux-ext4, linux-kernel [-- Attachment #1: Type: text/plain, Size: 988 bytes --] > On Feb 3, 2016, at 6:19 AM, Huaitong Han <huaitong.han@intel.com> wrote: > > This patch adds a line break for proc mb_groups display. > > Signed-off-by: Huaitong Han <huaitong.han@intel.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> > --- > fs/ext4/mballoc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > index 61eaf74..4424b7b 100644 > --- a/fs/ext4/mballoc.c > +++ b/fs/ext4/mballoc.c > @@ -2285,7 +2285,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) > if (group == 0) > seq_puts(seq, "#group: free frags first [" > " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 " > - " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]"); > + " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n"); > > i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + > sizeof(struct ext4_group_info); > -- > 2.4.3 > Cheers, Andreas [-- Attachment #2: Message signed with OpenPGP using GPGMail --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ext4: add a line break for proc mb_groups display 2016-02-03 21:12 ` Andreas Dilger @ 2016-02-12 6:08 ` Theodore Ts'o 0 siblings, 0 replies; 11+ messages in thread From: Theodore Ts'o @ 2016-02-12 6:08 UTC (permalink / raw) To: Andreas Dilger; +Cc: Huaitong Han, adilger.kernel, linux-ext4, linux-kernel On Wed, Feb 03, 2016 at 02:12:44PM -0700, Andreas Dilger wrote: > > > On Feb 3, 2016, at 6:19 AM, Huaitong Han <huaitong.han@intel.com> wrote: > > > > This patch adds a line break for proc mb_groups display. > > > > Signed-off-by: Huaitong Han <huaitong.han@intel.com> > > Reviewed-by: Andreas Dilger <adilger@dilger.ca> Thanks, applied. - Ted ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-02-12 6:08 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-02-03 13:19 [PATCH] ext4: add a line break for proc mb_groups display Huaitong Han 2016-02-03 18:13 ` Darrick J. Wong 2016-02-03 18:30 ` Joe Perches 2016-02-03 19:32 ` Darrick J. Wong 2016-02-03 19:38 ` Joe Perches 2016-02-03 20:07 ` Darrick J. Wong 2016-02-03 20:07 ` Darrick J. Wong 2016-02-03 21:12 ` Andreas Dilger 2016-02-03 21:17 ` Joe Perches 2016-02-03 21:12 ` Andreas Dilger 2016-02-12 6:08 ` Theodore Ts'o
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.