mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									bbc0d34bfd
								
							
						
					
					
						commit
						8ac70aade7
					
				| @ -1377,6 +1377,13 @@ dmu_tx_pool(dmu_tx_t *tx) | ||||
| 	return (tx->tx_pool); | ||||
| } | ||||
| 
 | ||||
| /*
 | ||||
|  * Register a callback to be executed at the end of a TXG. | ||||
|  * | ||||
|  * Note: This currently exists for outside consumers, specifically the ZFS OSD | ||||
|  * for Lustre. Please do not remove before checking that project. For examples | ||||
|  * on how to use this see `ztest_commit_callback`. | ||||
|  */ | ||||
| void | ||||
| dmu_tx_callback_register(dmu_tx_t *tx, dmu_tx_callback_func_t *func, void *data) | ||||
| { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Serapheim Dimitropoulos
						Serapheim Dimitropoulos