diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2015-05-19 15:31:01 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-13 21:32:04 +0300 |
commit | b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c (patch) | |
tree | 8a6d90b3e092e598fefd34718afd2198d8bff2a7 /fs/gfs2 | |
parent | 6cf66b4caf9c71f64a5486cadbd71ab58d0d4307 (diff) | |
download | linux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.tar.xz |
block: remove bio_get_nr_vecs()
We can always fill up the bio now, no need to estimate the possible
size based on queue parameters.
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
[hch: rebased and wrote a changelog]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/lops.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index c0a1b967deba..92324ac58290 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -261,18 +261,11 @@ void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw) static struct bio *gfs2_log_alloc_bio(struct gfs2_sbd *sdp, u64 blkno) { struct super_block *sb = sdp->sd_vfs; - unsigned nrvecs = bio_get_nr_vecs(sb->s_bdev); struct bio *bio; BUG_ON(sdp->sd_log_bio); - while (1) { - bio = bio_alloc(GFP_NOIO, nrvecs); - if (likely(bio)) - break; - nrvecs = max(nrvecs/2, 1U); - } - + bio = bio_alloc(GFP_NOIO, BIO_MAX_PAGES); bio->bi_iter.bi_sector = blkno * (sb->s_blocksize >> 9); bio->bi_bdev = sb->s_bdev; bio->bi_end_io = gfs2_end_log_write; |