|
@@ -1967,6 +1967,24 @@ bad:
|
|
|
}
|
|
|
EXPORT_SYMBOL(bioset_init);
|
|
|
|
|
|
+/*
|
|
|
+ * Initialize and setup a new bio_set, based on the settings from
|
|
|
+ * another bio_set.
|
|
|
+ */
|
|
|
+int bioset_init_from_src(struct bio_set *bs, struct bio_set *src)
|
|
|
+{
|
|
|
+ int flags;
|
|
|
+
|
|
|
+ flags = 0;
|
|
|
+ if (src->bvec_pool.min_nr)
|
|
|
+ flags |= BIOSET_NEED_BVECS;
|
|
|
+ if (src->rescue_workqueue)
|
|
|
+ flags |= BIOSET_NEED_RESCUER;
|
|
|
+
|
|
|
+ return bioset_init(bs, src->bio_pool.min_nr, src->front_pad, flags);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(bioset_init_from_src);
|
|
|
+
|
|
|
#ifdef CONFIG_BLK_CGROUP
|
|
|
|
|
|
/**
|