mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
6cf66b4caf
commit
b54ffb73ca
16 changed files with 18 additions and 74 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue