From: Elladan <elladan@eskimo.com>
To: Kasper Dupont <kasperd@daimi.au.dk>
Cc: Alexander Viro <viro@math.psu.edu>,
Peter Chubb <peter@chubb.wattle.id.au>,
Elladan <elladan@eskimo.com>,
Jakob ?stergaard <jakob@unthought.net>,
Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] ext2 and ext3 block reservations can be bypassed
Date: Sun, 12 May 2002 21:51:27 -0700 [thread overview]
Message-ID: <20020512215127.A26807@eskimo.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0205121848080.27629-100000@weyl.math.psu.edu> <3CDF3F92.B3C3A18A@daimi.au.dk>
On Mon, May 13, 2002 at 06:22:42AM +0200, Kasper Dupont wrote:
> Alexander Viro wrote:
> >
> > On Mon, 13 May 2002, Peter Chubb wrote:
> >
> > > This is why in SVr4, struct cred is cloned at open time, and passed
> > > down to each VFS operation.
> >
> > That doesn't work for shared mappings over holes. Unfortunately.
> > Yes, credentials cache a-la 4.4BSD would help in many cases, but
> > we have no reasonably credentials when kswapd writes a dirty page
> > on disk. It _can_ cause allocations. And many processes might've
> > touched that page until it finally got written out - which credentials
> > would you use?
>
> I'd rather have the check done when the page gets dirty in the
> first place. Refuse the CoW if there is not diskspace to write
> it back. Right now we can go beyond the diskspace we are allowed
> to use and we will silently loose data if we go beyond the
> available diskspace.
So, the way this would work (presumably) is that space gets reserved on
the filesystem as soon as the page goes dirty, if space is not presently
allocated for that page. The process would receive a SIGBUS if they
attempt to write to the page, but backing store reservation failed, as
they do when, eg., there's an IO error on a page or some such.
If the mapping was held by more than one process, and one had permission
to dirty the page and the other did not, then whose credentials should
get used would just be a matter of which one writes first. If the disk
is full for users and root dirties the page first, then the user can
re-dirty it. If the user dirties it first, then the user receives
SIGBUS. If the disk is full for everyone, then either one would receive
the signal.
-J
next prev parent reply other threads:[~2002-05-13 4:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <791836807@toto.iv>
2002-05-12 22:04 ` [RFC] ext2 and ext3 block reservations can be bypassed Peter Chubb
2002-05-12 22:53 ` Alexander Viro
2002-05-13 4:22 ` Kasper Dupont
2002-05-13 4:51 ` Elladan [this message]
2002-05-14 19:29 Jesse Pollard
-- strict thread matches above, loose matches on Subject: below --
2002-05-14 18:54 Jesse Pollard
2002-05-14 19:04 ` Alexander Viro
2002-05-14 19:55 ` Mark Mielke
2002-05-14 18:07 Jesse Pollard
2002-05-14 18:00 Jesse Pollard
2002-05-14 17:53 Jesse Pollard
2002-05-14 18:23 ` Mark Mielke
2002-05-14 19:11 ` Alexander Viro
2002-05-12 16:23 Kasper Dupont
2002-05-12 16:42 ` Jakob Østergaard
2002-05-12 17:34 ` Elladan
2002-05-12 18:15 ` Alexander Viro
2002-05-12 18:37 ` Elladan
2002-05-12 19:02 ` Jakob Østergaard
2002-05-12 19:04 ` Mark Mielke
2002-05-13 17:09 ` Horst von Brand
2002-05-13 17:52 ` Elladan
2002-05-13 17:57 ` Christoph Hellwig
2002-05-14 16:22 ` Elladan
2002-05-14 16:55 ` Mark Mielke
2002-05-14 17:47 ` Elladan
2002-05-14 18:51 ` Kasper Dupont
2002-05-15 19:48 ` Pavel Machek
2002-05-15 20:29 ` Alan Cox
2002-05-14 15:40 ` Kasper Dupont
2002-05-14 15:56 ` Mark Mielke
2002-05-14 18:25 ` Kasper Dupont
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=20020512215127.A26807@eskimo.com \
--to=elladan@eskimo.com \
--cc=jakob@unthought.net \
--cc=kasperd@daimi.au.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@chubb.wattle.id.au \
--cc=viro@math.psu.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox