* [PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page [not found] <20180524090139.2150-1-ming.lei@redhat.com> @ 2018-05-24 9:01 ` Ming Lei 2018-05-24 21:44 ` David Sterba 0 siblings, 1 reply; 3+ messages in thread From: Ming Lei @ 2018-05-24 9:01 UTC (permalink / raw) To: Jens Axboe Cc: linux-block, Ming Lei, Chris Mason, Josef Bacik, David Sterba, linux-btrfs Preparing for supporting multipage bvec. Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <jbacik@fb.com> Cc: David Sterba <dsterba@suse.com> Cc: linux-btrfs@vger.kernel.org Signed-off-by: Ming Lei <ming.lei@redhat.com> --- fs/btrfs/compression.c | 5 ++++- fs/btrfs/extent_io.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 4ea718bdfb41..be6b09dfd6a7 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -407,8 +407,11 @@ blk_status_t btrfs_submit_compressed_write(struct inode *inode, u64 start, static u64 bio_end_offset(struct bio *bio) { struct bio_vec *last = bio_last_bvec_all(bio); + struct bio_vec bv; - return page_offset(last->bv_page) + last->bv_len + last->bv_offset; + segment_last_page(last, &bv); + + return page_offset(bv.bv_page) + bv.bv_len + bv.bv_offset; } static noinline int add_ra_bio_pages(struct inode *inode, diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 4f314d87ce4d..3c9c91a1e3e9 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2731,11 +2731,12 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num, { blk_status_t ret = 0; struct bio_vec *bvec = bio_last_bvec_all(bio); - struct page *page = bvec->bv_page; + struct bio_vec bv; struct extent_io_tree *tree = bio->bi_private; u64 start; - start = page_offset(page) + bvec->bv_offset; + segment_last_page(bvec, &bv); + start = page_offset(bv.bv_page) + bv.bv_offset; bio->bi_private = NULL; -- 2.9.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page 2018-05-24 9:01 ` [PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page Ming Lei @ 2018-05-24 21:44 ` David Sterba 2018-05-25 0:07 ` Ming Lei 0 siblings, 1 reply; 3+ messages in thread From: David Sterba @ 2018-05-24 21:44 UTC (permalink / raw) To: Ming Lei Cc: Jens Axboe, linux-block, Chris Mason, Josef Bacik, David Sterba, linux-btrfs On Thu, May 24, 2018 at 05:01:15PM +0800, Ming Lei wrote: > Preparing for supporting multipage bvec. Could you please also CC the cover letter so we have a chance to learn what multipage bvec means or what are the changes between the iterations? I found it in the archives, but a copy to mailinglist would be good too. Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page 2018-05-24 21:44 ` David Sterba @ 2018-05-25 0:07 ` Ming Lei 0 siblings, 0 replies; 3+ messages in thread From: Ming Lei @ 2018-05-25 0:07 UTC (permalink / raw) To: dsterba, Jens Axboe, linux-block, Chris Mason, Josef Bacik, David Sterba, linux-btrfs On Thu, May 24, 2018 at 11:44:41PM +0200, David Sterba wrote: > On Thu, May 24, 2018 at 05:01:15PM +0800, Ming Lei wrote: > > Preparing for supporting multipage bvec. > > Could you please also CC the cover letter so we have a chance to learn > what multipage bvec means or what are the changes between the > iterations? I found it in the archives, but a copy to mailinglist would > be good too. Thanks. Sorry, that is my fault, will resend with Cc today. Thanks, Ming ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-25 0:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180524090139.2150-1-ming.lei@redhat.com>
2018-05-24 9:01 ` [PATCH V5 10/33] btrfs: use segment_last_page to get bio's last page Ming Lei
2018-05-24 21:44 ` David Sterba
2018-05-25 0:07 ` Ming Lei
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).