From patchwork Thu Jun 18 09:06:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yangerkun X-Patchwork-Id: 11614073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4BF5614DD for ; Fri, 19 Jun 2020 12:39:09 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E914C20809 for ; Fri, 19 Jun 2020 12:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bVvOvnIM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E914C20809 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592570347; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=w2ywofUdRw9db1pGSOrKyyzoLbHNmFfr3R9U2IPY8kQ=; b=bVvOvnIM4i17IZZF3zmYQnvrVBtr0SKIyaAN94wRTyHQ1buthgemfZ5nPhWJ7AOv7qRy5w 0OOudy1FWVDJly/1f59KG8eFalavBxIquXIUXaU1CasCPxonYFqOP3srj7S9Ea4Ps9Qg9H 27cOxNm4ZASmFS8bkRoZ/3xIAAxHuM0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-37--w-pfzzCNL2Er4lXZ6NTpg-1; Fri, 19 Jun 2020 08:39:03 -0400 X-MC-Unique: -w-pfzzCNL2Er4lXZ6NTpg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11BCA64ACA; Fri, 19 Jun 2020 12:38:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C67C67166A; Fri, 19 Jun 2020 12:38:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 42196833D0; Fri, 19 Jun 2020 12:38:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05I95VUD029486 for ; Thu, 18 Jun 2020 05:05:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 65DE02029F6F; Thu, 18 Jun 2020 09:05:31 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5DFE82029F62 for ; Thu, 18 Jun 2020 09:05:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 75E37811E7A for ; Thu, 18 Jun 2020 09:05:28 +0000 (UTC) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-430-nGMzbv_yNkW2lXuXdwTilQ-1; Thu, 18 Jun 2020 05:05:23 -0400 X-MC-Unique: nGMzbv_yNkW2lXuXdwTilQ-1 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A43AEBB80D7592E77E70; Thu, 18 Jun 2020 17:05:19 +0800 (CST) Received: from code-website.localdomain (10.175.127.227) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 18 Jun 2020 17:05:08 +0800 From: yangerkun To: , , , Date: Thu, 18 Jun 2020 17:06:18 +0800 Message-ID: <20200618090620.3517530-1-yangerkun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 05I95VUD029486 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Fri, 19 Jun 2020 08:38:54 -0400 Cc: dm-devel@redhat.com, yangerkun@huawei.com Subject: [dm-devel] [PATCH v2 0/2] introduce interface to list all badblocks 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com This patchset will list badblocks while we do 'dmsetup status'. Image that we have mark block 1 and 2 as bad block, run following command will list all bad blocks: $ sudo dmsetup status dust1 0 33552384 dust 252:17 bypass verbose badblocks list: 1 2 v1->v2: Realize this logical in dust_status instead dust_message since the result can return to user directly. yangerkun (2): dm dust: list badblock in dust_status dm dust: introduce list badblocks in the rst .../admin-guide/device-mapper/dm-dust.rst | 14 +++++++++++ drivers/md/dm-dust.c | 25 +++++++++++++++++++ 2 files changed, 39 insertions(+)