[OpenAFS-devel] OpenBSD 4.2 and OpenAFS?
Matthew Schlegel
nite97m@gmail.com
Fri, 28 Dec 2007 20:13:03 -0600
------=_Part_15602_29895142.1198894384007
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I don't suppose you might know what some of the side effects of that might
be for a server?
I'll give that a try and see how it looks.
Thank you,
Matthew
On Dec 28, 2007 7:15 PM, Jim Rees <rees@umich.edu> wrote:
> Matthew Schlegel wrote:
>
> I'm working on getting OpenAFS to compile on OpenBSD 4.2 and I'm
> currently
> stumped by the following errors:
>
> I'm afraid the OpenBSD vnode locking has changed in 4.2, probably for SMP.
> The fix will require looking at the new code and figuring out what
> changed.
> I usually do this by looking at what they changed in the nfs client, and
> trying to apply the same changes to OpenBSD. I may eventually get around
> to
> doing this but it won't be any time soon.
>
> If you are feeling adventurous, you could try something like this:
>
> Index: osi_vnodeops.c
> ===================================================================
> RCS file: /cvs/openafs/src/afs/OBSD/osi_vnodeops.c,v
> retrieving revision 1.20
> diff -u -r1.20 osi_vnodeops.c
> --- osi_vnodeops.c 9 Mar 2006 15:27:17 -0000 1.20
> +++ osi_vnodeops.c 29 Dec 2007 01:13:28 -0000
> @@ -189,8 +189,8 @@
> {&vop_abortop_desc, vop_generic_abortop}, /* abortop */
> {&vop_inactive_desc, afs_nbsd_inactive}, /* inactive */
> {&vop_reclaim_desc, afs_nbsd_reclaim}, /* reclaim */
> - {&vop_lock_desc, afs_nbsd_lock}, /* lock */
> - {&vop_unlock_desc, afs_nbsd_unlock}, /* unlock */
> + {&vop_lock_desc, ((int (*)(void *))vop_generic_lock)}, /* lock */
> + {&vop_unlock_desc, ((int (*)(void *))vop_generic_unlock)}, /* unlock
> */
> {&vop_bmap_desc, afs_nbsd_bmap}, /* bmap */
> {&vop_strategy_desc, afs_nbsd_strategy}, /* strategy */
> {&vop_print_desc, afs_nbsd_print}, /* print */
> @@ -921,40 +921,6 @@
> }
>
> int
> -afs_nbsd_lock(void *v)
> -{
> - struct vop_lock_args /* {
> - * struct vnode *a_vp;
> - * int a_flags;
> - * sturct proc *a_p;
> - * } */ *ap = v;
> - struct vnode *vp = ap->a_vp;
> - struct vcache *vc = VTOAFS(vp);
> -
> - if (!vc)
> - panic("afs_nbsd_lock: null vcache");
> - return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_CANRECURSE,
> &vp->v_interlock,
> - ap->a_p);
> -}
> -
> -int
> -afs_nbsd_unlock(void *v)
> -{
> - struct vop_unlock_args /* {
> - * struct vnode *a_vp;
> - * int a_flags;
> - * struct proc *a_p;
> - * } */ *ap = v;
> - struct vnode *vp = ap->a_vp;
> - struct vcache *vc = VTOAFS(vp);
> -
> - if (!vc)
> - panic("afs_nbsd_unlock: null vcache");
> - return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_RELEASE,
> &vp->v_interlock,
> - ap->a_p);
> -}
> -
> -int
> afs_nbsd_bmap(void *v)
> {
> struct vop_bmap_args /* {
>
--
Matthew
http://www.schlegelhome.info
------=_Part_15602_29895142.1198894384007
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I don't suppose you might know what some of the side effects of that might be for a server?<br><br>I'll give that a try and see how it looks.<br>Thank you,<br>Matthew<br><br><div class="gmail_quote">On Dec 28, 2007 7:15 PM, Jim Rees <
<a href="mailto:rees@umich.edu">rees@umich.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Matthew Schlegel wrote:
<br><br> I'm working on getting OpenAFS to compile on OpenBSD 4.2 and I'm currently<br> stumped by the following errors:<br><br></div>I'm afraid the OpenBSD vnode locking has changed in 4.2, probably for SMP.
<br>The fix will require looking at the new code and figuring out what changed.<br>I usually do this by looking at what they changed in the nfs client, and<br>trying to apply the same changes to OpenBSD. I may eventually get around to
<br>doing this but it won't be any time soon.<br><br>If you are feeling adventurous, you could try something like this:<br><br>Index: osi_vnodeops.c<br>===================================================================
<br>RCS file: /cvs/openafs/src/afs/OBSD/osi_vnodeops.c,v<br>retrieving revision 1.20<br>diff -u -r1.20 osi_vnodeops.c<br>--- osi_vnodeops.c 9 Mar 2006 15:27:17 -0000 1.20<br>+++ osi_vnodeops.c 29 Dec 2007 01:13:28 -0000
<br>@@ -189,8 +189,8 @@<br> {&vop_abortop_desc, vop_generic_abortop}, /* abortop */<br> {&vop_inactive_desc, afs_nbsd_inactive}, /* inactive */<br> {&vop_reclaim_desc, afs_nbsd_reclaim}, /* reclaim */
<br>- {&vop_lock_desc, afs_nbsd_lock}, /* lock */<br>- {&vop_unlock_desc, afs_nbsd_unlock}, /* unlock */<br>+ {&vop_lock_desc, ((int (*)(void *))vop_generic_lock)}, /* lock */<br>+ {&vop_unlock_desc, ((int (*)(void *))vop_generic_unlock)}, /* unlock */
<br> {&vop_bmap_desc, afs_nbsd_bmap}, /* bmap */<br> {&vop_strategy_desc, afs_nbsd_strategy}, /* strategy */<br> {&vop_print_desc, afs_nbsd_print}, /* print */<br>@@ -921,40 +921,6 @@
<br> }<br><br> int<br>-afs_nbsd_lock(void *v)<br>-{<br>- struct vop_lock_args /* {<br>- * struct vnode *a_vp;<br>- * int a_flags;<br>- * sturct proc *a_p;
<br>- * } */ *ap = v;<br>- struct vnode *vp = ap->a_vp;<br>- struct vcache *vc = VTOAFS(vp);<br>-<br>- if (!vc)<br>- panic("afs_nbsd_lock: null vcache");<br>- return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_CANRECURSE, &vp->v_interlock,
<br>- ap->a_p);<br>-}<br>-<br>-int<br>-afs_nbsd_unlock(void *v)<br>-{<br>- struct vop_unlock_args /* {<br>- * struct vnode *a_vp;<br>- * int a_flags;
<br>- * struct proc *a_p;<br>- * } */ *ap = v;<br>- struct vnode *vp = ap->a_vp;<br>- struct vcache *vc = VTOAFS(vp);<br>-<br>- if (!vc)<br>- panic("afs_nbsd_unlock: null vcache");
<br>- return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_RELEASE, &vp->v_interlock,<br>- ap->a_p);<br>-}<br>-<br>-int<br> afs_nbsd_bmap(void *v)<br> {<br> struct vop_bmap_args /* {
<br></blockquote></div><br><br clear="all"><br>-- <br>Matthew<br><a href="http://www.schlegelhome.info">http://www.schlegelhome.info</a>
------=_Part_15602_29895142.1198894384007--