On Mon, Aug 31, 2020 at 01:40:33PM -0700, Darrick J. Wong wrote: [fullquote deleted..] > > + error = _xfs_buf_read(bp, XBF_READ, &xfs_sb_buf_ops); > > Question: xfs_getsb() returns mp->m_sb_bp. The only place we set that > variable is in xfs_readsb immediately after setting b_ops by hand. Is > there some circumstance where at the end of log recovery, m_sb_bp is set > to a buffer but that buffer's ops are not set to xfs_sb_buf_ops? > > In other words, do we have to do all this surgery on _xfs_buf_read to > set the ops? If they're not set (or worse, set to something else) at > this point then there's probably something seriously wrong... > > ...possibly my understanding of this buffer. ;) No, I think your understanding is right. I've thrown in two more cleanup patches that helped me following how m_sb_bp is used, and simplified this one to not need to explicitly passed ops. Testing now..