tech-kern archive

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

Re: Anonymous vnodes?



On 2023-06-26 20:03, Taylor R Campbell wrote:
>> Date: Mon, 26 Jun 2023 18:13:17 -0400
>> From: Theodore Preduta <theo%pta.gg@localhost>
>>
>> Is it possible to create a vnode for a regular file in a file system
>> without linking the vnode to any directory, so that it disappears when
>> all open file descriptors to it are closed?  (As far as I can tell, this
>> isn't possible with any of the vn_* or VOP_* functions?)
>>
>> If this idea is indeed not possible, should/could I implement something
>> like this?  (If so, how?)
>>
>> For context, I'm currently working on implementing memfd_create(2), and
>> thought this might be a shortcut.  Otherwise, I'll have to implement it
>> in terms of uvm operations (which is fine, just more work).
> 
> For a syscall, you should implement it in terms of uvm anonymous
> objects:

Is there a preexisting way to resize a uvm_object?  Or do I need to
write a function similar (but not really that similar) to uvm_vnp_setsize?

Theo(dore)



Home | Main Index | Thread Index | Old Index