Re: Causing mount from kernel/kext
Re: Causing mount from kernel/kext
- Subject: Re: Causing mount from kernel/kext
- From: Jorgen Lundman <email@hidden>
- Date: Tue, 13 Jan 2015 09:03:01 +0900
Having a vnode, then calling mount() to cover it with a new vnode, is very
easy code :)
Compared to creating a new devnode, with virtual "disk" providing enough
hints to get DA excited (with fs.bundle), going to sleep, and then waking
up once the eventual vfs_mount() call is received (with timeouts of course)
is a considerably larger task.
At least that is what I image I have to do, to replace the one call.
Annoyingly, NFS is allowed to mount things as needed (mirror mounts etc) so
its frustrating that Apple doesn't follow its own conventions, it would
have been an excellent example to copy. I am essentially doing the same
thing as mirror mounts.
Still, maybe it will be fun code to add :)
Lund
Eric Tamura wrote:
> There is no way to trigger a mount in-kernel at the moment.
>
> Are DiskArbitration functionalities (produce devnode, probing, etc). not sufficient to achieve the desired behaviors?
>
> Eric
>
>> On 8 Jan 2015, at 5:28 PM, Jorgen Lundman <email@hidden> wrote:
>>
>>
>> Hello lists,
>>
>> Trying to be compatible with upstream ZFS, we wish to cause snapshots to be
>> mounted automatically on access (usually triggered in vnop_lookup). But I
>> seem unable to cause mounts to happen from within the kernel.
>>
>> mount and __mac_mount has opaque structs and possibly deal only with copyin
>> from userspace.
>>
>> NFS uses kernel_mount() but it is not available (inlined due to only one
>> caller?) - Possibly I could call mount_list_add() myself, but "struct
>> mount" is also opaque. Seems to be a lot of hoops for such a basic feature.
>>
>> Is there no way to cause a mount to happen from the kernel?
>>
>> Lund
>>
>> --
>> Jorgen Lundman | <email@hidden>
>> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work)
>> Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell)
>> Japan | +81 (0)3 -3375-1767 (home)
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Filesystem-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
--
Jorgen Lundman | <email@hidden>
Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell)
Japan | +81 (0)3 -3375-1767 (home)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden