Skip to contentSkip to conversation

setacl, data caching

DISCUSSION J. Bruce Fields 2 participants 2 messages Jan 8, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Why does the nfs3_proc_setacls() need the begin_data_update() and end_data_update()?:

	nfs_begin_data_update(inode);
        msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL];
        status = rpc_call_sync(server->client_acl, &msg, 0);
        spin_lock(&inode->i_lock);
        NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS;
        spin_unlock(&inode->i_lock);
        nfs_end_data_update(inode);

It looks like the effect of those are to invalidate the page cache for that inode. Why do we want to do that when we modify the ACL?

--b.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw
Quoted 11 lines · J. Bruce Fields

Why does the nfs3_proc_setacls() need the begin_data_update() and end_data_update()?:

	nfs_begin_data_update(inode);
        msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL];
        status = rpc_call_sync(server->client_acl, &msg, 0);
        spin_lock(&inode->i_lock);
        NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS;
        spin_unlock(&inode->i_lock);
        nfs_end_data_update(inode);
Quoted 2 lines

It looks like the effect of those are to invalidate the page cache for that inode. Why do we want to do that when we modify the ACL?

The cache invalidation is only true for directories, however even there it is not strictly necessary. What is necessary, though, is to declare the attribute cache as unstable while the setacl call is on the wire.

Note that we have a similar inefficiency in nfs_rename().

Cheers,
Trond

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs