[01/10] xfs: Fix xqmstats offsets in /proc/fs/xfs/xqmstat
diff mbox series

Message ID 20190131180919.2500-2-mcgrof@kernel.org
State Superseded
Headers show
Series
  • xfs: stable fixes for v4.19.y
Related show

Commit Message

Luis Chamberlain Jan. 31, 2019, 6:09 p.m. UTC
From: Carlos Maiolino <cmaiolino@redhat.com>

The addition of FIBT, RMAP and REFCOUNT changed the offsets into
__xfssats structure.

This caused xqmstat_proc_show() to display garbage data via
/proc/fs/xfs/xqmstat, once it relies on the offsets marked via macros.

Fix it.

Fixes: 00f4e4f9 xfs: add rmap btree stats infrastructure
Fixes: aafc3c24 xfs: support the XFS_BTNUM_FINOBT free inode btree type
Fixes: 46eeb521 xfs: introduce refcount btree definitions
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 fs/xfs/xfs_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Jan. 31, 2019, 6:19 p.m. UTC | #1
On Thu, Jan 31, 2019 at 10:09:10AM -0800, Luis Chamberlain wrote:
> From: Carlos Maiolino <cmaiolino@redhat.com>
> 
> The addition of FIBT, RMAP and REFCOUNT changed the offsets into
> __xfssats structure.
> 
> This caused xqmstat_proc_show() to display garbage data via
> /proc/fs/xfs/xqmstat, once it relies on the offsets marked via macros.
> 
> Fix it.
> 
> Fixes: 00f4e4f9 xfs: add rmap btree stats infrastructure
> Fixes: aafc3c24 xfs: support the XFS_BTNUM_FINOBT free inode btree type
> Fixes: 46eeb521 xfs: introduce refcount btree definitions
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Dave Chinner <david@fromorbit.com>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---
>  fs/xfs/xfs_stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

You do not list what the upstream git commit ids are on any of these
patches :(

That's a requirement, sorry, can you respin these and add that to the
first line of the commit, as is normally done in the stable patches?

thanks,

greg k-h
Luis Chamberlain Jan. 31, 2019, 6:26 p.m. UTC | #2
On Thu, Jan 31, 2019 at 07:19:03PM +0100, Greg KH wrote:
> On Thu, Jan 31, 2019 at 10:09:10AM -0800, Luis Chamberlain wrote:
> > From: Carlos Maiolino <cmaiolino@redhat.com>
> > 
> > The addition of FIBT, RMAP and REFCOUNT changed the offsets into
> > __xfssats structure.
> > 
> > This caused xqmstat_proc_show() to display garbage data via
> > /proc/fs/xfs/xqmstat, once it relies on the offsets marked via macros.
> > 
> > Fix it.
> > 
> > Fixes: 00f4e4f9 xfs: add rmap btree stats infrastructure
> > Fixes: aafc3c24 xfs: support the XFS_BTNUM_FINOBT free inode btree type
> > Fixes: 46eeb521 xfs: introduce refcount btree definitions
> > Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> > Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> > Signed-off-by: Dave Chinner <david@fromorbit.com>
> > Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> > ---
> >  fs/xfs/xfs_stats.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> You do not list what the upstream git commit ids are on any of these
> patches :(
> 
> That's a requirement, sorry, can you respin these and add that to the
> first line of the commit, as is normally done in the stable patches?

Sure thing, sorry forgot about that. Will wait for review on the set
first, and if there are no complaints will send a v2 as required.

  Luis

Patch
diff mbox series

diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c
index 4e4423153071..740ac9674848 100644
--- a/fs/xfs/xfs_stats.c
+++ b/fs/xfs/xfs_stats.c
@@ -119,7 +119,7 @@  static int xqmstat_proc_show(struct seq_file *m, void *v)
 	int j;
 
 	seq_printf(m, "qm");
-	for (j = XFSSTAT_END_IBT_V2; j < XFSSTAT_END_XQMSTAT; j++)
+	for (j = XFSSTAT_END_REFCOUNT; j < XFSSTAT_END_XQMSTAT; j++)
 		seq_printf(m, " %u", counter_val(xfsstats.xs_stats, j));
 	seq_putc(m, '\n');
 	return 0;