On Tue, Feb 13, 2001 at 01:01:00PM -0500, Jan Harkes wrote:
> On Tue, Feb 13, 2001 at 10:23:53AM -0700, K. Leif D. Van Horn wrote:
> > This concerns Linux 2.4.1 coda and podfuk/uservfs (which uses /dev/cfs0)
> > to "mount" Zope ftp server contents.  Everything seems to work with
> > the filesystem as far as lookups, reads, and writes.  The close system
> > call seems to not propagate error state to my applications.
> > 
> > The way I see it, I should be able to write a message to the
> > coda device (/dev/cfs0) at the end of the upcall.  This message
> > contains the outputArgs union with result set to -1.  The application
> > never sees close return a error status.  Here is a example
> > perl script:
> 
> The Coda kernel module expects userspace to return positive error
> numbers:
> 
> linux/fs/coda/upcall.c:740
>     /* Op went through, interrupt or not... */
>     if (req->uc_flags & REQ_WRITE) {
>           out = (union outputArgs *)req->uc_data;
>           /* here we map positive Venus errors to * kernel errors */
>           error = -out->oh.result;
>           CDEBUG(D_UPCALL, "upcall: (u,o,r) (%ld, %ld, %ld) out at %p\n", 
>                  out->oh.unique, out->oh.opcode, out->oh.result, out);
>           *outSize = req->uc_outSize;
>           goto exit;
>     }
> 
> The error is expected to be something like EINVAL. When we get back into the
> VFS with such a negative error, errno is set to this value and close will
> return -1.
> 
> So you would have to return something like EPARSE instead of -EPARSE.
> 
> Jan
> 

Whoops.  I was not looking closely enough at my code.  The value
written in the union is EBADF which is not quite what I wanted
but is still a error.  At least is something that my close()
man page refers to.

Thanks,
-Leif

Reply via email to