@lundman Yes, `l2arc_write_buffers()` is definitely mismerged. The reason ZoL doesn't have that chunk of code is because the encryption commit removed it, and we need to remove it here too. The way you have it now, there are two different ways of setting `to_write`, with the old way happening later, so the new way is ignored. In this case, we have a arc_buf_hdr_t with b_pabd==NULL, which is why we have a NULL io_abd. We should be using `b_rabd` which the new code would do.
The ZoL encryption commit removes the old way of computing `to_write`, so we should do the same here. https://github.com/zfsonlinux/zfs/pull/5769/files#diff-163982413ed6b6861e08633c89a77395 i.e. remove lines 8186 - 8212 (the comment beginning `Normally the L2ARC can use the hdr's data, but if` until just before the call to `zio_write_phys`). ``` > ffffff03e497c630::print zio_t io_private | ::print arc_buf_hdr_t { b_dva = { dva_word = [ 0x160, 0xc84a9370 ] } b_birth = 0x1e62e0 b_type = 1 (ARC_BUFC_DATA) b_hash_next = 0 b_flags = 0x20e4850 (ARC_FLAG_{L2CACHE|IN_HASH_TABLE|L2_WRITING|PROTECTED|HAS_L1HDR|HAS_L2HDR|COMPRESSED_ARC|COMPRESS_1}) b_psize = 0x100 b_lsize = 0x100 b_spa = 0xd599288c169212f8 b_l2hdr = { b_dev = 0xffffff03dff2c3b8 b_daddr = 0x3b50000 b_l2node = { list_next = 0xffffff03fbb84d28 list_prev = 0xffffff0426a95070 } } b_l1hdr = { b_freeze_lock = { _opaque = [ 0 ] } b_freeze_cksum = 0 b_buf = 0 b_bufcnt = 0 b_cv = { _opaque = 0 } b_byteswap = 0xa b_state = ARC_mru b_arc_node = { list_next = 0xffffff0426a950a8 list_prev = 0xffffff041eb4a570 } b_arc_access = 0x36aba b_refcnt = { rc_count = 0 } b_acb = 0 b_pabd = 0 <====================== } b_crypt_hdr = { b_rabd = 0xffffff041f49ea00 <===================== b_ot = 0t19 (DMU_OT_PLAIN_FILE_CONTENTS) b_ebufcnt = 0 b_dsobj = 0x3010 ... } ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/489#issuecomment-367523175 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/T91797982fdd5b7d9-M8e7d88c05ac654cc96c32d21 Powered by Topicbox: https://topicbox.com