Message ID | 20240930164211.2357358-5-hch@lst.de (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [1/7] xfs: pass the exact range to initialize to xfs_initialize_perag | expand |
On Mon, Sep 30, 2024 at 06:41:45PM +0200, Christoph Hellwig wrote: > XFS currently does not support reducing the agcount, so error out if > a logged sb buffer tries to shrink the agcount. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks good, Reviewed-by: Darrick J. Wong <djwong@kernel.org> /me notes that cem is the release manager now, not chandan. Patches should go to him. /me updates his scripts --D > --- > fs/xfs/xfs_log_recover.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c > index 03701409c7dcd6..3b5cd240bb62ef 100644 > --- a/fs/xfs/xfs_log_recover.c > +++ b/fs/xfs/xfs_log_recover.c > @@ -3343,6 +3343,10 @@ xlog_recover_update_agcount( > int error; > > xfs_sb_from_disk(&mp->m_sb, dsb); > + if (mp->m_sb.sb_agcount < old_agcount) { > + xfs_alert(mp, "Shrinking AG count in log recovery"); > + return -EFSCORRUPTED; > + } > error = xfs_initialize_perag(mp, old_agcount, mp->m_sb.sb_agcount, > mp->m_sb.sb_dblocks, &mp->m_maxagi); > if (error) { > -- > 2.45.2 > >
On Mon, Sep 30, 2024 at 09:51:16AM -0700, Darrick J. Wong wrote: > On Mon, Sep 30, 2024 at 06:41:45PM +0200, Christoph Hellwig wrote: > > XFS currently does not support reducing the agcount, so error out if > > a logged sb buffer tries to shrink the agcount. > > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > Looks good, > Reviewed-by: Darrick J. Wong <djwong@kernel.org> > > /me notes that cem is the release manager now, not chandan. Patches > should go to him. > > /me updates his scripts Yeah, it'll be a while until all old cover letters are updated :)
On Mon, Sep 30, 2024 at 06:41:45PM +0200, Christoph Hellwig wrote: > XFS currently does not support reducing the agcount, so error out if > a logged sb buffer tries to shrink the agcount. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/xfs_log_recover.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c > index 03701409c7dcd6..3b5cd240bb62ef 100644 > --- a/fs/xfs/xfs_log_recover.c > +++ b/fs/xfs/xfs_log_recover.c > @@ -3343,6 +3343,10 @@ xlog_recover_update_agcount( > int error; > > xfs_sb_from_disk(&mp->m_sb, dsb); > + if (mp->m_sb.sb_agcount < old_agcount) { > + xfs_alert(mp, "Shrinking AG count in log recovery"); > + return -EFSCORRUPTED; > + } > error = xfs_initialize_perag(mp, old_agcount, mp->m_sb.sb_agcount, > mp->m_sb.sb_dblocks, &mp->m_maxagi); > if (error) { > -- > 2.45.2 > >
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 03701409c7dcd6..3b5cd240bb62ef 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3343,6 +3343,10 @@ xlog_recover_update_agcount( int error; xfs_sb_from_disk(&mp->m_sb, dsb); + if (mp->m_sb.sb_agcount < old_agcount) { + xfs_alert(mp, "Shrinking AG count in log recovery"); + return -EFSCORRUPTED; + } error = xfs_initialize_perag(mp, old_agcount, mp->m_sb.sb_agcount, mp->m_sb.sb_dblocks, &mp->m_maxagi); if (error) {
XFS currently does not support reducing the agcount, so error out if a logged sb buffer tries to shrink the agcount. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_log_recover.c | 4 ++++ 1 file changed, 4 insertions(+)