All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Richard Narron <comet.berkeley@gmail.com>,
	Will B <will.brokenbourgh2877@gmail.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: UFS s_maxbytes bogosity
Date: Mon, 5 Jun 2017 04:49:36 +0100	[thread overview]
Message-ID: <20170605034936.GQ6365@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFzbLrVn0p6a7MSYzPK+PsL5TpofDMoxyrtZW5mZSkukBg@mail.gmail.com>

On Sun, Jun 04, 2017 at 08:00:26PM -0700, Linus Torvalds wrote:
> On Sun, Jun 4, 2017 at 5:11 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > For UFS2 - yes, for UFS1 we have another hard limit I'd missed.  i_blocks
> > is in half-kilobyte units there and it's 32bit on-disk.  So for UFS1 I'd
> > cap it with 1Tb (the real limit is ~ 2Tb - 2Mb, but accurate calculation
> > is a bit of a bother).  Come to think of that, the minimal block size for
> > UFS1 is 4K with pointers-per-block >= 1024.  So tree-imposed limit is
> > no lower than 1024^3*4096, i.e. greater than that and we could make
> > ->s_maxbytes unconditional 1Tb for UFS1.
> 
> The nblocks limit (and the 32-bit block numbers) might not limit a
> sparse file, so I think the tree-imposed limit might be the final true
> limit even on UFS1, no?

Yes, but... where would we notice that overflow on allocation?  Matter of fact...
<looks>
<starts swearing>
commit 8f45c33decf62e1aaaa9411aae8fef6a38f95845
Author: Jan Kara <jack@suse.cz>
Date:   Thu May 20 16:00:36 2010 +0200

    ufs: Remove dead quota code
    
    UFS quota is non-functional at least since 2.6.12 because dq_op was set
    to NULL. Since the filesystem exists mainly to allow cooperation with Solaris
    and quota format isn't standard, just remove the dead code.
    
    CC: Evgeniy Dushistov <dushistov@mail.ru>
    Signed-off-by: Jan Kara <jack@suse.cz>
<swears some more>

Jan?  You do realize that "non-functional" or not, dquot_alloc_block() updates
->i_bytes/->i_blocks, right?  And removing that should've had the updates put
back explicitly...

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.

  reply	other threads:[~2017-06-05  3:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-04 19:31 UFS s_maxbytes bogosity Linus Torvalds
2017-06-04 21:37 ` Al Viro
2017-06-04 21:58   ` Al Viro
2017-06-04 22:06     ` Al Viro
2017-06-04 23:26       ` Linus Torvalds
2017-06-05  0:11         ` Al Viro
2017-06-05  3:00           ` Linus Torvalds
2017-06-05  3:49             ` Al Viro [this message]
2017-06-07 23:48               ` Al Viro
2017-06-08  0:35                 ` Richard Narron
2017-06-08  2:20                   ` Al Viro
2017-06-08 22:15                     ` Al Viro
2017-06-08 22:36                       ` Linus Torvalds
2017-06-09  0:11                     ` Richard Narron
2017-06-09  3:35                       ` Al Viro
2017-06-09 17:34                         ` Al Viro
2017-06-09 21:55                         ` Richard Narron
2017-06-10  0:09                         ` Richard Narron
2017-06-04 22:32     ` Theodore Ts'o
2017-06-05  0:02       ` Al Viro
2017-06-04 23:23 ` [PATCH 1/1] fs/ufs: Set UFS default maximum bytes per file Richard Narron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170605034936.GQ6365@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=comet.berkeley@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=will.brokenbourgh2877@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.