Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754122AbdFSPd5 (ORCPT ); Mon, 19 Jun 2017 11:33:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44582 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbdFSPdz (ORCPT ); Mon, 19 Jun 2017 11:33:55 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Richard Narron , Christoph Hellwig , Jens Axboe Subject: [PATCH 3.18 02/32] partitions/msdos: FreeBSD UFS2 file systems are not recognized Date: Mon, 19 Jun 2017 23:20:46 +0800 Message-Id: <20170619152035.858329941@linuxfoundation.org> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170619152035.750974520@linuxfoundation.org> References: <20170619152035.750974520@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1376 Lines: 44 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Richard commit 223220356d5ebc05ead9a8d697abb0c0a906fc81 upstream. 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 Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/partitions/msdos.c | 2 ++ 1 file changed, 2 insertions(+) --- a/block/partitions/msdos.c +++ b/block/partitions/msdos.c @@ -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;