From owner-freebsd-fs@FreeBSD.ORG Sun Jun 23 10:29:23 2013 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5CF56207 for ; Sun, 23 Jun 2013 10:29:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 0E64C17D8 for ; Sun, 23 Jun 2013 10:29:22 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id F3A14121A09; Sun, 23 Jun 2013 20:29:13 +1000 (EST) Date: Sun, 23 Jun 2013 20:29:07 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: gabor@zahemszky.hu Subject: Re: ext2fs bug In-Reply-To: <9554b1ed02a342c347b17a2e71e38b73@zahemszky.hu> Message-ID: <20130623200524.Q2646@besplex.bde.org> References: <9554b1ed02a342c347b17a2e71e38b73@zahemszky.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=K8x6hFqI c=1 sm=1 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=z8ET0h8izKQA:10 a=_Ewsh7-fr2BQT7zXL60A:9 a=CjuIK1q_8ugA:10 a=6DVhyThRLIsPgGPl:21 a=GB2nAgaG2CrPr4dT:21 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 Cc: freebsd-fs@FreeBSD.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jun 2013 10:29:23 -0000 On Sun, 23 Jun 2013 gabor@zahemszky.hu wrote: > I've got 2 disks (a 1TB and a 2TB), these disk were written under Linux 2.4. > I can mount them under FreeBSD, and I can reach about half of the files, but > on some files, I only get some FS errors. In dmesg, I can see the following > errors: It's very broken at 1TB, since it is still using a quick fix from 2002 that preserved the old limit of signed 32-bit block numbers at the vfs level when that limit was increased to 64 bits. > g_vfs_done():ada2s1[READ(offset=-756558786560, length=4096)]error = 5 > g_vfs_done():ada2s1[READ(offset=-899189821440, length=4096)]error = 5 > ... The brokeness includes not refusing to mount file systems that are too large to work. I wouldn't risk mounting read-writes file systems that are too large to work. 1TB should work though. That's in real TB (2**40 bytes). ext2fs also has internal 32-bit block numbers. With a block size of 4K, this should give a limit of 16TB, but FreeBSD uses negative block numbers magically, so the limit will be 8TB after the main bugs are fixed. With a block size of 1K, the limit will be 2TB. Bruce