Commit e292d7bc authored by Kent Overstreet's avatar Kent Overstreet Committed by Jens Axboe

xfs: convert to bioset_init()/mempool_init()

Convert XFS to embedded bio sets.
Acked-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8ac9f7c1
...@@ -594,7 +594,7 @@ xfs_alloc_ioend( ...@@ -594,7 +594,7 @@ xfs_alloc_ioend(
struct xfs_ioend *ioend; struct xfs_ioend *ioend;
struct bio *bio; struct bio *bio;
bio = bio_alloc_bioset(GFP_NOFS, BIO_MAX_PAGES, xfs_ioend_bioset); bio = bio_alloc_bioset(GFP_NOFS, BIO_MAX_PAGES, &xfs_ioend_bioset);
xfs_init_bio_from_bh(bio, bh); xfs_init_bio_from_bh(bio, bh);
ioend = container_of(bio, struct xfs_ioend, io_inline_bio); ioend = container_of(bio, struct xfs_ioend, io_inline_bio);
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#ifndef __XFS_AOPS_H__ #ifndef __XFS_AOPS_H__
#define __XFS_AOPS_H__ #define __XFS_AOPS_H__
extern struct bio_set *xfs_ioend_bioset; extern struct bio_set xfs_ioend_bioset;
/* /*
* Types of I/O for bmap clustering and I/O completion tracking. * Types of I/O for bmap clustering and I/O completion tracking.
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#include <linux/parser.h> #include <linux/parser.h>
static const struct super_operations xfs_super_operations; static const struct super_operations xfs_super_operations;
struct bio_set *xfs_ioend_bioset; struct bio_set xfs_ioend_bioset;
static struct kset *xfs_kset; /* top-level xfs sysfs dir */ static struct kset *xfs_kset; /* top-level xfs sysfs dir */
#ifdef DEBUG #ifdef DEBUG
...@@ -1845,10 +1845,9 @@ MODULE_ALIAS_FS("xfs"); ...@@ -1845,10 +1845,9 @@ MODULE_ALIAS_FS("xfs");
STATIC int __init STATIC int __init
xfs_init_zones(void) xfs_init_zones(void)
{ {
xfs_ioend_bioset = bioset_create(4 * MAX_BUF_PER_PAGE, if (bioset_init(&xfs_ioend_bioset, 4 * MAX_BUF_PER_PAGE,
offsetof(struct xfs_ioend, io_inline_bio), offsetof(struct xfs_ioend, io_inline_bio),
BIOSET_NEED_BVECS); BIOSET_NEED_BVECS))
if (!xfs_ioend_bioset)
goto out; goto out;
xfs_log_ticket_zone = kmem_zone_init(sizeof(xlog_ticket_t), xfs_log_ticket_zone = kmem_zone_init(sizeof(xlog_ticket_t),
...@@ -1997,7 +1996,7 @@ xfs_init_zones(void) ...@@ -1997,7 +1996,7 @@ xfs_init_zones(void)
out_destroy_log_ticket_zone: out_destroy_log_ticket_zone:
kmem_zone_destroy(xfs_log_ticket_zone); kmem_zone_destroy(xfs_log_ticket_zone);
out_free_ioend_bioset: out_free_ioend_bioset:
bioset_free(xfs_ioend_bioset); bioset_exit(&xfs_ioend_bioset);
out: out:
return -ENOMEM; return -ENOMEM;
} }
...@@ -2029,7 +2028,7 @@ xfs_destroy_zones(void) ...@@ -2029,7 +2028,7 @@ xfs_destroy_zones(void)
kmem_zone_destroy(xfs_btree_cur_zone); kmem_zone_destroy(xfs_btree_cur_zone);
kmem_zone_destroy(xfs_bmap_free_item_zone); kmem_zone_destroy(xfs_bmap_free_item_zone);
kmem_zone_destroy(xfs_log_ticket_zone); kmem_zone_destroy(xfs_log_ticket_zone);
bioset_free(xfs_ioend_bioset); bioset_exit(&xfs_ioend_bioset);
} }
STATIC int __init STATIC int __init
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment