[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210119050631.57073-12-chaitanya.kulkarni@wdc.com>
Date: Mon, 18 Jan 2021 21:06:05 -0800
From: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
To: linux-block@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
drbd-dev@...ts.linbit.com, linux-bcache@...r.kernel.org,
linux-raid@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
cluster-devel@...hat.com
Cc: jfs-discussion@...ts.sourceforge.net, dm-devel@...hat.com,
axboe@...nel.dk, philipp.reisner@...bit.com,
lars.ellenberg@...bit.com, efremov@...ux.com, colyli@...e.de,
kent.overstreet@...il.com, agk@...hat.com, snitzer@...hat.com,
song@...nel.org, hch@....de, sagi@...mberg.me,
martin.petersen@...cle.com, viro@...iv.linux.org.uk, clm@...com,
josef@...icpanda.com, dsterba@...e.com, tytso@....edu,
adilger.kernel@...ger.ca, rpeterso@...hat.com, agruenba@...hat.com,
darrick.wong@...cle.com, shaggy@...nel.org, damien.lemoal@....com,
naohiro.aota@....com, jth@...nel.org, tj@...nel.org,
osandov@...com, bvanassche@....org, gustavo@...eddedor.com,
asml.silence@...il.com, jefflexu@...ux.alibaba.com,
Chaitanya Kulkarni <chaitanya.kulkarni@....com>
Subject: [RFC PATCH 11/37] jfs: use bio_init_fields in logmgr
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
---
fs/jfs/jfs_logmgr.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 9330eff210e0..ee7407ca32c0 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1980,15 +1980,11 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
bp->l_flag |= lbmREAD;
bio = bio_alloc(GFP_NOFS, 1);
-
- bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
- bio_set_dev(bio, log->bdev);
-
+ bio_init_fields(bio, log->bdev, bp->l_blkno << (log->l2bsize - 9),
+ log->bdev, 0, lbmIODone, bp, 0, 0);
bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset);
BUG_ON(bio->bi_iter.bi_size != LOGPSIZE);
- bio->bi_end_io = lbmIODone;
- bio->bi_private = bp;
bio->bi_opf = REQ_OP_READ;
/*check if journaling to disk has been disabled*/
if (log->no_integrity) {
@@ -2125,14 +2121,10 @@ static void lbmStartIO(struct lbuf * bp)
jfs_info("lbmStartIO");
bio = bio_alloc(GFP_NOFS, 1);
- bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
- bio_set_dev(bio, log->bdev);
-
+ bio_init_fields(bio, log->bdev, bp->l_blkno << (log->l2bsize - 9),
+ log->bdev, 0, lbmIODone, bp, 0, 0);
bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset);
BUG_ON(bio->bi_iter.bi_size != LOGPSIZE);
-
- bio->bi_end_io = lbmIODone;
- bio->bi_private = bp;
bio->bi_opf = REQ_OP_WRITE | REQ_SYNC;
/* check if journaling to disk has been disabled */
--
2.22.1
Powered by blists - more mailing lists