VFS plug-in for single file io filtering.
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=N6c+03OdD2TsHIQbSEAGFPK1C3zGr7H7EVI03LNLJ1I=; b=oCnp32RM6iwmgTRgNJtPQQfTQX1WNYcrYto8Sln5MbhsclkQjhozoDhTGM5OqRt82y n8tD7QUTWmqRTMsLmP+KreiPcPzuZWAzAbex5ddzKZYgM+IUJEnpg/N5g8h6zaIhk6Mm CycIOGPeA9eplDWrXzrWkmqG9izJNRLPZW67M= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mLkeZL6o8fp41m8GkoGV83E1dO+hX6hwXtvMeUeb+K5ygHGA3v7QuSpCSTdn59Qawa vHCvmZ0hkCIOXuORR64EY/JK51MEotf35jphIG0On7KoGRVlrA9eqqVy1d57LUO73ynL DJvwEpaDRJaL69ge/wAKMubQSx5IGTHba03SQ= Hi, I am new here (and to the osx development in general), so please bear with me. Also. if this is not the best mailing list for me, please direct me to the one that fits better. I need to create a solution that will solve the following problem: 1) With the help of user-mode program it will take an arbitrary existing file and a specified block mask. 2) Will present an access to said file as a contiguous space mapped by specified sector mask through a BSD-style block device. As an example, suppose i have a file and i want to create a device /dev/something as an access point for this file that will map read/write from/to block 0 to real block 4 on the original file. I need this to port a part of the existing container encryption software from windows and this setup (block devices) is kind of a requirement, i.e. i am not allowed not take a different approach on how i present the access to contiguous space now. This is how i though i can accomplish this: To set up such a device i need, obviously, a modified loopback-kind driver for this device. I know about existence of hdiutil and an I/OKit DiskImages driver for that part and i decided that a sane way to take is to use this existing functionality. DiskImages driver does not know about any of the mapping stuff i need to do so i figured i need to implement a layer that will transform my original file into another file (with the 'dmg' extention). This layer is also best suited to perform i/o mappings so i can proceed with hdiutil on that new file to create a required loopback device node. Since i can't use macfuse (another requirement) i thought of a lightweight VFS kext that will present mapped .dmg file as a single root vnode and will use read and write vnode ops to pass the request to the actual file with corrected offsets. I can pass the block map and a file descriptor from user space program to mount(2) call, which will mount my VFS plug-in fs and give me a corresponding .dmg file to pass on to hdiutil. The question is, being a kernel newbie, before i start, what pitfalls do i need to be aware of? Is it at all possible? If it is, what is the best way to pass a read/write requiest from a VFS plug-in to the actual file? I also welcome any suggestions of a different solution architecture. Best Regards, Inso Reiges. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Inso Reiges