Return-Path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:32857 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbdFHAfh (ORCPT ); Wed, 7 Jun 2017 20:35:37 -0400 Received: by mail-pf0-f195.google.com with SMTP id f27so3150960pfe.0 for ; Wed, 07 Jun 2017 17:35:36 -0700 (PDT) Date: Wed, 7 Jun 2017 17:35:31 -0700 (PDT) From: Richard Narron To: Al Viro cc: Linus Torvalds , Will B , linux-fsdevel , Evgeniy Dushistov Subject: Re: UFS s_maxbytes bogosity In-Reply-To: <20170607234837.GA20362@ZenIV.linux.org.uk> Message-ID: References: <20170604213736.GM6365@ZenIV.linux.org.uk> <20170604215838.GA24416@ZenIV.linux.org.uk> <20170604220602.GN6365@ZenIV.linux.org.uk> <20170605001142.GP6365@ZenIV.linux.org.uk> <20170605034936.GQ6365@ZenIV.linux.org.uk> <20170607234837.GA20362@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 8 Jun 2017, Al Viro wrote: > On Mon, Jun 05, 2017 at 04:49:36AM +0100, Al Viro wrote: > >> Grrr... OK, I'll put together a patch fixing that idiocy. As it is, rw mounts >> of ufs on-disk ->i_blocks not updated and, AFAICS, can lead to disk space leaks >> on inode deletion. > > Turns out it's even worse than that, and some of the breakage in there is my fault. > I'll fix what I can, but for now I would suggest > * making UFS_FS_WRITE depend on BROKEN; it had always been experimental, > but since 2010 it had been actively buggering filesystems (aforementioned Jan's > bug + a bug of mine in 2015 series). I'll fix that stuff, but I'd expect > it to take a month or so, including serious testing. I have set the things up > for such testing (which has promptly caught all kinds of fun), but we are at -rc4 > now, so it'll probably be the next cycle fodder, with interesting backporting > afterwards. > * for ->s_maxbytes, let's go with tree-imposed limit. Proper way of > dealing with ->i_blocks overflows is -ENOSPC when attempt to grab a block would've > caused such an overflow. > * If Evgeniy can resurface and take part in that fun, I'd be happy to help. > If not, well... guess I'll take the thing over until somebody willing to adopt it > comes along. I am willing to test. I just turned on UFS_FS_WRITE for the very first time running 4.12-rc4 and was able to copy a file of more than 2GB from one r/o FreeBSD subpartition to another r/w FreeBSD subpartition. So it is already looking pretty good. I did notice an ->i_blocks bug where it was set to zero on the output file instead of the actual block count. This showed up when I poped over to FreeBSD 11.0 and did an fsck on the r/w subpartition.