diff options
author | Rob Norris <[email protected]> | 2024-06-07 18:00:31 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-08-21 13:36:24 -0700 |
commit | b3f4e4e1ec930be85ebdf3c7d23f0be23800491c (patch) | |
tree | 3fda984f133844808d4d16b482d3b9081de775ce | |
parent | bbe8512a93b0078c43fb5aa6f265059376647bc7 (diff) |
abd: remove ABD_FLAG_ZEROS
Nothing ever checks it.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16253
-rw-r--r-- | include/sys/abd.h | 3 | ||||
-rw-r--r-- | module/os/freebsd/zfs/abd_os.c | 2 | ||||
-rw-r--r-- | module/os/linux/zfs/abd_os.c | 2 | ||||
-rw-r--r-- | module/zfs/abd.c | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/include/sys/abd.h b/include/sys/abd.h index 7b7d84b52..daa247e0c 100644 --- a/include/sys/abd.h +++ b/include/sys/abd.h @@ -44,8 +44,7 @@ typedef enum abd_flags { ABD_FLAG_LINEAR_PAGE = 1 << 5, /* linear but allocd from page */ ABD_FLAG_GANG = 1 << 6, /* mult ABDs chained together */ ABD_FLAG_GANG_FREE = 1 << 7, /* gang ABD is responsible for mem */ - ABD_FLAG_ZEROS = 1 << 8, /* ABD for zero-filled buffer */ - ABD_FLAG_ALLOCD = 1 << 9, /* we allocated the abd_t */ + ABD_FLAG_ALLOCD = 1 << 8, /* we allocated the abd_t */ } abd_flags_t; typedef struct abd { diff --git a/module/os/freebsd/zfs/abd_os.c b/module/os/freebsd/zfs/abd_os.c index fb5c46ecf..ce8c30025 100644 --- a/module/os/freebsd/zfs/abd_os.c +++ b/module/os/freebsd/zfs/abd_os.c @@ -250,7 +250,7 @@ abd_alloc_zero_scatter(void) n = abd_chunkcnt_for_bytes(SPA_MAXBLOCKSIZE); abd_zero_scatter = abd_alloc_struct(SPA_MAXBLOCKSIZE); - abd_zero_scatter->abd_flags |= ABD_FLAG_OWNER | ABD_FLAG_ZEROS; + abd_zero_scatter->abd_flags |= ABD_FLAG_OWNER; abd_zero_scatter->abd_size = SPA_MAXBLOCKSIZE; ABD_SCATTER(abd_zero_scatter).abd_offset = 0; diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c index f7af20c61..c4cc2ce01 100644 --- a/module/os/linux/zfs/abd_os.c +++ b/module/os/linux/zfs/abd_os.c @@ -509,7 +509,7 @@ abd_alloc_zero_scatter(void) ABD_SCATTER(abd_zero_scatter).abd_sgl = table.sgl; ABD_SCATTER(abd_zero_scatter).abd_nents = nr_pages; abd_zero_scatter->abd_size = SPA_MAXBLOCKSIZE; - abd_zero_scatter->abd_flags |= ABD_FLAG_MULTI_CHUNK | ABD_FLAG_ZEROS; + abd_zero_scatter->abd_flags |= ABD_FLAG_MULTI_CHUNK; abd_for_each_sg(abd_zero_scatter, sg, nr_pages, i) { sg_set_page(sg, abd_zero_page, PAGESIZE, 0); diff --git a/module/zfs/abd.c b/module/zfs/abd.c index 94f492522..f1df6082f 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -113,7 +113,7 @@ abd_verify(abd_t *abd) ASSERT3U(abd->abd_flags, ==, abd->abd_flags & (ABD_FLAG_LINEAR | ABD_FLAG_OWNER | ABD_FLAG_META | ABD_FLAG_MULTI_ZONE | ABD_FLAG_MULTI_CHUNK | ABD_FLAG_LINEAR_PAGE | ABD_FLAG_GANG | - ABD_FLAG_GANG_FREE | ABD_FLAG_ZEROS | ABD_FLAG_ALLOCD)); + ABD_FLAG_GANG_FREE | ABD_FLAG_ALLOCD)); IMPLY(abd->abd_parent != NULL, !(abd->abd_flags & ABD_FLAG_OWNER)); IMPLY(abd->abd_flags & ABD_FLAG_META, abd->abd_flags & ABD_FLAG_OWNER); if (abd_is_linear(abd)) { |