Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 May 2010 08:58:24 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Efstratios Karatzas <gpf@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 178714 for review
Message-ID:  <201005250858.24659.jhb@freebsd.org>
In-Reply-To: <201005241406.o4OE6v5B051548@repoman.freebsd.org>
References:  <201005241406.o4OE6v5B051548@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 24 May 2010 10:06:57 am Efstratios Karatzas wrote:
> http://p4web.freebsd.org/@@178714?ac=10
> 
> Change 178714 by gpf@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005250858.24659.jhb>