>
> [...]
>
> 5. One way or another, life is now hard.
Indeed. In brief, ->nopage just doesn't provide adequate coverage to support
the cross-host lock.
> One solution would be for the distributed filesystem to hold
> onto a lock or semaphore upon return from the nopage function.
> The problem is that there is no way to determine (in a timely
> fashion) when it safe to release this lock or semaphore.
>
> The attached patch addresses this by adding a nopagedone
> function for when do_no_page() exits. The filesystem may then
> drop the lock or semaphore in this nopagedone function.
>
> Thoughts? Is there some other existing way to get this done?
There is. One way is to make all of do_no_page a hook, and clearly this is
more generic than what you proposed, since it covers your hook and the rest
can be done with library calls. Once you've gone there, the next question to
ask is "what use is the existing ->nopage" hook, and the answer is: none,
really. The existing usage of ->nopage can be replaced by ->do_no_page plus
library code, and the only problem is, we have to change pretty well every
filesystem in and out of tree. So that gets a little, em, interesting from
the 2.6.0 point of view, which is why I cc'd Andrew on this. Christoph has
also expressed interest in this, which explains the other cc.
Any clustered filesystem that wants to support posix mmap is going to need
this hook, so the sooner we hash this out, the better.
Regards,
Daniel
-
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/