From patchwork Tue Jun 14 21:33:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 9176981 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 24C1260573 for ; Tue, 14 Jun 2016 21:32:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16BB228335 for ; Tue, 14 Jun 2016 21:32:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B1B828337; Tue, 14 Jun 2016 21:32:22 +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, UNPARSEABLE_RELAY 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 961F228335 for ; Tue, 14 Jun 2016 21:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388AbcFNVcS (ORCPT ); Tue, 14 Jun 2016 17:32:18 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38588 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbcFNVcR (ORCPT ); Tue, 14 Jun 2016 17:32:17 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5ELWDCD015395 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jun 2016 21:32:13 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u5ELWDZn020446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jun 2016 21:32:13 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u5ELWCS0027304; Tue, 14 Jun 2016 21:32:12 GMT Received: from localhost.us.oracle.com (/10.211.47.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Jun 2016 14:32:12 -0700 From: Liu Bo To: linux-btrfs@vger.kernel.org Cc: Eryu Guan , David Sterba Subject: [PATCH] Btrfs: let super_stripesize match with sectorsize Date: Tue, 14 Jun 2016 14:33:43 -0700 Message-Id: <1465940023-27773-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.5.5 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Right now stripesize is set to 4096 while sectorsize is set to max(4096, pagesize). However, kernel requires super_stripesize to match with sectorsize. Reported-by: Eryu Guan Signed-off-by: Liu Bo --- mkfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkfs.c b/mkfs.c index a3a3c14..8d00766 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1482,6 +1482,8 @@ int main(int argc, char **argv) } sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE)); + stripesize = sectorsize; + saved_optind = optind; dev_cnt = argc - optind; if (dev_cnt == 0)