diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2023-11-23 16:47:17 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-12-15 20:27:03 +0100 |
commit | 2aae747a4938c2c3c398ff55aa2ddaf51b135899 (patch) | |
tree | 70461a07f3ca98064e530bb5e32a1ba5c2b93e7f /fs/btrfs/zoned.c | |
parent | btrfs: zoned: don't clear dirty flag of extent buffer (diff) | |
download | linux-2aae747a4938c2c3c398ff55aa2ddaf51b135899.tar.xz linux-2aae747a4938c2c3c398ff55aa2ddaf51b135899.zip |
btrfs: remove now unneeded btrfs_redirty_list_add
Now that we're not clearing the dirty flag off of extent_buffers in zoned mode,
all that is left of btrfs_redirty_list_add() is a memzero() and some
ASSERT()ions.
As we're also memzero()ing the buffer on write-out btrfs_redirty_list_add()
has become obsolete and can be removed.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/zoned.c')
-rw-r--r-- | fs/btrfs/zoned.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 2c7fe6699cf4..910841b6b0a8 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1706,23 +1706,6 @@ void btrfs_calc_zone_unusable(struct btrfs_block_group *cache) cache->zone_unusable = unusable; } -void btrfs_redirty_list_add(struct btrfs_transaction *trans, - struct extent_buffer *eb) -{ - if (!btrfs_is_zoned(eb->fs_info) || - btrfs_header_flag(eb, BTRFS_HEADER_FLAG_WRITTEN)) - return; - - ASSERT(test_bit(EXTENT_BUFFER_DIRTY, &eb->bflags)); - ASSERT(test_bit(EXTENT_BUFFER_ZONED_ZEROOUT, &eb->bflags)); - - memzero_extent_buffer(eb, 0, eb->len); - set_bit(EXTENT_BUFFER_ZONED_ZEROOUT, &eb->bflags); - set_extent_buffer_dirty(eb); - set_extent_bit(&trans->dirty_pages, eb->start, eb->start + eb->len - 1, - EXTENT_DIRTY, NULL); -} - bool btrfs_use_zone_append(struct btrfs_bio *bbio) { u64 start = (bbio->bio.bi_iter.bi_sector << SECTOR_SHIFT); |