Subject: Re: UDF integration / syscall
To: Reinoud Zandijk <>
From: Bill Studenmund <>
List: tech-kern
Date: 06/09/2003 09:58:24
On Sun, 8 Jun 2003, Reinoud Zandijk wrote:

> Dear folks and fellow developers,
> As some of you might have read allready, i am working on implementing the
> UDF filingsystem both as a userland tool and hopefully one day also as a
> kernel filingsystem. The userland tool is getting near completion for
> read-only and getting some infrastructure for writing support too. The
> kernel part however still needs to be done from scratch. I hope to be able
> to recycle as much from the userland tool as possible but i'll have to see.
> Now my problem is that i also want to support multi-volume UDF discs. This
> means that i need to tell the UDF part to add discs to its list to scout
> for volumes. The sum of these discs then define a set of volumes to mount.
> A session from userland perspective might look like :
> 	udfclient list /dev/cd0c /dev/cd1c /home/reinoud/udf_iso.iso
> 		<lists mountable entities from userland and other info>
> 	udfclient newfs -name "udf_backup@disc2@backups" -volume 2 /a.file.iso
> 		<creates a new UDF filingsystem in a file>
> 	udfctl open /dev/cd0c /dev/cd1c
> 		<`udf' adds the entities to the kernel>
> 	udfctl open /dev/cd2c /dev/sd0a /a.file.iso
> 		<`udf' adds the new entities>
> 	udfctl list
> 		<lists accumulated entities available for mounting, usage etc>
> 	mount -t udf -o ro volume1@volumeset2 /home2
> 		<'udf' mounts the volume (could be multiple discs) at /home2>
> 	udfctl close /dev/cd2c
> 	.....
> Another userland option would be to use :
> 	udfclient list /dev/cd0c /dev/cd1c
> 		<lists>
> 	mount -t udf volume1@volumeset2 /dev/cd0c /dev/cd1c /a.file.iso /home2
> 		<`udf' mounts the volume from the cds and file>
> 	udfctl list
> 		<lists entities in use, statistics etc>
> 	.....
> The second would also be feasable but having to pass multiple devices to
> mount is euhm... less handy. Esp. since /dev/cd1c could hold other
> mountable volumes as well and you can get silly mount commands that could
> confuse fstab etc. etc. And what to do about lists etc; i generally dont
> think that specifying multiple devices is either intuitive nor practical.
> Communication with the UDF subsystem can be done in various ways; an
> ioctl() on a `/dev/udfctl' can be used but its flawed IMHO since `udf' is a
> filingsystem and not a device. Or add one or more syscall()'s. Since lfs
> allready uses this i think the later would be preferable.

I'd actually vote for the above, or something like it. Whatever you're
doing is a device, since it's what you mount the file system from.

To what extent is what you're mounting different from a ccd that did
spanning (not interleaving)?

> Now i dont know what the maximum number of syscalls abvailable is but its
> limit is now set to 512 as far as i can see in /usr/include/sys/sysctl.h
> and the last one used is 345. (Is it a bug that SYS_MAXSYSCALL is 354 ?).

Especially since what you're doing is a device for mounting a file system
from, I thin you should go the ioctl()-on-dev route, not the syscall

Take care,