Re: GFS2 and DLM

From: Steven Whitehouse
Date: Fri Jun 23 2006 - 11:44:22 EST


Hi,

On Fri, 2006-06-23 at 15:54 +0100, Christoph Hellwig wrote:
> On Tue, Jun 20, 2006 at 01:17:13PM +0100, Steven Whitehouse wrote:
> > Hi,
> >
> > Linus, Andrew suggested to me to send this pull request to you directly.
> > Please consider merging the GFS2 filesystem and DLM from (they are both
> > in the same tree for ease of testing):
>
> What's going on with gfs2_repermission? For one it's a totally useless
> wrapper. Second we prefer to have everyone use vfs_permission or
> file_permission and third WTF is it doing anywhere? Except for very rare
> cases checking permissions is the VFS's job.
>

gfs2_repermission doesn't exist in the latest git tree. I had spotted
that one earlier and replaced it with direct calls to permission.
vfs_permission is just a wrapper for permission.

file_permission which you are advocating using has the comment:

/**
* file_permission - check for additional access rights to a given file
* @file: file to check access rights for
* @mask: right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)
*
* Used to check for read/write/execute permissions on an already opened
* file.
*
* Note:
* Do not use this function in new code. All access checks should
* be done using vfs_permission().
*/

so I guess thats not the right thing. I'm afraid I fail to see whats wrong
with just calling permission directly... we need to call it mainly because
the VFS only does locking within a single node and we recheck the permissions
in a few places after we've taken the glocks which provide cluster-wide
exclusion.

Steve.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/