Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xfs: error out when a superblock buffer update reduces the agcount

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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>

authored by

Christoph Hellwig and committed by
Carlos Maiolino
b882b0f8 6a18765b

+5
+5
fs/xfs/xfs_buf_item_recover.c
··· 713 713 */ 714 714 xfs_sb_from_disk(&mp->m_sb, dsb); 715 715 716 + if (mp->m_sb.sb_agcount < orig_agcount) { 717 + xfs_alert(mp, "Shrinking AG count in log recovery not supported"); 718 + return -EFSCORRUPTED; 719 + } 720 + 716 721 /* 717 722 * Initialize the new perags, and also update various block and inode 718 723 * allocator setting based off the number of AGs or total blocks.