mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	zfs_log_write: only put the callback on the last itx
If a write is split across mutliple itxs, we only want the callback on the last one, otherwise it will be called for every itx associated with this single write, which makes it very hard to know what to clean up. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Mark Johnston <markj@FreeBSD.org> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17445
This commit is contained in:
		
							parent
							
								
									d1c88cbd4c
								
							
						
					
					
						commit
						aa964ce61b
					
				| @ -694,8 +694,11 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, | ||||
| 		itx->itx_sync = (zp->z_sync_cnt != 0); | ||||
| 		itx->itx_gen = gen; | ||||
| 
 | ||||
| 		itx->itx_callback = callback; | ||||
| 		itx->itx_callback_data = callback_data; | ||||
| 		if (resid == len) { | ||||
| 			itx->itx_callback = callback; | ||||
| 			itx->itx_callback_data = callback_data; | ||||
| 		} | ||||
| 
 | ||||
| 		zil_itx_assign(zilog, itx, tx); | ||||
| 
 | ||||
| 		off += len; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rob Norris
						Rob Norris