From patchwork Wed Aug 27 08:18:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liuhua Wang X-Patchwork-Id: 4786751 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4BD94C0338 for ; Wed, 27 Aug 2014 08:27:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90FEB20109 for ; Wed, 27 Aug 2014 08:26:59 +0000 (UTC) Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mail.kernel.org (Postfix) with ESMTP id 3239C200D0 for ; Wed, 27 Aug 2014 08:26:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7R8MdHI023798; Wed, 27 Aug 2014 04:22:40 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s7R8MckL008184 for ; Wed, 27 Aug 2014 04:22:38 -0400 Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7R8MbKm005008 for ; Wed, 27 Aug 2014 04:22:37 -0400 Received: from victor.provo.novell.com (victor.provo.novell.com [137.65.250.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7R8MZXN014526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 27 Aug 2014 04:22:36 -0400 Received: from wlh-host.lab.bej.apac.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by victor.provo.novell.com with ESMTP (NOT encrypted); Wed, 27 Aug 2014 02:22:24 -0600 From: Liuhua Wang To: dm-devel@redhat.com Date: Wed, 27 Aug 2014 16:18:25 +0800 Message-Id: <1409127505-5246-1-git-send-email-lwang@suse.com> X-RedHat-Spam-Score: -4.201 (BAYES_00,RCVD_IN_DNSWL_MED,SPF_PASS) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.21 X-loop: dm-devel@redhat.com Cc: nfbrown@suse.com Subject: [dm-devel] [PATCH] fix mirror device creation with lvcreate failed X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On some devices, when create mirror device with lvcreate, it fails. device-mapper: reload ioctl on failed: Invalid argument Failed to activate new LV. We can use read size 4096 since md always use 4096. Signed-off-by: Liuhua Wang --- drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 4880b69..621afbb 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -860,7 +860,7 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev) rdev->sb_start = 0; rdev->sb_size = sizeof(*sb); - ret = read_disk_sb(rdev, rdev->sb_size); + ret = read_disk_sb(rdev, 4096); if (ret) return ret;