Date: Sun, 5 Jun 2011 01:23:54 +0000 From: Ali Mashtizadeh <mashtizadeh@gmail.com> To: Benjamin Kaduk <kaduk@mit.edu> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Opening files from within geom filters Message-ID: <BANLkTik5jNUiLoSy7nKHxPy=aU3Kse_zEA@mail.gmail.com> In-Reply-To: <alpine.GSO.1.10.1106041956190.6818@multics.mit.edu> References: <BANLkTimuJvMw2MRKiSLjD5erhyg_xE-w3Q@mail.gmail.com> <alpine.GSO.1.10.1106041956190.6818@multics.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Benjamin, Thanks for the reference. I originally wanted to open an fd in userspace as suggested, but the alq(9) API did not support that. I guess I'll try adding a new alq creation function for this purpose. Similarly, geom did not support that as well. I guess I'll spend sometime on adding that infrastructure. Thanks, ~ Ali On Sun, Jun 5, 2011 at 12:01 AM, Benjamin Kaduk <kaduk@mit.edu> wrote: > On Sat, 4 Jun 2011, Ali Mashtizadeh wrote: > >> Hi Folks, >> >> I'm working on a small geom filter where I need to open a file with >> vn_open_cred, but this causes an assert because of a null pointer >> because g_run_event proc structure has null pointer for the current >> working directory. > > Hi Ali, > > In general, it is not recommended to open a file from within the kernel, due > to a multitude of complications and difficulties. > The old thread here: > http://lists.freebsd.org/pipermail/freebsd-hackers/2007-May/020544.html > may provide you with some other options to do what you're doing, and insight > from a previous time when this sort of question came up. > > -Ben Kaduk >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTik5jNUiLoSy7nKHxPy=aU3Kse_zEA>