diff options
author | Dave Chinner <david@fromorbit.com> | 2016-05-20 10:31:29 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-05-20 10:31:29 +1000 |
commit | 8b7a242e53e20dc3f2a071ff4d3d8dfa063174dd (patch) | |
tree | 0040f882bcab558dca731c7ed0d48abdf70696f9 /fs/xfs/xfs_super.c | |
parent | ce5c767db079649db88a9f189798839f9c544981 (diff) | |
parent | 690a7871225b7f91f8fe13c465a79e183a61cfe3 (diff) | |
download | blackbird-obmc-linux-8b7a242e53e20dc3f2a071ff4d3d8dfa063174dd.tar.gz blackbird-obmc-linux-8b7a242e53e20dc3f2a071ff4d3d8dfa063174dd.zip |
Merge branch 'xfs-4.7-writeback-bio' into for-next
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index a9ea12d46b74..b412bb1c5fd3 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -58,8 +58,7 @@ #include <linux/parser.h> static const struct super_operations xfs_super_operations; -static kmem_zone_t *xfs_ioend_zone; -mempool_t *xfs_ioend_pool; +struct bio_set *xfs_ioend_bioset; static struct kset *xfs_kset; /* top-level xfs sysfs dir */ #ifdef DEBUG @@ -1699,20 +1698,15 @@ MODULE_ALIAS_FS("xfs"); STATIC int __init xfs_init_zones(void) { - - xfs_ioend_zone = kmem_zone_init(sizeof(xfs_ioend_t), "xfs_ioend"); - if (!xfs_ioend_zone) + xfs_ioend_bioset = bioset_create(4 * MAX_BUF_PER_PAGE, + offsetof(struct xfs_ioend, io_inline_bio)); + if (!xfs_ioend_bioset) goto out; - xfs_ioend_pool = mempool_create_slab_pool(4 * MAX_BUF_PER_PAGE, - xfs_ioend_zone); - if (!xfs_ioend_pool) - goto out_destroy_ioend_zone; - xfs_log_ticket_zone = kmem_zone_init(sizeof(xlog_ticket_t), "xfs_log_ticket"); if (!xfs_log_ticket_zone) - goto out_destroy_ioend_pool; + goto out_free_ioend_bioset; xfs_bmap_free_item_zone = kmem_zone_init(sizeof(xfs_bmap_free_item_t), "xfs_bmap_free_item"); @@ -1808,10 +1802,8 @@ xfs_init_zones(void) kmem_zone_destroy(xfs_bmap_free_item_zone); out_destroy_log_ticket_zone: kmem_zone_destroy(xfs_log_ticket_zone); - out_destroy_ioend_pool: - mempool_destroy(xfs_ioend_pool); - out_destroy_ioend_zone: - kmem_zone_destroy(xfs_ioend_zone); + out_free_ioend_bioset: + bioset_free(xfs_ioend_bioset); out: return -ENOMEM; } @@ -1837,9 +1829,7 @@ xfs_destroy_zones(void) kmem_zone_destroy(xfs_btree_cur_zone); kmem_zone_destroy(xfs_bmap_free_item_zone); kmem_zone_destroy(xfs_log_ticket_zone); - mempool_destroy(xfs_ioend_pool); - kmem_zone_destroy(xfs_ioend_zone); - + bioset_free(xfs_ioend_bioset); } STATIC int __init |