[dm-devel] [PATCH] additional bio list helpers

Bryn M. Reeves breeves at redhat.com
Wed Feb 7 11:26:14 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Kiyoshi,

Kiyoshi Ueda wrote:
> This one breaks the bio_list if bl2 is a empty list.
> Probably missed to add like below?
> -----------------------------------
> +	if (bio_list_empty(bl2))
> +		return;
> -----------------------------------

Quite right - fixed, thanks!

> I think that bl->tail is always NULL when bl->head is NULL,
> unless the bio_list is corrupted.  So no need to check bl->tail.

This was actually already changed in my git copy, but I forgot to
re-generate the patch before posting - apologies!

> I think that this check in not needed because it is covered
> by bio_for_each() below.

Agreed!

> I think that bio_list_join() is same as existing bio_list_merge_head().

Also agreed - thanks for catching these. This one also isn't used by
dm-loop anyway.

Revised patch attached - this time just including the changes actually
needed by the dm-loop patch:

bio_list_empty
bio_for_each
bio_list_nr
bio_list_merge_init

Kind regards,

Bryn.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFybdW6YSQoMYUY94RAgZxAKChuSEQAP0zs+f9/yzjCf92beTkJQCdEQBq
oxBR+Xsj1V6Fj4r9ec3sPZ0=
=nIAj
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dm-bio-list-helpers.patch
Type: text/x-patch
Size: 1467 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20070207/2de060d1/attachment.bin>


More information about the dm-devel mailing list