7f73 How to change vnode operation - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > FreeBSD Development

FreeBSD Development Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Reply
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2010, 10:07
lithius lithius is offline
Junior Member
 
Join Date: Nov 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to change vnode operation

Hi all,

this may sound a little odd, since I have noticed that there is much work done to not allow such a thing ($SUBJ). But may be you can help me and point me to the right direction.

I am writing a kernel module with somewhat similar functionality like nullfs has, BUT it has to have some features which nullfs itself does not provide :

1. I need the new layer to completely hide underlaying layer so no one can bypass it.
2. Nullfs allows me to to overlay just one directory, but i want to include another directories and/or exclude subdirectories/files.
3. Nullfs just redirects vnode operations to lower layer, I need to catch that operation, do something (for example alter the arguments somehow etc..), pass the operation (with possibly altered arguments) to the lower layer, get the result and then return the result.

The best way to do that (I think) is to change vnode operations of particular vnodes to point to functions defined in that module. At this point, I can catch any operations with the vnode and this is the base of what i want.

So my question is. I there any "clean" way to chande vnode operations ? If not, is there any "not so clean" way ? Anyway I will appreciate any good idea how to do what I have described.


Thanks!
-Lukas.
Reply With Quote
Reply

Tags
kernel development, vfs, vnode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vnode read/write operation info justint FreeBSD Development 2 February 26th, 2010 13:15
snd_hda: operation not permitted rocky Multimedia 1 March 25th, 2009 09:05
mdconfig: Writeable Vnode, is it possible? vaclinux General 4 March 17th, 2009 07:18
mount: /dev/... operation not permitted aharonf General 4 February 26th, 2009 06:16
How to undo unlink operation mukembo General 4 January 4th, 2009 06:35


All times are GMT +1. The time now is 23:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0