diff mbox

[4/5] xfs_repair: zero shared_vn

Message ID 148494394162.5256.166843220095123974.stgit@birch.djwong.org (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Darrick J. Wong Jan. 20, 2017, 8:25 p.m. UTC
Since shared_vn always has to be zero, zero it at the end of repair.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 repair/xfs_repair.c |    3 +++
 1 file changed, 3 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Eric Sandeen Jan. 20, 2017, 10:20 p.m. UTC | #1
On 1/20/17 2:25 PM, Darrick J. Wong wrote:
> Since shared_vn always has to be zero, zero it at the end of repair.

If it's not, shouldn't it be properly warned, fixed, exit-code
set, etc?

-Eric
 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  repair/xfs_repair.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> 
> diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
> index 622d569..ecfa6b4 100644
> --- a/repair/xfs_repair.c
> +++ b/repair/xfs_repair.c
> @@ -1050,6 +1050,9 @@ _("Note - stripe unit (%d) and width (%d) were copied from a backup superblock.\
>  			be32_to_cpu(dsb->sb_unit), be32_to_cpu(dsb->sb_width));
>  	}
>  
> +	/* shared_vn is always zero. */
> +	dsb->sb_shared_vn = 0;
> +
>  	libxfs_writebuf(sbp, 0);
>  
>  	/*
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Darrick J. Wong Jan. 20, 2017, 10:51 p.m. UTC | #2
On Fri, Jan 20, 2017 at 04:20:27PM -0600, Eric Sandeen wrote:
> On 1/20/17 2:25 PM, Darrick J. Wong wrote:
> > Since shared_vn always has to be zero, zero it at the end of repair.
> 
> If it's not, shouldn't it be properly warned, fixed, exit-code
> set, etc?

Yeah, you're right, that's what we have phase 1 for.

--D

> 
> -Eric
>  
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  repair/xfs_repair.c |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > 
> > diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
> > index 622d569..ecfa6b4 100644
> > --- a/repair/xfs_repair.c
> > +++ b/repair/xfs_repair.c
> > @@ -1050,6 +1050,9 @@ _("Note - stripe unit (%d) and width (%d) were copied from a backup superblock.\
> >  			be32_to_cpu(dsb->sb_unit), be32_to_cpu(dsb->sb_width));
> >  	}
> >  
> > +	/* shared_vn is always zero. */
> > +	dsb->sb_shared_vn = 0;
> > +
> >  	libxfs_writebuf(sbp, 0);
> >  
> >  	/*
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index 622d569..ecfa6b4 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -1050,6 +1050,9 @@  _("Note - stripe unit (%d) and width (%d) were copied from a backup superblock.\
 			be32_to_cpu(dsb->sb_unit), be32_to_cpu(dsb->sb_width));
 	}
 
+	/* shared_vn is always zero. */
+	dsb->sb_shared_vn = 0;
+
 	libxfs_writebuf(sbp, 0);
 
 	/*