Re: [PATCH 5/6] xfs: write the rg superblock when fixing it
"Darrick J. Wong" <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs,org.kernel.vger.stable |
|---|---|
| Message-ID | <20260714175919.GG7398@frogsfrogsfrogs> |
On Tue, Jul 14, 2026 at 07:20:11AM +0200, Christoph Hellwig wrote: > On Mon, Jul 13, 2026 at 02:58:57PM -0700, Darrick J. Wong wrote: > > Hrmm. Right now both superblock scrubbers don't do much for group 0, > > because both buffers are pinned to the xfs_mount, so they assume that > > there's no need to check anything. However, the ondisk super could have > > gotten corrupted (or blown away by fdisk), in which case an immediate > > crash could render the filesystem unmountable. > > > > So, I could (a) teach the super scrubbers to read the primary / rt > > super; and (b) teach them both to log the superblock and bwrite it > > immediately to shorten the window in which this could happen. > > > > What do you think? > > I guess the only sensible time to scrub the sb would be early during > mount? mount already does that, and rejects the filesystem. The fresh reread here would only save your filesystem if you happened to do something dumb while mounted like "ls > /dev/sdb1" and overwrote the ondisk supers without whacking too much of the existing filesystem. > > Also, this patch should be calling xfs_log_sb *after* xfs_trans_getsb, > > so I'll fix that for the repost. > > Oops. Oh good, for-next got the updated version. --D