From: Shaohua Li <shli@kernel.org>
To: Guoqing Jiang <gqjiang@suse.com>
Cc: Shaohua Li <shli@fb.com>,
linux-raid@vger.kernel.org, khlebnikov@yandex-team.ru,
hch@lst.de, neilb@suse.com
Subject: Re: [PATCH 1/5] MD: attach data to each bio
Date: Tue, 7 Feb 2017 21:24:30 -0800 [thread overview]
Message-ID: <20170208052430.wwqbqi7xkpvxoj52@kernel.org> (raw)
In-Reply-To: <589ADFEC.1070902@suse.com>
On Wed, Feb 08, 2017 at 05:07:56PM +0800, Guoqing Jiang wrote:
>
>
> On 02/08/2017 12:55 AM, Shaohua Li wrote:
> > Currently MD is rebusing some bio fields. To remove the hack, we attach
> > extra data to each bio. Each personablity can attach extra data to the
> > bios, so we don't need to rebuse bio fields.
>
> rebuse? Maybe it should be reuse, or abuse.
oops, this is a typo, should be abuse
> [snip]
>
> > +static inline void *md_get_per_bio_data(struct bio *bio)
> > +{
> > + return ((struct md_per_bio_data *)bio->bi_private) + 1;
> > +}
> > +
> > +extern void md_bio_attach_data(struct mddev *mddev, struct bio *bio);
>
> Why not make raid1_bio_ref_ptr and raid10_bio_ref_ptr as macro
> like raid5_get_bio_data? Or add inline before the two funcs since
> both of them are called frequently.
I'll add 'inline'. Actually it doesn't really matter. The compiler will inline
simple functions automatically. In this case, I'm sure compiler will do the
inline. On the other hand, 'inline' doesn't guarantee compiler will do inline
unless you use __attribute__((always_inline)).
Thanks,
Shaohua
next prev parent reply other threads:[~2017-02-08 5:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 16:55 [PATCH 0/5] MD: don't abuse bi_phys_segements Shaohua Li
2017-02-07 16:55 ` [PATCH 1/5] MD: attach data to each bio Shaohua Li
2017-02-08 9:07 ` Guoqing Jiang
2017-02-08 5:24 ` Shaohua Li [this message]
2017-02-09 0:09 ` Wols Lists
2017-02-10 6:08 ` NeilBrown
2017-02-10 6:47 ` Shaohua Li
2017-02-13 9:49 ` NeilBrown
2017-02-13 18:49 ` Shaohua Li
2017-02-14 2:40 ` NeilBrown
2017-02-13 7:37 ` Christoph Hellwig
2017-02-13 9:32 ` NeilBrown
2017-02-07 16:55 ` [PATCH 2/5] md/raid5: don't abuse bio->bi_phys_segments Shaohua Li
2017-02-07 16:56 ` [PATCH 3/5] md/raid5: change disk limits Shaohua Li
2017-02-07 16:56 ` [PATCH 4/5] md/raid1: don't abuse bio->bi_phys_segments Shaohua Li
2017-02-07 16:56 ` [PATCH 5/5] md/raid10: " Shaohua Li
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=20170208052430.wwqbqi7xkpvxoj52@kernel.org \
--to=shli@kernel.org \
--cc=gqjiang@suse.com \
--cc=hch@lst.de \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=shli@fb.com \
/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;
as well as URLs for NNTP newsgroup(s).