Today's Page Hits: 1787
I have more hair and it isn't so grey. :->
This page validates as XHTML 1.0, and will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. It was created using techniques detailed at glish.com/css/.
So I have a new daemon and I have it loaded:
# ./sped 10, 16, 64000, 1647890964l uid == 501 20, 32, 2000, 1647890964l uid == 1066 30, 64, 1000, 1647890964l uid == 0 40, 2, 2000, 1647890964l subnet == 192.168.2.0/24
And I have a door upcall which starts in do_rfs4_op_mknod(). A door is an IPC mechanism used to communicate from the kernel to user land. Also, since the sped hands out policies for open creation, this should be a good point to call it from. Notice the foreshadowing invoked by the word "should" and remember that foreshadowing is the sign of good journalism (I think this is a quote from Bloom County?).
Okay, it didn't work - the sped is not being called. I can whip out kmdb and struggle through trying to see if the door upcall is invoked. But first, we should do a sanity check to see if do_rfs4_op_mknod() is even being called:
# dtrace -m nfssrv > /tmp/dtrace.log dtrace: description 'nfssrv' matched 2262 probes ^C# grep do /tmp/dtrace.log 0 51547 mds_do_lookup:entry 0 51548 mds_do_lookup:return 0 52741 do_rfs4_op_getattr:entry 0 52742 do_rfs4_op_getattr:return 0 52379 mds_findopenowner:entry 0 52380 mds_findopenowner:return 0 51593 mds_do_opennull:entry 0 52127 do_rfs4_set_attrs:entry 0 52128 do_rfs4_set_attrs:return 0 51777 vop_fid_pseudo:entry 0 51778 vop_fid_pseudo:return 0 52641 do_41_deleg_hack:entry 0 52642 do_41_deleg_hack:return 0 51591 mds_do_open:entry 0 51592 mds_do_open:return 0 51594 mds_do_opennull:return 0 52741 do_rfs4_op_getattr:entry 0 52742 do_rfs4_op_getattr:return 0 52741 do_rfs4_op_getattr:entry 0 52742 do_rfs4_op_getattr:return 1 52127 do_rfs4_set_attrs:entry 1 52128 do_rfs4_set_attrs:return 1 51547 mds_do_lookup:entry 1 51548 mds_do_lookup:return 1 52741 do_rfs4_op_getattr:entry 1 52742 do_rfs4_op_getattr:return
Remember, the rfs component of the function name means that is in the nfssrv module and not the nfs module. Also, note that you won't see "mds_" names in code drops from Nevada. You will need to download the pNFS tree over at: OpenSolaris Project: NFS version 4.1 pNFS
Okay, it was never called. So either dtrace is hosed or something is going wrong. What is being called? mds_createfile()
0 51593 mds_do_opennull:entry 0 51987 mds_createfile:entry 0 52647 nfsauth4_access:entry 0 52377 nfsauth_access:entry 0 52378 nfsauth_access:return 0 52648 nfsauth4_access:return 0 52399 nfs4_ntov_table_init:entry 0 52400 nfs4_ntov_table_init:return
I'm off to build a new nfssrv to see if making my upcall from mds_createfile() works.