Add warning for external consumers of dmu_tx_callback_register
commitae93aeb84941760d3fcc14d55fb246e57b97fee2
authorSerapheim Dimitropoulos <serapheimd@gmail.com>
Thu, 31 Oct 2024 00:11:40 +0000 (30 17:11 -0700)
committerGitHub <noreply@github.com>
Thu, 31 Oct 2024 00:11:40 +0000 (30 20:11 -0400)
treee2d06bcb0c13eefa174ed22989d708042895c9e3
parent6187b194349c5a728c9df8c6842f1866d5c9782a
Add warning for external consumers of dmu_tx_callback_register

While reading some code @grwilson came across the above function that
seemingly had no consumers besides a ztest callback that ensures that
the tx_callback infrastructure works correctly. It turns out that Lustre
is the main (and potentially the only) consumer of this. Refer to
`osd_trans_commit_cb` of `lustre/osd-zfs/osd_handler.c` in the Lustre
repo for more info. Let's add a comment highlighting this before someone
removes it by mistake.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Serapheim Dimitropoulos <serapheimd@gmail.com>
Closes #16698
module/zfs/dmu_tx.c