Re: [PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 29, 2007 at 03:21:29PM -0400, J. Bruce Fields wrote:
> +static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl)
> +{
> +	struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
> +	int ret = -EOPNOTSUPP;
> +
> +	if (sdp->sd_args.ar_localflocks) {
> +		return setlease(file, arg, fl);
> +	}
> +
> +	/* For now fail the delegation request. Cluster file system can not
> +	   allow any node in the cluster to get a local lease until it can
> +	   be managed centrally by the cluster file system.
> +	*/
> +	return ret;
> +}

Very odd way to write this function.  It should look more like:

static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl)
{
	struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
	int ret = -EOPNOTSUPP;

	/*
	 * For now fail the delegation request. Cluster file system can not
	 * allow any node in the cluster to get a local lease until it can
	 * be managed centrally by the cluster file system.
	 */
	if (!sdp->sd_args.ar_localflocks)
		return -EOPNOTSUPP;

	return setlease(file, arg, fl);
}

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux