Skip to content

Commit 00d69b0

Browse files
ixhamzabehlendorf
authored andcommitted
arc: remove unused l2df_size and l2df_type from l2arc_data_free_t
These fields became unused when ABD was introduced in a6255b7. 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
1 parent 6f17052 commit 00d69b0

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

module/zfs/arc.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,6 @@ typedef struct l2arc_read_callback {
877877
typedef struct l2arc_data_free {
878878
/* protected by l2arc_free_on_write_mtx */
879879
abd_t *l2df_abd;
880-
size_t l2df_size;
881-
arc_buf_contents_t l2df_type;
882880
l2arc_dev_t *l2df_dev; /* L2ARC device that owns this ABD */
883881
list_node_t l2df_list_node;
884882
} l2arc_data_free_t;
@@ -2941,14 +2939,11 @@ arc_loan_inuse_buf(arc_buf_t *buf, const void *tag)
29412939
}
29422940

29432941
static void
2944-
l2arc_free_abd_on_write(abd_t *abd, size_t size, arc_buf_contents_t type,
2945-
l2arc_dev_t *dev)
2942+
l2arc_free_abd_on_write(abd_t *abd, l2arc_dev_t *dev)
29462943
{
29472944
l2arc_data_free_t *df = kmem_alloc(sizeof (*df), KM_SLEEP);
29482945

29492946
df->l2df_abd = abd;
2950-
df->l2df_size = size;
2951-
df->l2df_type = type;
29522947
df->l2df_dev = dev;
29532948
mutex_enter(&l2arc_free_on_write_mtx);
29542949
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)
29842979
ASSERT(HDR_HAS_L2HDR(hdr));
29852980

29862981
if (free_rdata) {
2987-
l2arc_free_abd_on_write(hdr->b_crypt_hdr.b_rabd, size, type,
2982+
l2arc_free_abd_on_write(hdr->b_crypt_hdr.b_rabd,
29882983
hdr->b_l2hdr.b_dev);
29892984
} else {
2990-
l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd, size, type,
2985+
l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd,
29912986
hdr->b_l2hdr.b_dev);
29922987
}
29932988
}
@@ -9722,18 +9717,15 @@ l2arc_write_sublist(spa_t *spa, l2arc_dev_t *dev, int pass, int sublist_idx,
97229717
psize == asize) {
97239718
to_write = hdr->b_l1hdr.b_pabd;
97249719
} else {
9725-
int ret;
9726-
arc_buf_contents_t type = arc_buf_type(hdr);
9727-
9728-
ret = l2arc_apply_transforms(spa, hdr, asize,
9720+
int ret = l2arc_apply_transforms(spa, hdr, asize,
97299721
&to_write);
97309722
if (ret != 0) {
97319723
arc_hdr_clear_flags(hdr, ARC_FLAG_L2CACHE);
97329724
mutex_exit(hash_lock);
97339725
goto next;
97349726
}
97359727

9736-
l2arc_free_abd_on_write(to_write, asize, type, dev);
9728+
l2arc_free_abd_on_write(to_write, dev);
97379729
}
97389730

97399731
hdr->b_l2hdr.b_dev = dev;

0 commit comments

Comments
 (0)