From patchwork Sun May 20 22:25:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 10413681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 971F4600F6 for ; Sun, 20 May 2018 22:27:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A668205A9 for ; Sun, 20 May 2018 22:27:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E2C5286EC; Sun, 20 May 2018 22:27:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20B26205A9 for ; Sun, 20 May 2018 22:27:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721AbeETW11 (ORCPT ); Sun, 20 May 2018 18:27:27 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:36569 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752654AbeETW0j (ORCPT ); Sun, 20 May 2018 18:26:39 -0400 Received: by mail-qk0-f194.google.com with SMTP id l17-v6so1200285qke.3; Sun, 20 May 2018 15:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PnwGpkiRIVXTEr8ER/2QwS67/KZzJyr9qnEQbK7ix6w=; b=tUQJ59Cv1EkyeZ3lDtY3rmY+5BKKnf9jQCxkgivLNSfdDylzCbu7Wdnoo7p3uvE2X3 y8UdgiQlbpT8CC02r+YGZXjqJc+WHjjNwhoGhhhJHYXAA3Bonlf2CvK13Q6MU52ii1gR ZyDgstXhIKsTTeodS0BtHrTzCAcr/z9tvIMaqUaGM8EnEJ04GMx++ITG4WXzRZM0X1Yz zlyU2kk5FE7gjZ9a/qGl2tPV/HU3R6eVEy1Zsp/hgGdYYFTQCRfRR6d+AQLWuT3LIB/h GqhYp/llyCXHcBUFor3BaejYnUYNL9PxMdn2IzXtdJSELovrZW/+PY33v7NuzSI3s7db /QTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PnwGpkiRIVXTEr8ER/2QwS67/KZzJyr9qnEQbK7ix6w=; b=Q38Omuma/WUE4FSk4xG3izkJtmpVuUMWv4GBwhssz9VtTMbOHqSCjNYTlTtC8xMOYK rLr/yvvPqqH3WXQZMmX8Y46bWk03R6Eh6AZ92Y/3QfNiX+bwDC4iCTmta+pjVWr06TJn D6oY5QFhvp6FGf/OSEiQ65Fsy+rlYoqHhp7arZYIC+JP+f8hAbLEO8naJL2/cxiAkvfZ XYxNtypnaaWKPMfSgpa0qUl0OiHvhg1MAoZsibHveR+Br7VKnHYmcm4Qc6+q8ijAy2Q0 Bd1MdzdJCGCEL3XaSPtuY1y/MocuGfWoKf5dmMyhKv/hA2KM2ttBgZ//YRXD8U/8zi8C 6IXA== X-Gm-Message-State: ALKqPwdTQGtB9cHDpv7Sk/m1dY7udvizE1TCrmNoNg+wNhsLR6qpO2sz ZBfTNrU3at9S5oqFAJtkt5+GA+jkiA== X-Google-Smtp-Source: AB8JxZpBH7MZhKhDlNLZ3Lv6DtYidjRRd2ScwludPqgrit8tD0aaOE7HHliW9UyB378eZOpHm+fcwA== X-Received: by 2002:a37:4016:: with SMTP id n22-v6mr15538346qka.227.1526855198239; Sun, 20 May 2018 15:26:38 -0700 (PDT) Received: from localhost.localdomain (c-71-234-172-214.hsd1.vt.comcast.net. [71.234.172.214]) by smtp.gmail.com with ESMTPSA id v14-v6sm8773169qto.72.2018.05.20.15.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 15:26:37 -0700 (PDT) From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, axboe@kernel.dk, hch@infradead.org, colyli@suse.de, snitzer@redhat.com, darrick.wong@oracle.com, clm@fb.com, bacik@fb.com, linux-xfs@vger.kernel.org, drbd-dev@lists.linbit.com, linux-btrfs@vger.kernel.org, linux-raid@vger.kernel.org, neilb@suse.com Cc: Kent Overstreet Subject: [PATCH 11/12] xfs: convert to bioset_init()/mempool_init() Date: Sun, 20 May 2018 18:25:57 -0400 Message-Id: <20180520222558.7053-12-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180520222558.7053-1-kent.overstreet@gmail.com> References: <20180520222558.7053-1-kent.overstreet@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Kent Overstreet Acked-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_aops.h | 2 +- fs/xfs/xfs_super.c | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 0ab824f574..102463543d 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -594,7 +594,7 @@ xfs_alloc_ioend( struct xfs_ioend *ioend; 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); ioend = container_of(bio, struct xfs_ioend, io_inline_bio); diff --git a/fs/xfs/xfs_aops.h b/fs/xfs/xfs_aops.h index 69346d460d..694c85b038 100644 --- a/fs/xfs/xfs_aops.h +++ b/fs/xfs/xfs_aops.h @@ -18,7 +18,7 @@ #ifndef __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. diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index d714240529..f643d76db5 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -63,7 +63,7 @@ #include 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 */ #ifdef DEBUG @@ -1845,10 +1845,9 @@ MODULE_ALIAS_FS("xfs"); STATIC int __init 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), - BIOSET_NEED_BVECS); - if (!xfs_ioend_bioset) + BIOSET_NEED_BVECS)) goto out; xfs_log_ticket_zone = kmem_zone_init(sizeof(xlog_ticket_t), @@ -1997,7 +1996,7 @@ xfs_init_zones(void) out_destroy_log_ticket_zone: kmem_zone_destroy(xfs_log_ticket_zone); out_free_ioend_bioset: - bioset_free(xfs_ioend_bioset); + bioset_exit(&xfs_ioend_bioset); out: return -ENOMEM; } @@ -2029,7 +2028,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); - bioset_free(xfs_ioend_bioset); + bioset_exit(&xfs_ioend_bioset); } STATIC int __init