Re: [RFC PATCH v2 0/4] make jbd2 debug switch per device

Theodore Ts'o
2021-01-27T16:22:30Z

On Tue, Jan 26, 2021 at 08:50:02AM +0800, brookxu wrote:
>
> trace point, eBPF and other hook technologies are better for production
> environments. But for pure debugging work, adding hook points feels a bit
> heavy. However, your suggestion is very valuable, thank you very much.

What feels heavy? The act of adding a new jbd_debug() statement to
the sources, versus adding a new tracepoint? Or how to enable a set
of tracepoints versus setting a jbd_debug level (either globally, or
per mount point)? Or something else?

If it's the latter (which is what I think it is), how often are you
needing to add a new jbd_debug() statement *and* needing to run in a
test environment where you have multiple disks? How often is it
useful to have multiple disks when doing your debugging?

I'm trying to understand why this has been useful to you, since that
generally doesn't match with my development, testing, or debugging
experience. In general I try to test with one file system at a time,
since I'm trying to find something reproducible. Do you have cases
where you need multiple file systems in your test environment in order
to do your testing? Why is that? Is it because you're trying to use
your production server code as your test reproducers? And if so, I
would have thought adding the jbd_debug() statements and sending lots
of console print messages would distort the timing enough to make it
hard to reproduce a problem in found in your production environment.

It sounds like you have a very different set of test practices than
what I'm used to, and I'm trying to understand it better.

Cheers,

- Ted