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: 9527979 X-Patchwork-Delegate: snitzer@redhat.com 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 50CC960434 for ; Fri, 20 Jan 2017 11:17:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38507285ED for ; Fri, 20 Jan 2017 11:17:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29EA928609; Fri, 20 Jan 2017 11:17:15 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76D31285ED for ; Fri, 20 Jan 2017 11:17:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0KBFvF2040340; Fri, 20 Jan 2017 06:15:57 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v0KBFtxq016905 for ; Fri, 20 Jan 2017 06:15:55 -0500 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0KBFtGf026108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 20 Jan 2017 06:15:55 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DCC476E4; Fri, 20 Jan 2017 11:15:49 +0000 (UTC) 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: , Date: Fri, 20 Jan 2017 19:15:51 +0800 Message-ID: <1484910952-29820-4-git-send-email-houtao1@huawei.com> 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 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 200 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 20 Jan 2017 11:15:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 20 Jan 2017 11:15:51 +0000 (UTC) for IP:'119.145.14.65' DOMAIN:'szxga02-in.huawei.com' HELO:'szxga02-in.huawei.com' FROM:'houtao1@huawei.com' RCPT:'' X-RedHat-Spam-Score: -5.1 (BAYES_50, DCC_REPUT_00_12, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SPF_PASS) 119.145.14.65 szxga02-in.huawei.com 119.145.14.65 szxga02-in.huawei.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-loop: dm-devel@redhat.com Cc: ejt@redhat.com, snitzer@redhat.com, agk@redhat.com, vgoyal@redhat.com Subject: [dm-devel] [PATCH RFC 3/4] dm thin: show the enabled status of keep_bio_blkcg feature X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com 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