summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorassar <assar@FreeBSD.org>2001-09-12 03:42:42 +0000
committerassar <assar@FreeBSD.org>2001-09-12 03:42:42 +0000
commit4de1ff896fde50b71b354fceab92020341970c52 (patch)
treec0065cc527bd7260943b6fc7af041794ece4afd7 /net
parentada53a12f8909a59325bff19b4f99ebdc96d699b (diff)
downloadFreeBSD-ports-4de1ff896fde50b71b354fceab92020341970c52.zip
FreeBSD-ports-4de1ff896fde50b71b354fceab92020341970c52.tar.gz
make sure the removal of cache does not fail if it has not been created.
add a patch from upstream that uses the 4.4 vflush semantics
Diffstat (limited to 'net')
-rw-r--r--net/arla/Makefile2
-rw-r--r--net/arla/files/patch-ab73
-rw-r--r--net/arla/pkg-plist2
3 files changed, 75 insertions, 2 deletions
diff --git a/net/arla/Makefile b/net/arla/Makefile
index f1b9487..8e9b389 100644
--- a/net/arla/Makefile
+++ b/net/arla/Makefile
@@ -7,7 +7,7 @@
PORTNAME= arla
PORTVERSION= 0.35.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftp.stacken.kth.se/pub/arla/
diff --git a/net/arla/files/patch-ab b/net/arla/files/patch-ab
new file mode 100644
index 0000000..c378fcc
--- /dev/null
+++ b/net/arla/files/patch-ab
@@ -0,0 +1,73 @@
+Index: xfs/bsd/xfs_node-bsd.c
+===================================================================
+RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/bsd/xfs_node-bsd.c,v
+retrieving revision 1.54
+retrieving revision 1.55
+diff -u -w -u -w -r1.54 -r1.55
+--- xfs/bsd/xfs_node-bsd.c 2001/03/14 23:04:43 1.54
++++ xfs/bsd/xfs_node-bsd.c 2001/09/03 21:16:50 1.55
+@@ -171,6 +171,20 @@
+ XFSDEB(XDEBNODE, ("free_xfs_node done\n"));
+ }
+
++/*
++ * FreeBSD 4.4 and newer changed to API to vflush around June 2001
++ */
++
++static int
++xfs_vflush(struct mount *mp, int flags)
++{
++#if __FreeBSD__ && __FreeBSD_version > 430000
++ return vflush(mp, 0, flags);
++#else
++ return vflush(mp, NULL, flags);
++#endif
++}
++
+ int
+ free_all_xfs_nodes(struct xfs *xfsp, int flags, int unmountp)
+ {
+@@ -190,21 +204,36 @@
+ XFSDEB(XDEBNODE, ("free_all_xfs_nodes now removing root\n"));
+
+ vgone(XNODE_TO_VNODE(xfsp->root));
+- xfsp->root = 0;
++ xfsp->root = NULL;
+ }
+
+ XFSDEB(XDEBNODE, ("free_all_xfs_nodes root removed\n"));
+ XFSDEB(XDEBNODE, ("free_all_xfs_nodes now killing all remaining nodes\n"));
+
++ /*
++ * If we have a syncer vnode, release it (to emulate dounmount)
++ * and the create it again when if we are going to need it.
++ */
++
+ #ifdef HAVE_STRUCT_MOUNT_MNT_SYNCER
+ if (!unmountp) {
+- XFSDEB(XDEBNODE, ("free_all_xfs_nodes not flushing syncer vnode\n"));
+- error = vflush(mp, mp->mnt_syncer, flags);
+- } else
++ if (mp->mnt_syncer != NULL) {
++ vrele(mp->mnt_syncer);
++ mp->mnt_syncer = NULL;
++ }
++ }
+ #endif
+- {
+- error = vflush(mp, NULL, flags);
++ error = xfs_vflush(mp, flags);
++#ifdef HAVE_STRUCT_MOUNT_MNT_SYNCER
++ if (!unmountp) {
++ XFSDEB(XDEBNODE, ("free_all_xfs_nodes not flushing syncer vnode\n"));
++ if (mp->mnt_syncer == NULL)
++ if (vfs_allocate_syncvnode(mp)) {
++ panic("failed to allocate syncer node when xfs daemon died");
++
+ }
++ }
++#endif
+
+ if (error) {
+ XFSDEB(XDEBNODE, ("xfree_all_xfs_nodes: vflush() error == %d\n",
+
diff --git a/net/arla/pkg-plist b/net/arla/pkg-plist
index 785bcc2..92c7c1e 100644
--- a/net/arla/pkg-plist
+++ b/net/arla/pkg-plist
@@ -103,4 +103,4 @@ sbin/xfs_makedev
@dirrm include/afs
@dirrm include/rx
@dirrm include/ss
-@dirrm cache
+@unexec rmdir cache 2>/dev/null || true
OpenPOWER on IntegriCloud