From patchwork Fri May 26 04:52:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Narron X-Patchwork-Id: 9749695 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 C25E160246 for ; Fri, 26 May 2017 04:52:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACEF6283BB for ; Fri, 26 May 2017 04:52:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0940283CD; Fri, 26 May 2017 04:52:57 +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 AD87C283BB for ; Fri, 26 May 2017 04:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939818AbdEZEwy (ORCPT ); Fri, 26 May 2017 00:52:54 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36015 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752520AbdEZEwx (ORCPT ); Fri, 26 May 2017 00:52:53 -0400 Received: by mail-pf0-f193.google.com with SMTP id n23so88483pfb.3 for ; Thu, 25 May 2017 21:52:52 -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=FVsX9nMjzP/zBDivvG/0q/X49v76CYSITd06Nmh+n8Q=; b=dR9ZMNDJnaEaEOnMdm0icuRLtVH+8Kaq2OwmZudw3tKdjZXm6kGvzVeUKTTe1ThUkn x+UnyBb+DIPLbOxxg2oW0a0bLPqQK2kHvhDycNgg25aQJSG8QeJx6Pt9cQ291HnYQGlL CUlXhIg+Nd6ci1DTWqY+ZPPtV5ivSU2vvj8xCZ/tm7QPdEfX7ryNcxpKvFhbznX4a/ks 7vvMImyPDq8QpQhh63YOFWRj5ytdSxFapAUoJUVVdgBh4TpEEw8HaUQqp+eo7iGbT4T4 uiFwUm8+8i20weXFCw2AarjcnGu8aeHQSlsnsmC4OEip+KL47aHMX6zB+V1jz6RjUXWx ZgrQ== 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=FVsX9nMjzP/zBDivvG/0q/X49v76CYSITd06Nmh+n8Q=; b=g9GzLFgkssNBrEMTjRLr45JqewCOdTUMgoO5OnTiLeQfmBfEgErWdmw8bgNDTNOirg qLtNtzf3NofG7540BFsePEynF0Xd/v7jqQ7odU4H33Ilni7sfUF3D1d6N8l6M1ON085t cLlQwr+1mXl8f51m0cQvydcoA85/upQavl1mH1SIW+crPvYSPDhTldZIwNt8+MRAQCpK T71QUAZch3drjBdio2Qy/Twyf6XGX93hostVP+IPxxfYVixjJCfHktgLWtPHkiTxByOg 3ns5Y7jnkNGKv7XM44w07inU4BttdLa2rlqmRCc4vxYfsHhoRTxNsGCNlvAVASaAy0sf 0ZBg== X-Gm-Message-State: AODbwcAiLlJNap5VFczY0GL8MPO7XcOSmv9SGM+PNVthQDN3MaA1IVRp ApV/i3vYaz8Vg9QAnII= X-Received: by 10.99.43.150 with SMTP id r144mr55893pgr.114.1495774372278; Thu, 25 May 2017 21:52:52 -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 q25sm22020131pgn.9.2017.05.25.21.52.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 21:52:51 -0700 (PDT) Date: Thu, 25 May 2017 21:52:50 -0700 (PDT) From: Richard Narron X-X-Sender: comet.berkeley@joy.test To: linux-block@vger.kernel.org cc: Christoph Hellwig , Jens Axboe , Andries Brouwer Subject: [PATCH v3 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: Cc: Andries Brouwer Cc: linux-block@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Richard Narron --- Changelog v2->v3: - Add Cc: Changelog v1->v2: - Improve style, use += --- 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 += offset; if (offset == bsd_start && size == bsd_size) /* full parent partition, we have it already */ continue;