[Ocfs2-devel] [PATCH 6/6] Add online resize in tunefs.ocfs2, take 1

Roel Kluin 12o3l at tiscali.nl
Mon Nov 26 15:03:34 PST 2007


Tao Ma wrote:
> +static errcode_t find_mount_point(char *device)
> +{
> +	int mount_flags = 0;
> +	errcode_t ret;
> +
> +	memset(mnt_dir, 0, sizeof(mnt_dir));
> +
> +	ret = ocfs2_check_mount_point(device, &mount_flags,
> +				      mnt_dir, sizeof(mnt_dir));
> +	if (ret)
> +		goto out;
> +
> +	if ((!mount_flags & OCFS2_MF_MOUNTED) ||

if(!(mount_flags & OCFS2_MF_MOUNTED) ||

> +	    (mount_flags & OCFS2_MF_READONLY) ||
> +	    (mount_flags & OCFS2_MF_SWAP)) {
> +		ret = OCFS2_ET_BAD_DEVICE_NAME;
> +		goto out;
> +	}
> +
> +	ret = 0;
> +out:
> +	return ret;
> +}



More information about the Ocfs2-devel mailing list