linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about 67dc288c ("xfs: ensure verifiers are attached to recovered buffers")
@ 2017-10-13 18:49 Darrick J. Wong
  2017-10-14 11:55 ` Brian Foster
  0 siblings, 1 reply; 15+ messages in thread
From: Darrick J. Wong @ 2017-10-13 18:49 UTC (permalink / raw)
  To: xfs; +Cc: Dave Chinner

Hi all,

I have a question about 67dc288c ("xfs: ensure verifiers are attached to
recovered buffers").  I was analyzing a scrub failure on generic/392
with a v4 filesystem which stems from xfs_scrub_buffer_recheck (it's in
scrub part 4) being unable to find a b_ops attached to the AGF buffer
and signalling error.

The pattern I observe is that when log recovery runs on a v4 filesystem,
we call some variant of xfs_buf_read with a NULL ops parameter.  The
buffer therefore gets created and read without any verifiers.
Eventually, xlog_recover_validate_buf_type gets called, and on a v5
filesystem we come back and attach verifiers and all is well.  However,
on a v4 filesystem the function returns without doing anything, so the
xfs_buf just sits around in memory with no verifier.  Subsequent
read/log/relse patterns can write anything they want without write
verifiers to check that.

If the v4 fs didn't need log recovery, the buffers get created with
b_ops as you'd expect.

My question is, shouldn't xlog_recover_validate_buf_type unconditionally
set b_ops and save the "if (hascrc)" bits for the part that ensures the
LSN is up to date?

It seems like a bad idea to let buffers sit around with no verifier.
The original patch adding this function is d75afeb3 ("xfs: add buffer
types to directory and attribute buffers") and looks like it was
supposed to do this for any filesystem, but I wasn't around to know the
evolution of that part of xlog.

--D

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-10-23 13:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13 18:49 Question about 67dc288c ("xfs: ensure verifiers are attached to recovered buffers") Darrick J. Wong
2017-10-14 11:55 ` Brian Foster
2017-10-14 19:05   ` Darrick J. Wong
2017-10-16 10:37     ` Brian Foster
2017-10-16 21:29     ` Dave Chinner
2017-10-16 22:18       ` Darrick J. Wong
2017-10-17 14:53         ` Brian Foster
2017-10-20 15:16         ` Brian Foster
2017-10-20 16:44           ` Darrick J. Wong
2017-10-20 16:59             ` Brian Foster
2017-10-20 18:00               ` Darrick J. Wong
2017-10-21  6:10                 ` Darrick J. Wong
2017-10-23 13:08                   ` Brian Foster
2017-10-14 22:07   ` Dave Chinner
2017-10-16 10:38     ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).