Re: Q about pagecache data never written to disk

From: Andrey Savochkin
Date: Mon Sep 06 2004 - 02:10:43 EST


On Sun, Sep 05, 2004 at 02:00:40PM -0700, Andrew Morton wrote:
> Andrey Savochkin <saw@xxxxxxxxxxxxx> wrote:
> > On Sun, Sep 05, 2004 at 03:52:33AM -0700, Andrew Morton wrote:
> > > That would be a retrograde step - it would be nice to move in the other
> > > direction: perform disk allocation at writeback time rather than at write()
> > > time, even for regular write() data. To do that we (probably) need space
> > > reservation APIs. And yes, we perhaps could reserve space in the
> > > filesystem when that page is first written to.
> > >
> > > But then what would we do if there's no space? SIGBUS? SIGSEGV?
> > > Inappropriate. SIGENOSPC?
> >
> > Should the space be allocated on close()?
>
> What effect are you trying to achieve?

Sending a signal while there is still a process...

> > Who will get the signal if nobody accesses the file anymore?
>
> Nobody. That's the point. Plus there _is_ no signal defined for this.
> Neither in Linux nor in POSIX.
>
> > I'm also thinking about various shell scripts with redirects to files...
>
> ? I doubt that they're writing files via MAP_SHARED.

I was deliberating on your idea about delayed allocation for regular write()s
also...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/