Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp6978999imm; Sun, 20 May 2018 15:29:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzKuo/cmgiEyCEdPVTcFpIkptq+s1JKMZNdN6Xb78niXSJK9A2e0k4QjwgXewKAVFqdlZM X-Received: by 2002:a63:a84f:: with SMTP id i15-v6mr14057109pgp.367.1526855388890; Sun, 20 May 2018 15:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526855388; cv=none; d=google.com; s=arc-20160816; b=Jbc2WGeZ3xztSCYQ7WHf+M3bHnX468ZG/ErKKRTxYfaWOra005/34q4UtcFl95S/Uo vM9+5paOJ9ykI7ktKaxMhTIRQsp6zRs2V7Sui3KdiwjPGvbbmV2LHZfebqhsyd3ADDV2 7doQzRzmNugbGYmUCLLYWsPIEqGyJiYSxlCJ4CxasViB+ECRKYAiOOcd5vmQmr+EXn5L 9KB7a/asqnfBdNAFOn1iD6+sAov6UFQWi7/U+IR5m/dBJnSvQnDVIieJ2HA94l4RnxG0 4yBr5T5zfcddhMIOffAYGpmaQzeZHQsDoHTE589lSGPCeoLK2bUIKDWAD+y2vnsNPy8U IFQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=y9RrHqFDKxsIgh8u2cy5nHB13FtUEa5bnZVJK3nbZsg=; b=vNLAVNDjKjRs/DaOBFtk0lY4aA4VWlAy34P+OqNqyaqLRwmmgGIxOmaLD+TDagLVD8 KgMF/kqEsDTqzDkA0p4O5CK5NXBW/VTsLTqWAguC6AAiEiGBx1VwFCihSkUXq32N/3BZ Ttvt9MVao14ecYRcckGT990cvk6eyRxzsWUWbC+/4cF+Ue8kfss7GDwahU9/5xe+CVwN pAV0+cG4S41HVmKtXhxWS37SPQukgIlaM5fJpzz+xf9Haic+lE7cwF/T6On6fsxRzD8Z oZbTKf82BI8qrQSh1/dFuBNc7mb3ZQD3/I4nZJTk71heA+n9snt7tW867cvi4lySw2uZ Hlfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gdRRaAHJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59-v6si12821507plb.106.2018.05.20.15.29.34; Sun, 20 May 2018 15:29:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gdRRaAHJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752712AbeETW1Z (ORCPT + 99 others); Sun, 20 May 2018 18:27:25 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:33000 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbeETW0l (ORCPT ); Sun, 20 May 2018 18:26:41 -0400 Received: by mail-qk0-f193.google.com with SMTP id s12-v6so826065qke.0; Sun, 20 May 2018 15:26:41 -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=y9RrHqFDKxsIgh8u2cy5nHB13FtUEa5bnZVJK3nbZsg=; b=gdRRaAHJe0DOqu8Y8Pl3pE9h65LBM4RGvsHeG9rPEach0g7L+zpRwHezfQl2XqcRAO 3FE/E4KJaDAb/ey/lBj0idT4zt/aLW7MJyMskNWXLLeTWvxDp2UzOCzOgtySNGjwnkgb KksuUE8ddG33DH6eXBAZYz4BCbWA0IlfQHyuTRD2UMhiYCG8AoyQMM1l/LLdx5G8cOE3 RvfSFvIP9xg2+Ee2IKYyq1pXxhEhlsZ9xmZb3YMh1dSFvzIxwZ2e3lyXF4O88CncSTTk 9HXaBarURnePHFkB7WOLiQgq9aGrgocHYZVQXvSclnSWeA2zXmQqaJbL18U3ltMhmzP4 07tQ== 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=y9RrHqFDKxsIgh8u2cy5nHB13FtUEa5bnZVJK3nbZsg=; b=h+KPqEi8Mnjn+x0t1esOS4wJbTDjyDgDKT2k1JQzixTW6LD1jlyGeOtdmbKa51eq1A DJPloh8w4S5dbtIFmgud9pXjImzzIcIhdUp2y92PJNmaxICo+Y/RbzT98mmK0GSNVXih 9txtoOLNADYc4R6jL9uR6ub/dvcAmlomqbEoLW4G2SwFatwSHc9o+DxsEW2t8YFZAizP wG9qyWSnBxijhuj7B8X+HCP/3YekpnEMZTy0BojjcuJ9bo0P88L5OV3HhFc8aP4nDvBj eQkjP9E5YKoIAgZdAXSqzn5TWwCDCR9Z+KxEmzHeoLHM+7CvfQCQhQt762n8hlXcgN8j BMjg== X-Gm-Message-State: ALKqPwd+6+N0A5Gr2qj4p7JYxFD8yKnmz5JkiUORpQ6VAuHOTb5bT819 9TFib/s1rmsUD0jEs/Ccq/xCViFdQQ== X-Received: by 2002:a37:a3c2:: with SMTP id m185-v6mr1451858qke.255.1526855200181; Sun, 20 May 2018 15:26:40 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 15:26:39 -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 12/12] block: Drop bioset_create() Date: Sun, 20 May 2018 18:25:58 -0400 Message-Id: <20180520222558.7053-13-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All users have been converted to bioset_init() Signed-off-by: Kent Overstreet --- block/bio.c | 61 ++++++++++----------------------------------- include/linux/bio.h | 6 ++--- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0a4df92cd6..595663e028 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1908,22 +1908,26 @@ void bioset_exit(struct bio_set *bs) } EXPORT_SYMBOL(bioset_exit); -void bioset_free(struct bio_set *bs) -{ - bioset_exit(bs); - kfree(bs); -} -EXPORT_SYMBOL(bioset_free); - /** * bioset_init - Initialize a bio_set + * @bs: pool to initialize * @pool_size: Number of bio and bio_vecs to cache in the mempool * @front_pad: Number of bytes to allocate in front of the returned bio * @flags: Flags to modify behavior, currently %BIOSET_NEED_BVECS * and %BIOSET_NEED_RESCUER * - * Similar to bioset_create(), but initializes a passed-in bioset instead of - * separately allocating it. + * Description: + * Set up a bio_set to be used with @bio_alloc_bioset. Allows the caller + * to ask for a number of bytes to be allocated in front of the bio. + * Front pad allocation is useful for embedding the bio inside + * another structure, to avoid allocating extra data to go with the bio. + * Note that the bio must be embedded at the END of that structure always, + * or things will break badly. + * If %BIOSET_NEED_BVECS is set in @flags, a separate pool will be allocated + * for allocating iovecs. This pool is not needed e.g. for bio_clone_fast(). + * If %BIOSET_NEED_RESCUER is set, a workqueue is created which can be used to + * dispatch queued requests when the mempool runs out of space. + * */ int bioset_init(struct bio_set *bs, unsigned int pool_size, @@ -1963,45 +1967,6 @@ int bioset_init(struct bio_set *bs, } EXPORT_SYMBOL(bioset_init); -/** - * bioset_create - Create a bio_set - * @pool_size: Number of bio and bio_vecs to cache in the mempool - * @front_pad: Number of bytes to allocate in front of the returned bio - * @flags: Flags to modify behavior, currently %BIOSET_NEED_BVECS - * and %BIOSET_NEED_RESCUER - * - * Description: - * Set up a bio_set to be used with @bio_alloc_bioset. Allows the caller - * to ask for a number of bytes to be allocated in front of the bio. - * Front pad allocation is useful for embedding the bio inside - * another structure, to avoid allocating extra data to go with the bio. - * Note that the bio must be embedded at the END of that structure always, - * or things will break badly. - * If %BIOSET_NEED_BVECS is set in @flags, a separate pool will be allocated - * for allocating iovecs. This pool is not needed e.g. for bio_clone_fast(). - * If %BIOSET_NEED_RESCUER is set, a workqueue is created which can be used to - * dispatch queued requests when the mempool runs out of space. - * - */ -struct bio_set *bioset_create(unsigned int pool_size, - unsigned int front_pad, - int flags) -{ - struct bio_set *bs; - - bs = kzalloc(sizeof(*bs), GFP_KERNEL); - if (!bs) - return NULL; - - if (bioset_init(bs, pool_size, front_pad, flags)) { - kfree(bs); - return NULL; - } - - return bs; -} -EXPORT_SYMBOL(bioset_create); - #ifdef CONFIG_BLK_CGROUP /** diff --git a/include/linux/bio.h b/include/linux/bio.h index 5e472fcafa..810a8bee8f 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -410,14 +410,12 @@ static inline struct bio *bio_next_split(struct bio *bio, int sectors, return bio_split(bio, sectors, gfp, bs); } -extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags); -extern void bioset_exit(struct bio_set *); -extern struct bio_set *bioset_create(unsigned int, unsigned int, int flags); enum { BIOSET_NEED_BVECS = BIT(0), BIOSET_NEED_RESCUER = BIT(1), }; -extern void bioset_free(struct bio_set *); +extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags); +extern void bioset_exit(struct bio_set *); extern int biovec_init_pool(mempool_t *pool, int pool_entries); extern struct bio *bio_alloc_bioset(gfp_t, unsigned int, struct bio_set *); -- 2.17.0