mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: "Adrian McMenamin" <lkmladrian@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: rq_for_each_bio
Date: Sun, 9 Dec 2007 15:19:56 +1100	[thread overview]
Message-ID: <18267.27884.259885.618469@notabene.brown> (raw)
In-Reply-To: message from Adrian McMenamin on Sunday December 9

On Sunday December 9, lkmladrian@gmail.com wrote:
> I have tried to search through the mailing list and it is not entirely
> clear, but it looks like this has gone from the kernel: not least
> because my driver reports:
> 
> drivers/sh/gdrom/gdrom.c:665: error: implicit declaration of function
> 'rq_for_each_bio'
> 
> I am not arguing for a stable ABI/API, I get that one - but is there a
> canonical source of changes in the kernel (because unless you cross
> reference lkml and git repos the mailing list isn't) and if there is -
> how can we get it on the first page of google? :)

The canonical source for changes in the kernel is the git history.  It
stores all of them!

The canonical source for changes in the kernel that are important to
your driver is the output of the compiler.  If the compiler triggers
and error where previously it didn't, then you depend on a part of the
kernel that has changed --- if someone makes an API change that does
not cause a compiler error for people who depend on the old
behaviour, then they have done the wrong thing, but that happens
rarely.

If you get a compiler error, you then look in the git history to find
out when the API changed, and read the comment.  in this case it is
commit 5705f7021748a69d84d6567e68e8851dab551464

If you look at this commit, you will see a brief explanation of the
change, and examples of how new code replaced the old.

> 
> (Actually, forget the theologocal discussion, tell me about rq_for_each_bio)

Every instance in the kernel of rq_for_each_bio used the bio simply to
call bio_for_each_segment.  So we discarded rq_for_each_bio and
introduced rq_for_each_segment.  It make code cleaner (less indent
depth) and means that we can make changes to the rules for iterating
through segments in a request in just one central place.  i.e. we have
a higher level of abstraction.

If you have a usage of rq_for_each_bio where rq_for_each_segment
cannot be used, please show us.

NeilBrown

      reply	other threads:[~2007-12-09  4:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09  1:37 rq_for_each_bio Adrian McMenamin
2007-12-09  4:19 ` Neil Brown [this message]

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=18267.27884.259885.618469@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkmladrian@gmail.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

all inboxes | Powered by JetHome®