Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:38220 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbdFDVhj (ORCPT ); Sun, 4 Jun 2017 17:37:39 -0400 Date: Sun, 4 Jun 2017 22:37:36 +0100 From: Al Viro To: Linus Torvalds Cc: Richard Narron , Will B , linux-fsdevel Subject: Re: UFS s_maxbytes bogosity Message-ID: <20170604213736.GM6365@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Jun 04, 2017 at 12:31:34PM -0700, Linus Torvalds wrote: > and in particular the patch in there that just makes UFS use MAX_LFS_FILESIZE: > > https://bugzilla.kernel.org/attachment.cgi?id=256853&action=diff > I'm inclined to just apply it, since clearly the default 2G limit > isn't appropriate for UFS, although it would perhaps be a good idea to > figure out just what the true UFS maximum file size can be.. The > on-disk "ui_size" field seems to be a 64-bit entity, so > MAX_LFS_FILESIZE is certainly better, but there's probably some index > tree limit that depends on the block size or whatever. Depends. There had been a lot of UFS variants (hell, ext2 is one), so limits differ. They are also kernel-dependent. One hard limit is the same as in ext2 - indirect blocks contain pointers to blocks, so you get (10 + n + n^2 + n^3)*block_size, where n is block_size / pointer size. For UFS pointers are 32bit (UFS2 is trickier, but we don't support that). Another pile of fun is VM-related and that varies from kernel to kernel. FWIW, current FreeBSD has no problems with that (32bit included), but there had been 4.4BSD variants that used to.