Skip to content

Commit b3f4e4e

Browse files
robnbehlendorf
authored andcommitted
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
1 parent bbe8512 commit b3f4e4e

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

include/sys/abd.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ typedef enum abd_flags {
4444
ABD_FLAG_LINEAR_PAGE = 1 << 5, /* linear but allocd from page */
4545
ABD_FLAG_GANG = 1 << 6, /* mult ABDs chained together */
4646
ABD_FLAG_GANG_FREE = 1 << 7, /* gang ABD is responsible for mem */
47-
ABD_FLAG_ZEROS = 1 << 8, /* ABD for zero-filled buffer */
48-
ABD_FLAG_ALLOCD = 1 << 9, /* we allocated the abd_t */
47+
ABD_FLAG_ALLOCD = 1 << 8, /* we allocated the abd_t */
4948
} abd_flags_t;
5049

5150
typedef struct abd {

module/os/freebsd/zfs/abd_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ abd_alloc_zero_scatter(void)
250250

251251
n = abd_chunkcnt_for_bytes(SPA_MAXBLOCKSIZE);
252252
abd_zero_scatter = abd_alloc_struct(SPA_MAXBLOCKSIZE);
253-
abd_zero_scatter->abd_flags |= ABD_FLAG_OWNER | ABD_FLAG_ZEROS;
253+
abd_zero_scatter->abd_flags |= ABD_FLAG_OWNER;
254254
abd_zero_scatter->abd_size = SPA_MAXBLOCKSIZE;
255255

256256
ABD_SCATTER(abd_zero_scatter).abd_offset = 0;

module/os/linux/zfs/abd_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ abd_alloc_zero_scatter(void)
509509
ABD_SCATTER(abd_zero_scatter).abd_sgl = table.sgl;
510510
ABD_SCATTER(abd_zero_scatter).abd_nents = nr_pages;
511511
abd_zero_scatter->abd_size = SPA_MAXBLOCKSIZE;
512-
abd_zero_scatter->abd_flags |= ABD_FLAG_MULTI_CHUNK | ABD_FLAG_ZEROS;
512+
abd_zero_scatter->abd_flags |= ABD_FLAG_MULTI_CHUNK;
513513

514514
abd_for_each_sg(abd_zero_scatter, sg, nr_pages, i) {
515515
sg_set_page(sg, abd_zero_page, PAGESIZE, 0);

module/zfs/abd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ abd_verify(abd_t *abd)
113113
ASSERT3U(abd->abd_flags, ==, abd->abd_flags & (ABD_FLAG_LINEAR |
114114
ABD_FLAG_OWNER | ABD_FLAG_META | ABD_FLAG_MULTI_ZONE |
115115
ABD_FLAG_MULTI_CHUNK | ABD_FLAG_LINEAR_PAGE | ABD_FLAG_GANG |
116-
ABD_FLAG_GANG_FREE | ABD_FLAG_ZEROS | ABD_FLAG_ALLOCD));
116+
ABD_FLAG_GANG_FREE | ABD_FLAG_ALLOCD));
117117
IMPLY(abd->abd_parent != NULL, !(abd->abd_flags & ABD_FLAG_OWNER));
118118
IMPLY(abd->abd_flags & ABD_FLAG_META, abd->abd_flags & ABD_FLAG_OWNER);
119119
if (abd_is_linear(abd)) {

0 commit comments

Comments
 (0)