Ignoring fcntl instead of ENOTSUPP
Love
lha at stacken.kth.se
Mon Feb 25 03:49:49 CET 2002
sperber at informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) writes:
> I have an application in binary form which uses fcntl locking, which
> is not supported by arla. Arla raises an ENOTSUPP error. OpenAFS, on
> the other hand, seems to just ignore the fcntl. (I seem to remember
> that earlier versions of Transarc AFS would print a warning, but still
> not return ENOTSUPP.)
>
> Is there any way I can get the same behavior with arla?
We haven't implemented locking in afs yet, guess we should try to do local
locking for those OS that have easy to use locking functions.
You can try this untested patch to see if this makes you happy.
Love
Index: xfs_vnodeops-bsd.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/bsd/xfs_vnodeops-bsd.c,v
retrieving revision 1.100
diff -u -w -u -w -r1.100 xfs_vnodeops-bsd.c
--- xfs_vnodeops-bsd.c 2001/12/18 13:15:12 1.100
+++ xfs_vnodeops-bsd.c 2002/02/25 02:47:57
#endif
-#if 0
#ifdef HAVE_VOP_ADVLOCK
+#if 1
static int
xfs_advlock(void *v)
{
+ return 0;
+}
+#else
+static int
+xfs_advlock(void *v)
+{
struct vop_advlock_args /* {
struct vnode *a_vp;
caddr_t a_id;
@@ -1177,8 +1183,8 @@
return 0;
#endif
}
-#endif /* HAVE_VOP_ADVOCK */
#endif
+#endif /* HAVE_VOP_ADVOCK */
#ifdef HAVE_VOP_REVOKE
static int
@@ -1452,10 +1458,8 @@
#ifdef HAVE_VOP_PRINT
{&vop_print_desc, (vop_t *) xfs_print},
#endif
-#if 0
#ifdef HAVE_VOP_ADVLOCK
{&vop_advlock_desc, (vop_t *) xfs_advlock },
-#endif
#endif
#ifdef HAVE_VOP_PAGEIN
{&vop_pagein_desc, (vop_t *) xfs_pagein },
More information about the Arla-drinkers
mailing list