PERFORCE change 178714 for review

John Baldwin jhb at freebsd.org
Tue May 25 15:18:43 UTC 2010


On Monday 24 May 2010 10:06:57 am Efstratios Karatzas wrote:
> http://p4web.freebsd.org/@@178714?ac=10
> 
> Change 178714 by gpf at gpf_desktop on 2010/05/24 14:06:34
> 
> 	* the second parameter from VOP_VPTOCNP() should be vdrop()ed after
> 	the call - done
> 	* dont really need exclusive locks; now I use shared locks
> 	* dir_ilookup() still only works for UFS, added a check so that the
> 	function will return if the fs is not ufs 
> 
> Affected files ...
> 
> .. //depot/projects/soc2010/gpf_audit/vn_fullpath_nocache.c#3 edit
> 
> Differences ...
> 
> ==== //depot/projects/soc2010/gpf_audit/vn_fullpath_nocache.c#3 (text+ko) ====
> 
> @@ -75,11 +75,18 @@
>  	KASSERT("dvp != NULL", "dir_ilookup: dvp == NULL");
>  	KASSERT("name != NULL", "dir_ilookup: name == NULL");
>  
> +	/* XXXgpf: temporary, must be a better way to check this than f_type or f_fstypename */
> +	if (strcmp(vp->v_mount->mnt_stat.f_fstypename, "ufs")) {
> +		uprintf("only ufs supported\n");
> +		return 1;
> +	}
> +

The normal way to handle something like this is by moving the
filesystem-specific functionality into a new VOP.  Alternatively, the mount
point could grow a new flag (such as MNTK_MPSAFE or MNTK_LOOKUP_SHARED) to
indicate that a specific mount supports an optional feature or capability.

-- 
John Baldwin


More information about the p4-projects mailing list