From patchwork Thu May 18 01:28:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Narron X-Patchwork-Id: 9732251 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 87B4E600CC for ; Thu, 18 May 2017 01:28:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C356286E7 for ; Thu, 18 May 2017 01:28:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31172287CF; Thu, 18 May 2017 01:28:58 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 D2B60286E7 for ; Thu, 18 May 2017 01:28:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754696AbdERB25 (ORCPT ); Wed, 17 May 2017 21:28:57 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33596 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753970AbdERB24 (ORCPT ); Wed, 17 May 2017 21:28:56 -0400 Received: by mail-pf0-f194.google.com with SMTP id f27so3754822pfe.0 for ; Wed, 17 May 2017 18:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=LCXffsMv30+7xEX0YMeLjcSkLrF/Twy2/I2239JD/p4=; b=GW6Fy75y2w/k7zbpa3Q7Bp9dYcskHzfdswMYgilmV16B1jl8x3H6bVRJrlXO8oycm1 JFjoN0ruVXqevBUtvV+Ozy7nqhQt3lhBRsbWdepgAIkXlr7fXxt1qsSFlDh30PHbC2EG RGmFnnym3+Fd/lFCrJkEK9nY8IDR0xsVTCVy1MwLsoY4/IiqwPhXw1ygCB1JCTJf5c3k bbjnjFAFf0+UguRRKtpsZn3Db//ajrFzB9ax9pYF/Zde11aEWN8chT6a6gfPmrwqdSgO l/DkEBJ1dSGuifaquQT72GZnHs7gZ2KFx0yaZ8NT5M0++PeJ6yVTy3MaEFsefCXOVz7N 8rfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=LCXffsMv30+7xEX0YMeLjcSkLrF/Twy2/I2239JD/p4=; b=Ej5f9rIBy7BnfhYSmdNpk5MYC6+KMwQJkTnlI1PgX8JmTMIYgoUHfmRa916RZ1So6Y DfyxdvPAY5BA7dHSGAysIfOPMJA0JBKqd6woHUof92uZBkYaye8eJm15JCyiEIZAduQh M5EhucWzo3N9bBbIzccZ66+5W7qckqlqYqyLJxsLLHZvMEcV7AeY+CmSmwdtmSXPXuvj jCr+Hg0jAvddEwqKx4nT5y7fjGlhtCo0P8b9OfYQs79cYGfTQdaQ6orz7OKXwup4mgij 7uC589hTZMQ95jvudqPoZ7zADJCkP53l4grHg5/u/IlVD++Yd0ATZ3itoMIYOLYALS4h BACQ== X-Gm-Message-State: AODbwcCiuBW96iZ4DqfxtOf/fbqEX8EVf5LmVRsCmOmYQZxZQLiYiwMo yfx93yAN4JXK30Tibe4= X-Received: by 10.84.217.218 with SMTP id d26mr1772559plj.47.1495070935161; Wed, 17 May 2017 18:28:55 -0700 (PDT) Received: from joy.test (107-204-215-49.lightspeed.sntcca.sbcglobal.net. [107.204.215.49]) by smtp.gmail.com with ESMTPSA id w85sm5768690pfk.62.2017.05.17.18.28.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 18:28:54 -0700 (PDT) Date: Wed, 17 May 2017 18:28:53 -0700 (PDT) From: Richard Narron X-X-Sender: comet.berkeley@joy.test To: linux-block@vger.kernel.org cc: Andries Brouwer Subject: [Patch 1/1] partitions/msdos: FreeBSD UFS2 file systems are not recognized Message-ID: User-Agent: Alpine 2.21 (LNX 202 2017-01-01) MIME-Version: 1.0 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 The code in block/partitions/msdos.c recognizes FreeBSD, OpenBSD and NetBSD partitions and does a reasonable job picking out OpenBSD and NetBSD UFS subpartitions. But for FreeBSD the subpartitions are always "bad". Kernel: Reviewed-by: Christoph Hellwig --- block/partitions/msdos.c | 2 ++ 1 file changed, 2 insertions(+) --- a/block/partitions/msdos.c 2015-12-27 18:17:37.000000000 -0800 +++ b/block/partitions/msdos.c 2015-12-29 10:44:25.813773357 -0800 @@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_part continue; bsd_start = le32_to_cpu(p->p_offset); bsd_size = le32_to_cpu(p->p_size); + if (memcmp(flavour, "bsd\0", 4) == 0) + bsd_start = bsd_start + offset; if (offset == bsd_start && size == bsd_size) /* full parent partition, we have it already */ continue;