summaryrefslogtreecommitdiff
path: root/fs/nfs/objlayout
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2010-07-14 15:43:57 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2011-05-29 20:54:36 +0300
commit8a1636c459cb7a4b32ba4024cd1b2ba21fba6aed (patch)
treef9c46f272b98ceb65f997f226d47da68c6fcac6b /fs/nfs/objlayout
parentcbe8260369c9f88eafa035cd327dc3e02fad528c (diff)
pnfs: layoutret_on_setattr
With the objects layout security model, we have object capabilities that are associated with the layout and we anticipate that the server will issue a cb_layoutrecall for any setattr that changes security related attributes (user/group/mode/acl) or truncates the file. Therefore, the layout is returned before issuing the setattr to avoid the anticipated cb_layoutrecall. Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/objlayout')
-rw-r--r--fs/nfs/objlayout/objio_osd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index cc92d3b3dc3a..4e8de3ec9a63 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -964,6 +964,7 @@ objlayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
static struct pnfs_layoutdriver_type objlayout_type = {
.id = LAYOUT_OSD2_OBJECTS,
.name = "LAYOUT_OSD2_OBJECTS",
+ .flags = PNFS_LAYOUTRET_ON_SETATTR,
.alloc_layout_hdr = objlayout_alloc_layout_hdr,
.free_layout_hdr = objlayout_free_layout_hdr,