arc: remove unused l2df_size and l2df_type from l2arc_data_free_t

These fields became unused when ABD was introduced in a6255b7fc.

Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #18093
This commit is contained in:
Ameer Hamza 2026-01-27 23:03:02 +05:00 committed by Brian Behlendorf
parent 6f17052743
commit 00d69b0f72

View File

@ -877,8 +877,6 @@ typedef struct l2arc_read_callback {
typedef struct l2arc_data_free { typedef struct l2arc_data_free {
/* protected by l2arc_free_on_write_mtx */ /* protected by l2arc_free_on_write_mtx */
abd_t *l2df_abd; abd_t *l2df_abd;
size_t l2df_size;
arc_buf_contents_t l2df_type;
l2arc_dev_t *l2df_dev; /* L2ARC device that owns this ABD */ l2arc_dev_t *l2df_dev; /* L2ARC device that owns this ABD */
list_node_t l2df_list_node; list_node_t l2df_list_node;
} l2arc_data_free_t; } l2arc_data_free_t;
@ -2941,14 +2939,11 @@ arc_loan_inuse_buf(arc_buf_t *buf, const void *tag)
} }
static void static void
l2arc_free_abd_on_write(abd_t *abd, size_t size, arc_buf_contents_t type, l2arc_free_abd_on_write(abd_t *abd, l2arc_dev_t *dev)
l2arc_dev_t *dev)
{ {
l2arc_data_free_t *df = kmem_alloc(sizeof (*df), KM_SLEEP); l2arc_data_free_t *df = kmem_alloc(sizeof (*df), KM_SLEEP);
df->l2df_abd = abd; df->l2df_abd = abd;
df->l2df_size = size;
df->l2df_type = type;
df->l2df_dev = dev; df->l2df_dev = dev;
mutex_enter(&l2arc_free_on_write_mtx); mutex_enter(&l2arc_free_on_write_mtx);
list_insert_head(l2arc_free_on_write, df); list_insert_head(l2arc_free_on_write, df);
@ -2984,10 +2979,10 @@ arc_hdr_free_on_write(arc_buf_hdr_t *hdr, boolean_t free_rdata)
ASSERT(HDR_HAS_L2HDR(hdr)); ASSERT(HDR_HAS_L2HDR(hdr));
if (free_rdata) { if (free_rdata) {
l2arc_free_abd_on_write(hdr->b_crypt_hdr.b_rabd, size, type, l2arc_free_abd_on_write(hdr->b_crypt_hdr.b_rabd,
hdr->b_l2hdr.b_dev); hdr->b_l2hdr.b_dev);
} else { } else {
l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd, size, type, l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd,
hdr->b_l2hdr.b_dev); hdr->b_l2hdr.b_dev);
} }
} }
@ -9722,10 +9717,7 @@ skip:
psize == asize) { psize == asize) {
to_write = hdr->b_l1hdr.b_pabd; to_write = hdr->b_l1hdr.b_pabd;
} else { } else {
int ret; int ret = l2arc_apply_transforms(spa, hdr, asize,
arc_buf_contents_t type = arc_buf_type(hdr);
ret = l2arc_apply_transforms(spa, hdr, asize,
&to_write); &to_write);
if (ret != 0) { if (ret != 0) {
arc_hdr_clear_flags(hdr, ARC_FLAG_L2CACHE); arc_hdr_clear_flags(hdr, ARC_FLAG_L2CACHE);
@ -9733,7 +9725,7 @@ skip:
goto next; goto next;
} }
l2arc_free_abd_on_write(to_write, asize, type, dev); l2arc_free_abd_on_write(to_write, dev);
} }
hdr->b_l2hdr.b_dev = dev; hdr->b_l2hdr.b_dev = dev;