tech-kern archive

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

Re: Anonymous vnodes?



> On Jun 26, 2023, at 3:13 PM, Theodore Preduta <theo%pta.gg@localhost> wrote:
> 
> 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?)

There isn't a general way to do this.

> 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).

Seems like these objects should be implemented above the file system ... just create a new descriptor type and interface directly with UVM.

-- thorpej



Home | Main Index | Thread Index | Old Index