diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-10-11 18:44:27 -0400 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-24 01:33:47 -0500 |
commit | 4f024f3797c43cb4b73cd2c50cec728842d0e49e (patch) | |
tree | 3aedcab02d2ad723a189d01934d1e94fec7a54e1 /fs/btrfs/extent_io.c | |
parent | ed9c47bebeeea4a468b07cfd745c690190f8014c (diff) |
block: Abstract out bvec iterator
Immutable biovecs are going to require an explicit iterator. To
implement immutable bvecs, a later patch is going to add a bi_bvec_done
member to this struct; for now, this patch effectively just renames
things.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "Ed L. Cashin" <ecashin@coraid.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Yehuda Sadeh <yehuda@inktank.com>
Cc: Sage Weil <sage@inktank.com>
Cc: Alex Elder <elder@inktank.com>
Cc: ceph-devel@vger.kernel.org
Cc: Joshua Morris <josh.h.morris@us.ibm.com>
Cc: Philip Kelleher <pjk1939@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel@redhat.com
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: Benny Halevy <bhalevy@tonian.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: Joern Engel <joern@logfs.org>
Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Ben Myers <bpm@sgi.com>
Cc: xfs@oss.sgi.com
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Guo Chao <yan@linux.vnet.ibm.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Jerome Marchand <jmarchand@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Peng Tao <tao.peng@emc.com>
Cc: Andy Adamson <andros@netapp.com>
Cc: fanchaoting <fanchaoting@cn.fujitsu.com>
Cc: Jie Liu <jeff.liu@oracle.com>
Cc: Sunil Mushran <sunil.mushran@gmail.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Cc: Pankaj Kumar <pankaj.km@samsung.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Mel Gorman <mgorman@suse.de>6
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 8b5f9e1d1f0e..bcb6f1b780d6 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -1984,7 +1984,7 @@ int repair_io_failure(struct btrfs_fs_info *fs_info, u64 start, | |||
1984 | bio = btrfs_io_bio_alloc(GFP_NOFS, 1); | 1984 | bio = btrfs_io_bio_alloc(GFP_NOFS, 1); |
1985 | if (!bio) | 1985 | if (!bio) |
1986 | return -EIO; | 1986 | return -EIO; |
1987 | bio->bi_size = 0; | 1987 | bio->bi_iter.bi_size = 0; |
1988 | map_length = length; | 1988 | map_length = length; |
1989 | 1989 | ||
1990 | ret = btrfs_map_block(fs_info, WRITE, logical, | 1990 | ret = btrfs_map_block(fs_info, WRITE, logical, |
@@ -1995,7 +1995,7 @@ int repair_io_failure(struct btrfs_fs_info *fs_info, u64 start, | |||
1995 | } | 1995 | } |
1996 | BUG_ON(mirror_num != bbio->mirror_num); | 1996 | BUG_ON(mirror_num != bbio->mirror_num); |
1997 | sector = bbio->stripes[mirror_num-1].physical >> 9; | 1997 | sector = bbio->stripes[mirror_num-1].physical >> 9; |
1998 | bio->bi_sector = sector; | 1998 | bio->bi_iter.bi_sector = sector; |
1999 | dev = bbio->stripes[mirror_num-1].dev; | 1999 | dev = bbio->stripes[mirror_num-1].dev; |
2000 | kfree(bbio); | 2000 | kfree(bbio); |
2001 | if (!dev || !dev->bdev || !dev->writeable) { | 2001 | if (!dev || !dev->bdev || !dev->writeable) { |
@@ -2268,9 +2268,9 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset, | |||
2268 | return -EIO; | 2268 | return -EIO; |
2269 | } | 2269 | } |
2270 | bio->bi_end_io = failed_bio->bi_end_io; | 2270 | bio->bi_end_io = failed_bio->bi_end_io; |
2271 | bio->bi_sector = failrec->logical >> 9; | 2271 | bio->bi_iter.bi_sector = failrec->logical >> 9; |
2272 | bio->bi_bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; | 2272 | bio->bi_bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; |
2273 | bio->bi_size = 0; | 2273 | bio->bi_iter.bi_size = 0; |
2274 | 2274 | ||
2275 | btrfs_failed_bio = btrfs_io_bio(failed_bio); | 2275 | btrfs_failed_bio = btrfs_io_bio(failed_bio); |
2276 | if (btrfs_failed_bio->csum) { | 2276 | if (btrfs_failed_bio->csum) { |
@@ -2412,7 +2412,7 @@ static void end_bio_extent_readpage(struct bio *bio, int err) | |||
2412 | struct inode *inode = page->mapping->host; | 2412 | struct inode *inode = page->mapping->host; |
2413 | 2413 | ||
2414 | pr_debug("end_bio_extent_readpage: bi_sector=%llu, err=%d, " | 2414 | pr_debug("end_bio_extent_readpage: bi_sector=%llu, err=%d, " |
2415 | "mirror=%lu\n", (u64)bio->bi_sector, err, | 2415 | "mirror=%lu\n", (u64)bio->bi_iter.bi_sector, err, |
2416 | io_bio->mirror_num); | 2416 | io_bio->mirror_num); |
2417 | tree = &BTRFS_I(inode)->io_tree; | 2417 | tree = &BTRFS_I(inode)->io_tree; |
2418 | 2418 | ||
@@ -2543,7 +2543,7 @@ btrfs_bio_alloc(struct block_device *bdev, u64 first_sector, int nr_vecs, | |||
2543 | 2543 | ||
2544 | if (bio) { | 2544 | if (bio) { |
2545 | bio->bi_bdev = bdev; | 2545 | bio->bi_bdev = bdev; |
2546 | bio->bi_sector = first_sector; | 2546 | bio->bi_iter.bi_sector = first_sector; |
2547 | btrfs_bio = btrfs_io_bio(bio); | 2547 | btrfs_bio = btrfs_io_bio(bio); |
2548 | btrfs_bio->csum = NULL; | 2548 | btrfs_bio->csum = NULL; |
2549 | btrfs_bio->csum_allocated = NULL; | 2549 | btrfs_bio->csum_allocated = NULL; |
@@ -2637,7 +2637,7 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree, | |||
2637 | if (bio_ret && *bio_ret) { | 2637 | if (bio_ret && *bio_ret) { |
2638 | bio = *bio_ret; | 2638 | bio = *bio_ret; |
2639 | if (old_compressed) | 2639 | if (old_compressed) |
2640 | contig = bio->bi_sector == sector; | 2640 | contig = bio->bi_iter.bi_sector == sector; |
2641 | else | 2641 | else |
2642 | contig = bio_end_sector(bio) == sector; | 2642 | contig = bio_end_sector(bio) == sector; |
2643 | 2643 | ||