DragonFly BSD
DragonFly users List (threaded) for 2012-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: your own filesystem


From: "sad@xxxxxxxxx" <sad@xxxxxxxxx>
Date: Wed, 5 Sep 2012 17:57:59 +0400

hi, all
(thanx for the links to the books)

i have added few handlers to 
my_vnops.c file (that originally was null_vnops.c of "nullfs")

and (with intention to involve my handlers into execution flow)
i have extended struct vop_ops (last 4 lines):

struct vop_ops my_vnode_vops = {
	.vop_nresolve =		null_nresolve,
	.vop_ncreate =		null_ncreate,
	.vop_nmkdir =		null_nmkdir,
	.vop_nmknod =		null_nmknod,
	.vop_nlink =		null_nlink,
	.vop_nsymlink =		null_nsymlink,
	.vop_nwhiteout =	null_nwhiteout,
	.vop_nremove =		null_nremove,
	.vop_nrmdir =		null_nrmdir,
	.vop_nrename =		null_nrename,
	.vop_mountctl =		null_mountctl,
        .vop_open =             my_open,
        .vop_read =             my_read,
        .vop_write =            my_write,
        .vop_access =           my_access
};

then i have noticed that my_*() handlers were never called no matter what operations i perform on my test subject.

the question is:
(1) What am i doing wrong?
(2) Is there any official description what is a purpose of each handler in struct vop_ops and WHEN it shall be called?



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]