From patchwork Sun May 21 19:47:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Narron X-Patchwork-Id: 9739241 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 7F5026032C for ; Sun, 21 May 2017 19:47:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6879128536 for ; Sun, 21 May 2017 19:47:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C7B2285E2; Sun, 21 May 2017 19:47:10 +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 E0C8128536 for ; Sun, 21 May 2017 19:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752119AbdEUTrI (ORCPT ); Sun, 21 May 2017 15:47:08 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34330 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbdEUTrI (ORCPT ); Sun, 21 May 2017 15:47:08 -0400 Received: by mail-pf0-f193.google.com with SMTP id w69so15219820pfk.1 for ; Sun, 21 May 2017 12:47:08 -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=4MZm0KN7qsuOudIV6HkKg5FZEimFuxbJkU28cCNBY0k=; b=Yzn6EUp4SMfi51JR28WrygxdaP90DFZJsbSK/cHJ8UrLgvjfmuAcysQZ2kcxTwI933 R4rwljMTh82idtvozbpFyScYUit8bf2uR8iCA9dDXMOCkedcM0nqbs7/He780eVMaf2s Sfkjh0R2zDud2THwawsQuD6wPi4WPgVQpuWxi/y6LHn3nGCiodz9nqIyPpsTiazqQAcP iiHqO6NYAEfReHciIZs7MgriV8DyxqY5J1RoBgo6xgfcygdqGR3oNY7hMx0gckS9W9yH MoUEyupoGil3qsKHXpG+ncoY9Lw21mZ+E71qCpmUYA66TONVLtqxQUsiqeqSqtk7HPmr 3sRw== 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=4MZm0KN7qsuOudIV6HkKg5FZEimFuxbJkU28cCNBY0k=; b=qcVZEFdC26XxoQhVDHlH7sT62wHsh+U2zyRW6vqZVotwZQrXUfPGXKcVcIVDWKqv2a M3LbWsfG3BVgexKW3yIM15RyiUVTPxYM/HVSBYaE5P8JWLPXwWg4p4oo3nY8beooXr6p ZALRddKxbjJnEqgUHQRT8iEBv3rbX1GUz5zgKUN7sMY9t56LbQwzeMFCLXLMK4BIKeRW F86FIMW+5o1ZbgK3DrkTsp95nyrumvUE+F+3kNuaDY9zrJWCfrNMHiu4mb0/nUubmpxU Hrc3Ojc+P8qtuNwEvyrAqX9460A3jfogcr1kF1+7F9qhbf1XT1uPw24IvFWroGd6EkvD Ymdw== X-Gm-Message-State: AODbwcBdnydC3PUQP7GrN4sBz6vnkpk5D9phZAIos06DmHwLr3ZLrPPj 677/ZADwNOuwutAu X-Received: by 10.84.174.67 with SMTP id q61mr24630273plb.97.1495396027400; Sun, 21 May 2017 12:47:07 -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 u26sm26188046pfg.24.2017.05.21.12.47.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 May 2017 12:47:06 -0700 (PDT) Date: Sun, 21 May 2017 12:47:01 -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 v2 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 --- 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;