OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_66-1-g70c8dea
Gerrit Code Review
gerrit@openafs.org
Sat, 24 Oct 2009 17:19:18 -0700 (PDT)
The following commit has been merged in the master branch:
commit 70c8deab1694e2cd200f4ff7a81f5f3f028a4c19
Author: Simon Wilkinson <sxw@inf.ed.ac.uk>
Date: Sat Oct 24 10:54:32 2009 +0100
Use user credentials for Linux writepage()
We have no control over the context in which the kernel calls our
writepage routine. It may be from the process which original wrote the
page, from any other process on the system which is writing and goes
over the dirty page threshold, or from the flush thread (pdflush /
flush-afs). Therefore, we cannot use the credentials of the current
process to perform the writeback. This is an issue both for afs_write
(which, in our current MM model, may need to contact the fileserver
to read missing chunks), and for DoPartialWrite (which needs to be
able to store chunks when the local cache is getting full)
This patch stores the credentials of the first process to open a file in
the vcache structure. Whenever writepage() is used to writeback pages
for this file, the cached credentials are used rather than those of the
current context.
Thanks to Marc Dionne for his work in testing and refining this patch.
FIXES 125471
Change-Id: I2900f711150fd81b2b4839bbc2bf77623bde3b64
Reviewed-on: http://gerrit.openafs.org/724
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c | 60 ++++++++++++++++++++++++++++++++++++-----
src/afs/VNOPS/afs_vnop_open.c | 2 +-
src/afs/afs.h | 3 ++
src/afs/afs_vcache.c | 3 ++
4 files changed, 60 insertions(+), 8 deletions(-)
--
OpenAFS Master Repository