From: Vivek Goyal <vgoyal@redhat.com>
To: Kent Overstreet <koverstreet@google.com>
Cc: axboe@kernel.dk, linux-s390@vger.kernel.org,
Chris Mason <chris.mason@fusionio.com>,
dm-devel@redhat.com, Jiri Kosina <jkosina@suse.cz>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-kernel@vger.kernel.org, tj@kernel.org,
linux-bcache@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Steven Whitehouse <swhiteho@redhat.com>,
Alasdair Kergon <agk@redhat.com>,
Lars Ellenberg <drbd-dev@lists.linbit.com>
Subject: Re: [Drbd-dev] [dm-devel] [PATCH v3 06/26] block: Add bio_end_sector()
Date: Tue, 2 Oct 2012 14:10:01 -0400 [thread overview]
Message-ID: <20121002181001.GB3283@redhat.com> (raw)
In-Reply-To: <1348526106-17074-7-git-send-email-koverstreet@google.com>
On Mon, Sep 24, 2012 at 03:34:46PM -0700, Kent Overstreet wrote:
[..]
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index 4e32be1..d985e90 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -67,6 +67,7 @@
> #define bio_offset(bio) bio_iovec((bio))->bv_offset
> #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
> #define bio_sectors(bio) ((bio)->bi_size >> 9)
> +#define bio_end_sector(bio) ((bio)->bi_sector + bio_sectors(bio))
May be it is just me. But bio_end_sector() kind of sounds that it will
calculate to the last sector of bio. So I thought of it more as
bio_last_sector() and not the sector which is next to the last sector.
Will it make sense to introduce bio_last_sector() and use +1 everywhere.
Or may be we need a better name. Can't think of one though.
Thanks
Vivek
next prev parent reply other threads:[~2012-10-04 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1348526106-17074-1-git-send-email-koverstreet@google.com>
2012-09-24 22:34 ` [Drbd-dev] [PATCH v3 06/26] block: Add bio_end_sector() Kent Overstreet
2012-09-25 11:54 ` Lars Ellenberg
2012-09-25 22:06 ` Kent Overstreet
2012-09-26 15:16 ` Lars Ellenberg
2012-10-02 18:10 ` Vivek Goyal [this message]
2012-10-02 20:20 ` [Drbd-dev] [dm-devel] " Kent Overstreet
2012-09-24 22:34 ` [Drbd-dev] [PATCH v3 08/26] block: Change bio_split() to respect the current value of bi_idx 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=20121002181001.GB3283@redhat.com \
--to=vgoyal@redhat.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=chris.mason@fusionio.com \
--cc=dm-devel@redhat.com \
--cc=drbd-dev@lists.linbit.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jkosina@suse.cz \
--cc=koverstreet@google.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=swhiteho@redhat.com \
--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