On Thu, Jan 30, 2020 at 02:41:29PM -0600, Eric Sandeen wrote: > On 1/30/20 2:34 PM, Darrick J. Wong wrote: > > On Thu, Jan 30, 2020 at 02:18:52PM -0600, Eric Sandeen wrote: > >> On 1/23/20 6:17 PM, Darrick J. Wong wrote: > >>> From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > >>> > >>> If sb_rootino doesn't point to where we think mkfs should have allocated > >>> the root directory, check to see if the alleged root directory actually > >>> looks like a root directory. If so, we'll let it live because someone > >>> could have changed sunit since formatting time, and that changes the > >>> root directory inode estimate. > >> > >> I forget, is there an fstest for this? > > > > https://lore.kernel.org/linux-xfs/20191218041831.GK12765@magnolia/ > > of course :) :D > ... > > >>> + if (mp->m_sb.sb_rootino != rootino && has_plausible_rootdir(mp)) { > >>> + do_warn( > >>> +_("sb root inode value %" PRIu64 " inconsistent with alignment (expected %"PRIu64")\n"), > >>> + mp->m_sb.sb_rootino, rootino); > >> > >> what would a user do with this warning? Is there any value in emitting it? > >> > >> Otherwise this looks good. > > > > I dunno -- on the one hand, I understand that nobody wants to deal with > > the support calls that will erupt from that message. On the other hand, > > it's an indication that this filesystem isn't /quite/ the way we > > expected it to be, and that would be a helpful hint if you were > > debugging some other weird problem with an xfs filesystem. > > > > What if this were a do_log()? > > how about something that's less indicative of a problem and more informational, > > "sb root inode validated in unaligned location possibly due to sunit change" Sounds good to me. --D > -Eric