From: Kent Overstreet <koverstreet@google.com>
To: axboe@kernel.dk, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, dm-devel@vger.kernel.org
Cc: tj@kernel.org, neilb@suse.de, Kent Overstreet <koverstreet@google.com>
Subject: [PATCH 18/22] block: Kill bio_sector_offset()
Date: Wed, 27 Mar 2013 10:39:48 -0700 [thread overview]
Message-ID: <1364405992-28424-19-git-send-email-koverstreet@google.com> (raw)
In-Reply-To: <1364405992-28424-1-git-send-email-koverstreet@google.com>
This was only used my dm, and the last patch removed dm's use of it.
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Jens Axboe <axboe@kernel.dk>
---
fs/bio.c | 38 --------------------------------------
include/linux/bio.h | 1 -
2 files changed, 39 deletions(-)
diff --git a/fs/bio.c b/fs/bio.c
index 80644cc..4eeddf4 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1765,44 +1765,6 @@ struct bio_pair *bio_split(struct bio *bi, int first_sectors)
}
EXPORT_SYMBOL(bio_split);
-/**
- * bio_sector_offset - Find hardware sector offset in bio
- * @bio: bio to inspect
- * @index: bio_vec index
- * @offset: offset in bv_page
- *
- * Return the number of hardware sectors between beginning of bio
- * and an end point indicated by a bio_vec index and an offset
- * within that vector's page.
- */
-sector_t bio_sector_offset(struct bio *bio, unsigned short index,
- unsigned int offset)
-{
- unsigned int sector_sz;
- struct bio_vec *bv;
- sector_t sectors;
- int i;
-
- sector_sz = queue_logical_block_size(bio->bi_bdev->bd_disk->queue);
- sectors = 0;
-
- if (index >= bio->bi_iter.bi_idx)
- index = bio->bi_vcnt - 1;
-
- bio_for_each_segment_all(bv, bio, i) {
- if (i == index) {
- if (offset > bv->bv_offset)
- sectors += (offset - bv->bv_offset) / sector_sz;
- break;
- }
-
- sectors += bv->bv_len / sector_sz;
- }
-
- return sectors;
-}
-EXPORT_SYMBOL(bio_sector_offset);
-
/*
* create memory pools for biovec's in a bio_set.
* use the global biovec slabs created for general use.
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 1967b64..80ffe15 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -331,7 +331,6 @@ extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
unsigned int, unsigned int);
extern int bio_get_nr_vecs(struct block_device *);
-extern sector_t bio_sector_offset(struct bio *, unsigned short, unsigned int);
extern struct bio *bio_map_user(struct request_queue *, struct block_device *,
unsigned long, unsigned int, int, gfp_t);
struct sg_iovec;
--
1.8.1.3
next prev parent reply other threads:[~2013-03-27 17:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 17:39 Immutable biovecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 01/22] block: Abstract out bvec iterator Kent Overstreet
2013-03-27 17:39 ` [PATCH 02/22] dm: Use bvec_iter for dm_bio_record() Kent Overstreet
2013-03-27 17:39 ` [PATCH 03/22] block: Convert bio_iovec() to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 05/22] block: Immutable bio vecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 06/22] aoe: Convert to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 07/22] dm-verity: convert to bvec iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 08/22] block: Convert bio_copy_data() to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 09/22] bio-integrity: Convert " Kent Overstreet
2013-03-27 17:39 ` [PATCH 10/22] dm-crypt: " Kent Overstreet
2013-03-27 17:39 ` [PATCH 11/22] dm-io: Convert DM_IO_BVEC -> DM_IO_BIO Kent Overstreet
2013-03-27 17:39 ` [PATCH 12/22] umem: Convert to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 13/22] ceph: " Kent Overstreet
2013-03-27 17:39 ` [PATCH 14/22] block: Kill __BVEC_END, __BVEC_START Kent Overstreet
2013-03-27 17:39 ` [PATCH 15/22] block: Kill bio_iovec_idx(), __bio_iovec() Kent Overstreet
2013-03-27 17:39 ` [PATCH 16/22] rbd: Refactor bio cloning, don't clone biovecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 17/22] dm: Refactor for new bio cloning/splitting Kent Overstreet
2013-03-27 17:39 ` Kent Overstreet [this message]
2013-03-27 17:39 ` [PATCH 19/22] md: Immutable bvecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 20/22] dm: Don't save bvec anymore Kent Overstreet
2013-03-27 17:39 ` [PATCH 21/22] block: Don't save bvec in bio_map_data Kent Overstreet
2013-03-27 17:39 ` [PATCH 22/22] block: Don't copy bvecs when cloning bios, just share them Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364405992-28424-19-git-send-email-koverstreet@google.com \
--to=koverstreet@google.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®