diff options
author | Christoph Hellwig <hch@lst.de> | 2022-12-12 08:37:21 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-02-15 19:38:55 +0100 |
commit | 921603c76246a7f716b9a244d7b1fa1653935f31 (patch) | |
tree | e159317e7f58d87214a8fda74029373e2d8aac6b /fs/btrfs/zoned.c | |
parent | btrfs: set bbio->file_offset in alloc_new_bio (diff) | |
download | linux-921603c76246a7f716b9a244d7b1fa1653935f31.tar.xz linux-921603c76246a7f716b9a244d7b1fa1653935f31.zip |
btrfs: pass a btrfs_bio to btrfs_use_append
struct btrfs_bio has all the information needed for btrfs_use_append, so
pass that instead of a btrfs_inode and file_offset.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 06ed1eeb5981..8824748ee8c3 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1627,8 +1627,10 @@ void btrfs_free_redirty_list(struct btrfs_transaction *trans) spin_unlock(&trans->releasing_ebs_lock); } -bool btrfs_use_zone_append(struct btrfs_inode *inode, u64 start) +bool btrfs_use_zone_append(struct btrfs_bio *bbio) { + u64 start = (bbio->bio.bi_iter.bi_sector << SECTOR_SHIFT); + struct btrfs_inode *inode = bbio->inode; struct btrfs_fs_info *fs_info = inode->root->fs_info; struct btrfs_block_group *cache; bool ret = false; |