[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dazuko-devel] DazukoFS for FreeBSD 4
From: |
John Ogness |
Subject: |
Re: [Dazuko-devel] DazukoFS for FreeBSD 4 |
Date: |
Tue, 07 Sep 2004 23:03:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040808 |
Hi Patrick,
OK, I have now added enough to the CVS code that you can play around
with DazukoFS on FreeBSD 4 if you like. Here is the step-by-step.
*NOTE*: DazukoFS is in a very early development stage! Although this
information is meant to satisfy Patrick's hunger, anyone is welcome to
play around with it. Just please be aware that both the Dazuko and FiST
projects have been "slapped together" as a first step for integration.
1. Get the latest CVS version of Dazuko:
$ env CVS_RSH="ssh" cvs -z3 \
-d:ext:address@hidden:/cvsroot/dazuko \
co dazuko
(Note: the diff file I provided assumes that the Dazuko source is in
/tmp/dazuko)
2. Configure for FiST support, build, and insert:
$ cd dazuko
$ ./configure --enable-fist
$ make
$ kldload ./dazuko.ko
3. Get the latest copy of fistgen from filesystems.org:
$ wget ftp://ftp.filesystems.org/pub/fistgen/fistgen-0.1.1.tar.gz
4. Extract and set up DazukoFS
$ tar xzvf fistgen-0.1.1.tar.gz
$ cd fistgen-0.1.1
$ ./configure
$ make
$ ./fistgen dazukofs.fist
(Note: dazukofs.fist is attached to this email)
5. Patch the generated DazukoFS source code:
$ cd out/FreeBSD-4.10-STABLE/dazukofs
$ patch -p0 < patch-fist-dazuko-freebsd.diff
(Note: patch-fist-dazuko-freebsd.diff is attached to this email)
6. Build and insert dazukofs.ko:
$ make
$ kldload ./dazukofs.ko
7. Create a couple dummy directories for experimenting:
$ mkdir /tmp/dazukomnt
$ mkdir /tmp/dazukomnt.real
8. Mount the directories:
# ./mount_dazukofs -t dazukofs /tmp/dazukomnt.real /tmp/dazukomnt
9. Start the Dazuko example program:
# cd /tmp/dazuko/example_c
# make
# ./example /tmp/dazukomnt
Now you can play in the /tmp/dazukomnt directory and the ON_OPEN events
should be displayed by the running example program. Currently *only*
ON_OPEN vnode ops are being hooked.
When you are finished, make sure you remove everything in reverse order:
# umount /tmp/dazukomnt
# kldunload dazukofs
# kldunload dazuko
I hope this helps you out. Please remember that this is in *VERY* early
development stages! I am looking forward to feedback.
John Ogness
--
Dazuko Maintainer
--- Makefile Tue Sep 7 22:32:28 2004
+++ ../dazukofs.good/Makefile Tue Sep 7 21:40:04 2004
@@ -4,7 +4,7 @@
OPT_DBG=-Werror -Wno-unused
OPT_DEF=-D_KERNEL -DKLD_MODULE -DFISTGEN
OPT_INC=-I. -I$(SYS_SRC)
-CFLAGS=$(OPT_DEBUG) $(OPT_DEF) $(OPT_DBG) $(OPT_INC)
+CFLAGS=$(OPT_DEBUG) $(OPT_DEF) $(OPT_DBG) $(OPT_INC) -I/tmp/dazuko
UCFLAGS=$(OPT_DEBUG) -DFISTGEN $(OPT_INC)
SYS_SRC=/sys
--- vnode.c Tue Sep 7 22:32:28 2004
+++ ../dazukofs.good/vnode.c Tue Sep 7 22:25:06 2004
@@ -221,6 +221,9 @@
#include <dazukofs.h>
#endif
+#include "dazuko_platform.h"
+#include "dazuko_events.h"
+
static int dazukofs_bug_bypass = 0; /* for debugging: enables bypass
printf'ing */
SYSCTL_INT(_debug, OID_AUTO, dazukofs_bug_bypass, CTLFLAG_RW,
&dazukofs_bug_bypass, 0, "");
@@ -338,7 +341,13 @@
* with the modified argument structure.
*/
if (vps_p[0] && *vps_p[0])
+ {
+
+if(descp->vdesc_offset == VOFFSET(vop_open)
+ fist_dazuko_sys_generic(DAZUKO_ON_OPEN, curproc, *(vps_p[0]), 1);
+
error = VCALL(*(vps_p[0]), descp->vdesc_offset, ap);
+ }
else {
printf("dazukofs_bypass: no map for %s\n", descp->vdesc_name);
error = EINVAL;
mntstyle overlay;
debug off;
%%
%%
/* no extra routines are needed */
/*
* Local variables:
* c-basic-offset: 4
* End:
*/
- Re: [Dazuko-devel] DazukoFS for FreeBSD 4,
John Ogness <=