dazuko-devel
[Top][All Lists]
Advanced

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

[Dazuko-devel] dazukoFS - redirFS


From: Frantisek Hrbata
Subject: [Dazuko-devel] dazukoFS - redirFS
Date: Tue, 5 Apr 2005 15:40:10 +0200 (CEST)

Hi,

I have spent last few weeks trying to find the best way how to implement
dazukoFS (how to catch proper VFS events needed for on-access scanning).
One way is to use the FiST generator for transparent file systems. FiST
creates whole file system by duplicating VFS objects (super block, dentry,
inode, file) and linking them with objects in the lower layer (native file
system or other transparent file system). Because creating almost the
whole file system only to catch some VFS events is too much effort and
waste of time, I started to play directly with VFS object's operations.

The idea is to replace operations of existing or newly created VFS objects
in the given file system subtree. This solution has the following
advantages:

1) No VFS objects duplication is needed.
2) Only VFS objects for given subtree are affected.
3) Only selected functions of VFS objects are redirected.

As a proof of concept I am attaching LKM, which incorporates the points
above.

Here are some module restrictions:
- only one directory can be selected and you have to set it in source
  code (REDIRFS_PATH macro)
- it ignores sub-mounts (works only over one file system)
- only directory and regular file operations are modified
- it just prints EXEC, OPEN and CLOSE events with dentry name
- for now I tested it only on Linux kernel 2.6.11.3, but it should work
  for all 2.6.x kernels. With little modification (locking) it will work
  with 2.4.x kernels too (and I hope that 2.2.x will not be problem too,
  because VFS has not been changed much since 2.2 kernels)
- I tested it only on uniprocessor system

WARNING: If you decide to try this module, please do it on a test machine.
  The module works for me, but it does not mean, that there are no bugs.

Please note, it is just a proof of concept. The module came up as I was
playing with the VFS. It will be rewritten if no design flaw will be found
(I am thinking about some kind of framework, that will allow to redirect
selected VFS object's operations). IMHO I think, if we will take care of
proper VFS objects locking we can do it this way.

Thanks for all your comments.

Attachment: redirfs.tar.gz
Description: application/gunzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]