Skip to content

Commit 2a362fc

Browse files
adam900710kdave
authored andcommitted
btrfs: replace BTRFS_MAX_BIO_SECTORS with BIO_MAX_VECS
It's impossible to have a btrfs bio with more than BIO_MAX_VECS vectors anyway. And there is only one location utilizing that macro, just replace it with BIO_MAX_VECS. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent f22bc41 commit 2a362fc

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

fs/btrfs/bio.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ struct btrfs_inode;
1818

1919
#define BTRFS_BIO_INLINE_CSUM_SIZE 64
2020

21-
/*
22-
* Maximum number of sectors for a single bio to limit the size of the
23-
* checksum array. This matches the number of bio_vecs per bio and thus the
24-
* I/O size for buffered I/O.
25-
*/
26-
#define BTRFS_MAX_BIO_SECTORS (256)
27-
2821
typedef void (*btrfs_bio_end_io_t)(struct btrfs_bio *bbio);
2922

3023
/*

fs/btrfs/direct-io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static int btrfs_dio_iomap_begin(struct inode *inode, loff_t start,
385385
* to allocate a contiguous array for the checksums.
386386
*/
387387
if (!write)
388-
len = min_t(u64, len, fs_info->sectorsize * BTRFS_MAX_BIO_SECTORS);
388+
len = min_t(u64, len, fs_info->sectorsize * BIO_MAX_VECS);
389389

390390
lockstart = start;
391391
lockend = start + len - 1;

0 commit comments

Comments
 (0)