Re: Driver for a different view of a filesystem

Riley Williams (rhw@MemAlpha.CX)
Sun, 6 Jun 1999 02:23:59 +0100 (GMT)


Hi Paul.

> I'm rattling out an idea to do a driver which will present the
> data on a drive in a different format. Specifically I am
> thinking about graphics files but there is no reason the idea
> can't be extended to other data types.

> Essentially the aim is to produce a driver which presents the
> files in a fashion similar to that used by the DPS Perception
> driver for NT. The Perception is a video disk recorder for PC's
> which has its own SCSI bus and MJPEG compressor. The files are
> stored on the drive in some proprietary format but the drive (as
> seen by NT) has a directory structure similar to this...

> P: --> Project --> TGA --> PROJECT0001.TGA
> | PROJECT0002.TGA
> | ....
> | PROJECT9999.TGA
> |
> |-> BMP --> PROJECT0001.BMP
> | PROJECT0002.BMP
> | ...
> | PROJECT9999.BMP
> |
> |-> JPG blah
> |
> |-> TIFF blah

> You get the jist. Basically the driver, with some help from the
> HW was able to convert the video format into individual frames
> in various file formats on request.

Under Linux, probably a better idea would be for the driver to list
any supported image file with symlinks in the various other supported
formats, similar to the following:

Q> # ls -Gl /mnt/images
Q> -r--r--r-- 1 root 160106 May 14 00:04 image-1.jpeg
Q> -r--r--r-- 1 root 128517 May 15 02:07 image-2.jpeg
Q> -r--r--r-- 1 root 46392 May 17 05:57 image-3.jpeg
Q> -r--r--r-- 1 root 537044 Jun 1 05:27 image-4.jpeg
Q> -r--r--r-- 1 root 18008 Jun 2 21:17 image-5.jpeg
Q> # mount -t autoimg /mnt/images /mnt/autoimg
Q> # ls -Gl /mnt/autoimg
Q> -r--r--r-- 1 root 160106 May 14 00:04 image-1.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-1.bmp -> image-1.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-1.gif -> image-1.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-1.tiff -> image-1.jpeg
Q> -r--r--r-- 1 root 128517 May 15 02:07 image-2.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-2.bmp -> image-2.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-2.gif -> image-2.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-2.tiff -> image-2.jpeg
Q> -r--r--r-- 1 root 46392 May 17 05:57 image-3.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-3.bmp -> image-3.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-3.gif -> image-3.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-3.tiff -> image-3.jpeg
Q> -r--r--r-- 1 root 537044 Jun 1 05:27 image-4.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-4.bmp -> image-4.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-4.gif -> image-4.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-4.tiff -> image-4.jpeg
Q> -r--r--r-- 1 root 18008 Jun 2 21:17 image-5.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-5.bmp -> image-5.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-5.gif -> image-5.jpeg
Q> lrwxrwxrwx 1 root 12 Jun 6 02:15 image-5.tiff -> image-5.jpeg
Q> #

Basically, if a file was referenced by any of the symlinks, the raw
file it was pointing to would automagically be converted on the spot.

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/