[PATCH 1/14] barriers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduce a function that adds a bio to the head of the list.

It will be needed for barriers.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

---
 drivers/md/dm-bio-list.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: linux-2.6.29-rc1-devel/drivers/md/dm-bio-list.h
===================================================================
--- linux-2.6.29-rc1-devel.orig/drivers/md/dm-bio-list.h	2009-01-19 02:03:49.000000000 +0100
+++ linux-2.6.29-rc1-devel/drivers/md/dm-bio-list.h	2009-01-19 02:05:01.000000000 +0100
@@ -52,6 +52,16 @@ static inline void bio_list_add(struct b
 	bl->tail = bio;
 }
 
+static inline void bio_list_add_head(struct bio_list *bl, struct bio *bio)
+{
+	bio->bi_next = bl->head;
+
+	bl->head = bio;
+
+	if (!bl->tail)
+		bl->tail = bio;
+}
+
 static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
 {
 	if (!bl2->head)

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux