All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Putting bio_list into struct request?
@ 2009-04-19 16:12 Jeff Garzik
  2009-04-19 16:13 ` [PATCH 1/2] Update struct request to use bio_list Jeff Garzik
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeff Garzik @ 2009-04-19 16:12 UTC (permalink / raw)
  To: LKML; +Cc: linux-ide, linux-scsi, axboe, hch


Now that we have bio_list in include/linux/bio.h, I wanted to see what
would happen when I replaced rq->{bio,biotail} with rq->bio_list.

Personally, I think the result is more readable, and indicates to all
users that rq->bio is really a list (even if a list with one entry).
Also, it highlights some bio users in downstream drivers, and hopefully
serves to increase the amount of bio-related review in those drivers.

The first patch is a straightforward replacement, with no code or
behavior changes (any such is a bug in the patch...):

	- null/not-null tests become bio_list_empty()
	- rq->bio becomes rq->bio_list.head
	- rq->biotail becomes rq->bio_list.tail
	- in a few cases, bio_list_xxx functions are called
	  as appropriate

The second patch are fixes to what I believe are minor bugs in the
bio-list-aware block core.  Even if patch #1 is not accepted, these
fixes are likely needed regardless.  Typically the bugs are of the type
"we forgot to update rq->biotail".

But maybe some of those are on purpose.  Who knows, give it a
look... it is quite muddled which block core functions want 'bio'
as a list, or just a singleton 'bio'.  Maybe I just got confused.

If nothing else, it helps to give this area of block another look, IMO.

	Jeff





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-19 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-19 16:12 [PATCH 0/2] Putting bio_list into struct request? Jeff Garzik
2009-04-19 16:13 ` [PATCH 1/2] Update struct request to use bio_list Jeff Garzik
2009-04-19 16:14 ` [PATCH 2/2] Fix bugs found during bio_list update Jeff Garzik
2009-04-19 17:44 ` [PATCH 0/2] Putting bio_list into struct request? Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.