Subscribe: darwin-drivers Mailing List
Added By: Feedage Forager Feedage Grade B rated
Language: English
file system  file  filesystem  filesystems  filter  kernel  query stackable  quoted text  stackable filesystems  stackable  system  text 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: darwin-drivers Mailing List

darwin-drivers Mailing List

darwin-drivers Mailing List

Published: 2016-01-31T23:35:02-08:00


Re: Query regarding stackable filesystems
From: Slava Imameyev
Reply to list
Hi,    The "stackable" file systemand filter implementation can be done via vnode operation hooks. I implemented it for two projects, the implementation was tested starting from 10.6 up to the latest 10.11 without any changes. The code is a part of a bigger project but can be extracted as its main functionality is independent from the rest of the project. The project is under a BSD License.     I implemented file system filtering by hooking vnode operations table. There are links to relevant files in the github repository, the main hook functionality is implemented by DldHookVnodeVop function     I also imlemented file system over file system when an intercepted vnode is initialized by a filter and returned to a caller, thought I didn't thoroughly tested the implementation      a fake file system is used to infer vnode operations table layout, but you can hardcode offsets as it happens they haven't changed for years     On Tue, Jan 19, 2016 at 8:23 AM, Mike Crawford <email@hidden> wrote: > quoted text


Re: Query regarding stackable filesystems
From: Mike Crawford
Reply to list

Thank you Alex.

 I expect the best thing for me personally to do is to let the client
make the judgement call.

 Looking over the kernel sources, sometimes I think I can do it,
sometimes I think I can't.  I expect I'll tell the client that, then
spend a few more days studying it. [...]

Re: Query regarding stackable filesystems
From: Alexander Dimitrov
Reply to list
Hi Mike,     > quoted text
    Depending on your specific needs it could be impossible to implement your functionality using filesystem filters, it allows specific access to information, but not too much.    > quoted text
    It is unsupported, there is no KPI which will allow you to do a stacked filesystem. You will have to find a way to call functions in the kernel and you'll rely on APIs which could change without warning. You will have to fight with the VFS to implement it and it is possible to bump into really nasty problems because the kernel guys at Apple don't take special care to allow somebody to implement a stacked filesystem. I wouldn't expect to receive too much help from Apple's customer support if you have problems implementing unsupported feature. In short I wouldn't recommend such approach.    > quoted text
    That could turn out to be not so hard. It is not an easy task though and will take time, but there is a lot of available source which you can read and get a hang of the idea. There are some sample filesystems on the Apple's site. Also you can check implementations of HFS+ and other filesystems in the xnu kernel. You could also check FUSE, which allows you to implement a filesystem in user space. I don't know how well the project is maintained nowadays for Mac OS X though, but FUSE solves some of the hurdles of working in kernel space in exchange of some performance loss.    > quoted text
    I suppose you'll have to do some more research whether filesystem filters will be sufficient or not, as they don't offer too much access over the fs call, but are the easiest to use compared to implementing a fs. Everything depends on what you want exactly to do, whether you want to modify fs calls or add some extra functionality on some of the calls or just to monitor them.     Have fun!  Alex    

Query regarding stackable filesystems
From: Mike Crawford
Reply to list

A potential client has asked me to look into implementing some
functionality that might be possible by using stackable file systems -
that is, my code would be a file system filter, rather than an end-user
visible filesystem.

 However Technical Q&A 1242 specifically states that stackable [...]