Messages in this thread | | | Date | Fri, 10 Oct 2003 11:05:08 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: statfs() / statvfs() syscall ballsup... |
| |
On Fri, 10 Oct 2003, Trond Myklebust wrote: > > Apart from O_DIRECT, we have nothing in the kernel as it stands that > will allow userland to deal with this case.
Oh, but that's just another case of the general notion of allowing people to control the page cache a bit more.
There's nothing wrong with having kernel interfaces that say "this region is potentially stale" or "this region is dirty" or "this region is not needed any more".
For example, using DIRECT_IO to make sure that something is uptodate is just _stupid_, because clearly it only matters to shared-disk (either over networks/FC or though things like SCSI device sharing) setups. So now the app has to have a way to query for whether the storage is shared, and have two totally different code-paths depending on the answer.
This is another example of a bad design, that ends up causing more problems (remember why this thread started in the first place: bad design of O_DIRECT causing the app to have to care about something _else_ it shouldn't care about. At all).
If you had a "this region is stale" thing, you'd just use it. And if it was local disk, it wouldn't do anything.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |