NetBSD-Users archive

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

Re: procfs difference between NetBSD and Linux



Replying to myself...

  | I think I am going to experiment with simply removing that error case
  | and see if anything breaks.

but that cannot work, the issue is that the operations in question return
the parent vnode, which, when a mount point has been crossed, isn't possible.
Simply returning success in that case won't work at all for all the other
uses of the CREAT vnop, which expect that parent vnode.

I considered dealing with EEXIST in open() (where it makes no sense,
unless O_EXCL is set) but that is unlikely to work, as namei()
when it returns an error isn't also going to be properly returning the
target vnode.

My guess at the minute is that to fix this we need a new vnop, OCREATE
(optional create) (or something), which works identically to the CREATE
operation, except that it doesn't fail if it cannot return the parent
vnode - and then callers (which would probably only be open()) using
this new op would need to deal with that when it happens.

But that's beyond my pay grade here, someone who has worked a lot on
namei() and the vnops needs to consider all this a lot more.

kre



Home | Main Index | Thread Index | Old Index