From patchwork Fri Jan 20 11:15:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 9527991 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 3300860434 for ; Fri, 20 Jan 2017 11:19:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25C2F285B9 for ; Fri, 20 Jan 2017 11:19:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AA4F285F5; Fri, 20 Jan 2017 11:19:25 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 CAE5D285B9 for ; Fri, 20 Jan 2017 11:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdATLTU (ORCPT ); Fri, 20 Jan 2017 06:19:20 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:1301 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbdATLTH (ORCPT ); Fri, 20 Jan 2017 06:19:07 -0500 Received: from 172.24.1.60 (EHLO szxeml422-hub.china.huawei.com) ([172.24.1.60]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DTP94524; Fri, 20 Jan 2017 19:15:39 +0800 (CST) Received: from huawei.com (10.175.124.28) by szxeml422-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.235.1; Fri, 20 Jan 2017 19:15:37 +0800 From: Hou Tao To: , CC: , , , Subject: [PATCH RFC 2/4] dm thin: parse "keep_bio_blkcg" from userspace tools Date: Fri, 20 Jan 2017 19:15:50 +0800 Message-ID: <1484910952-29820-3-git-send-email-houtao1@huawei.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1484910952-29820-1-git-send-email-houtao1@huawei.com> References: <1484910952-29820-1-git-send-email-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090206.5881F15C.0045, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: da33ed9e40818dc0391339516778a8b8 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP keep_bio_blkcg feature is off by default, and it can be turned on by using "keep_bio_blkcg" argument. Signed-off-by: Hou Tao --- drivers/md/dm-thin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 8178ee8..57d6202 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2824,6 +2824,7 @@ static void pool_features_init(struct pool_features *pf) pf->discard_enabled = true; pf->discard_passdown = true; pf->error_if_no_space = false; + pf->keep_bio_blkcg = false; } static void __pool_destroy(struct pool *pool) @@ -3053,7 +3054,7 @@ static int parse_pool_features(struct dm_arg_set *as, struct pool_features *pf, const char *arg_name; static struct dm_arg _args[] = { - {0, 4, "Invalid number of pool feature arguments"}, + {0, 5, "Invalid number of pool feature arguments"}, }; /* @@ -3085,6 +3086,9 @@ static int parse_pool_features(struct dm_arg_set *as, struct pool_features *pf, else if (!strcasecmp(arg_name, "error_if_no_space")) pf->error_if_no_space = true; + else if (!strcasecmp(arg_name, "keep_bio_blkcg")) + pf->keep_bio_blkcg = true; + else { ti->error = "Unrecognised pool feature requested"; r = -EINVAL;