Date: Mon, 18 Apr 2011 23:13:38 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Kostik Belousov <kostikbel@gmail.com> Cc: svn-src-head@freebsd.org, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys Message-ID: <20110418211338.GE3097@garage.freebsd.pl> In-Reply-To: <20110418201302.GY48734@deviant.kiev.zoral.com.ua> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> <BANLkTi=A-C6PY%2B5VSbigQpLKLVJYQ2b2Mg@mail.gmail.com> <20110418201302.GY48734@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--9l24NVCWtSuIVIod Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2011 at 11:13:02PM +0300, Kostik Belousov wrote: > > The need is, as commented, to return EFBIG when the new file size will > > be larger than the FS supports. Without this code, passing in > > something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem > > out of space. > Handling max file size and not overflowing the fs are different things. > VOP_WRITE() will handle file size on its own too. I see no problem with > exhausting free space if this is what user asked for. This makes me wonder that current implementation isn't atomic. If we get out of space error, we won't shrink the file back. Even if we could shirk it at the end, we won't be able to put holes in the middle of it. Not sure if this is a big issue, but one doesn't expect from rename(2) to create new link and not remove old one. All in all, making it atomic would be impossible currently for various reasons (we can't put holes back and we can crash in the middle). --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --9l24NVCWtSuIVIod Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2sqYIACgkQForvXbEpPzTjGQCfSbyqXKuJ9xea+AywbJunzN4N 2B0AnRr26vcLXlffiUIRKWS6JFt8eOP7 =/LJv -----END PGP SIGNATURE----- --9l24NVCWtSuIVIod--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110418211338.GE3097>