From patchwork Fri Jan 20 11:15:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 9527989 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 245A760463 for ; Fri, 20 Jan 2017 11:19:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17224285B9 for ; Fri, 20 Jan 2017 11:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C350285ED; Fri, 20 Jan 2017 11:19:23 +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 B2FCB285FC for ; Fri, 20 Jan 2017 11:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840AbdATLTU (ORCPT ); Fri, 20 Jan 2017 06:19:20 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:1300 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbdATLTH (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 DTP94526; Fri, 20 Jan 2017 19:15:40 +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:38 +0800 From: Hou Tao To: , CC: , , , Subject: [PATCH RFC 3/4] dm thin: show the enabled status of keep_bio_blkcg feature Date: Fri, 20 Jan 2017 19:15:51 +0800 Message-ID: <1484910952-29820-4-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.0A090201.5881F15C.0049, 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: beeb27adaa81160e6fcfa948aa0210c7 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 If keep_bio_blkcg feature is enabled, we can ensure that by STATUSTYPE_TABLE or STATUSTYPE_INFO command. Signed-off-by: Hou Tao --- drivers/md/dm-thin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 57d6202..140cdae 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -3760,7 +3760,7 @@ static void emit_flags(struct pool_features *pf, char *result, { unsigned count = !pf->zero_new_blocks + !pf->discard_enabled + !pf->discard_passdown + (pf->mode == PM_READ_ONLY) + - pf->error_if_no_space; + pf->error_if_no_space + pf->keep_bio_blkcg; DMEMIT("%u ", count); if (!pf->zero_new_blocks) @@ -3777,6 +3777,9 @@ static void emit_flags(struct pool_features *pf, char *result, if (pf->error_if_no_space) DMEMIT("error_if_no_space "); + + if (pf->keep_bio_blkcg) + DMEMIT("keep_bio_blkcg "); } /* @@ -3885,6 +3888,9 @@ static void pool_status(struct dm_target *ti, status_type_t type, else DMEMIT("queue_if_no_space "); + if (pool->pf.keep_bio_blkcg) + DMEMIT("keep_bio_blkcg "); + if (dm_pool_metadata_needs_check(pool->pmd)) DMEMIT("needs_check "); else