Page MenuHomeFreeBSD

ext2fs: Dtrace support.
ClosedPublic

Authored by fsu on Apr 8 2019, 5:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 7:13 AM
Unknown Object (File)
Mon, Nov 4, 10:48 AM
Unknown Object (File)
Wed, Oct 30, 6:49 PM
Unknown Object (File)
Wed, Oct 23, 11:54 PM
Unknown Object (File)
Oct 20 2024, 9:12 PM
Unknown Object (File)
Oct 20 2024, 9:12 PM
Unknown Object (File)
Oct 20 2024, 9:12 PM
Unknown Object (File)
Oct 18 2024, 10:47 AM
Subscribers

Details

Summary

Which logs were replaced by dtrace-probes:

  1. Misc printf's under DEBUG macro in the blocks allocation path.
  2. Different on-disk structures validation errors, now the filesystem will silently return EIO's.
  3. Misc checksum errors, same as above.

The only debug macro, which was leaved is EXT2FS_PRINT_EXTENTS.
It is impossible to replace it by dtrace-probes, because the additional logic is required to walk thru file extents.

The user still be able to see mount errors in the dmesg in case of:

  1. Filesystem features incompatibility.
  2. Superblock checksum error.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

fsu retitled this revision from ext2fs: Drace support. to ext2fs: Dtrace support..Apr 8 2019, 5:20 PM

Very cool (but I am biased since I suggested the fusefs-dtrace changes as a starting point)!

Add as reviewers more objective DTrace experts and Kirk FYI as UFS is likely to follow in a near future :).

sys/fs/ext2fs/ext2_alloc.c
66 ↗(On Diff #55951)

I see these ", ," a lot. Is the empty parameter fine or perhaps we should have some form of NULL there?

sys/fs/ext2fs/ext2_alloc.c
66 ↗(On Diff #55951)

Nope, we should not. The argument could be empty.
See SDT_PROBE_DEFINE2 definition in the sdt.h.
BTW, this naming with 'trace' was borrowed from fusefs.

I still hope to hear from the DTrace experts, but I like this very much. Thanks!

This revision is now accepted and ready to land.Apr 10 2019, 4:06 PM
In D19848#426730, @pfg wrote:

I still hope to hear from the DTrace experts, but I like this very much. Thanks!

Ok, let's wait some time before landing.

Some general comments.

  1. Can you move all the DEFINE statements to the top of the file rather than interspresing them throughout? I know you're defining them near use but the general way we have coded these is to put the DECLARES and DEFINES at the top of the files.
  1. The name "trace" is going to be a bit confusing to users as they already think they're tracing the system. You could drop the "trace" altogether and see if that makes sense.

Otherwise this looks like a great addition, and thank you for doing it.

In D19848#426959, @gnn wrote:

Some general comments.

  1. Can you move all the DEFINE statements to the top of the file rather than interspresing them throughout? I know you're defining them near use but the general way we have coded these is to put the DECLARES and DEFINES at the top of the files.

Ok, I will add this change before landing.

  1. The name "trace" is going to be a bit confusing to users as they already think they're tracing the system. You could drop the "trace" altogether and see if that makes sense.

I prefer to leave it as is to keep consistency with fusefs dtrace probes naming. See: https://reviews.freebsd.org/D19667

Otherwise this looks like a great addition, and thank you for doing it.

OK, I'm happy to work out this "trace" thing later.

Please commit.

This revision was automatically updated to reflect the committed changes.