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