From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f3b142c1c8ab100f X-Google-Attributes: gidfee84,public From: SetUpName Subject: Re: My Own File System Type on DU? Date: 1997/02/24 Message-ID: <33116A53.D42@dial.pipex.com> X-Deja-AN: 220960039 References: <33082A54.665D@netcomuk.co.uk> Content-Type: text/plain; charset=us-ascii Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 X-Mailer: Mozilla 2.0 (Win95; I; 16bit) Eric Werme wrote: > > john hall writes: > > >Is it possible to code and configure your own file system type into DEC > >OSF/1 3.x and DU 4.x, without needing to change the .o files for which no > >source code is provided? > > Yes, as far as I know. > > >Is there a mechanism for doing this that is officially a) supportedk > >b) documented by DEC - for example definitions of the various interface > >functions and also kernel utilities such as buffer management. > > Oh, well that's something else! We do have third parties with their > own file system, but I don't know if they needed a source license to > figure out all the internals. There is a source file we ship that allows > you to include a VFS dispatch table for a new FS, and the header files > describe the VFS_* macro calls to manipulate the file system and the > VOP_* calls to manipulate files. I don't know if there's more, but if > so, it's probably less than the device driver book. > > Sorry I can't be more definitive. > -- > <> Eric (Ric) Werme <> This space under reconstruction <> > <> <> <> This is a big post (sorry!), and you would need patience to read it through and understand my questions. If anyone out there has a good understanding of the Linux kernel sources concerning the implementation of the various types of file system (fs), I would GREATLY appreciate your advice. In fact I'm not that bothered if your knowledge of the kernel if gained from other UNIX platforms, I'm only interested in the principles of operation. These questions relate to a project I'm doing with the DEC Alpha, running Digital UNIX, but as always I first turn to Linux to understand how things work, before looking at the details and differences of Digital UNIX. WHAT I BASICALLY WANT TO KNOW IS: What parts of the kernel would need to be changed to make Linux understand and work with a new proprietary file system format, other than the ones already supported, such as umsdos and ex2fs? Say you had a PC with a SCSI host bus adapter and a SCSI hard disk and you want to run Linux? In such a case you must install a version of Linux with a kernel that supports the SCSI host bus adapter card of your system - Right? You could then make Linux work with a SCSI hard disk of any manufacturer - atleast in theory. So as long as the kernel has a device driver for your SCSI card, and support for the file system type you want, everthing should be fine. Am I correct in my understanding of this? Now with SCSI, as you know you can daisy chain up to 7 other devices. So suppose you wanted to have another SCSI hard disk in your system. A new device driver is not required surely?. You basically connect a cable to the new disk and the previous disk, may be set some jumpers and take care of mount points, making a new filesystem, and some other administrative details with /etc/fstab, and AWAY YOU GO - Another hard disc in your system ready for use. Am I correct so far? NOW THIS IS THE TWIST AND WHAT I NEED ADVICE WITH: Suppose that the second SCSI hard disk is not some off the shelf product that you see in the computer shops and magazines. Suppose that it is an EXTERNAL RACKMOUNTED SCSI UNIT WITH NOT JUST A SCSI BUS CONNECTION, BUT ALSO ANOTHER PROPIETARY BUS CONNECTOR of massively greater bandwidth than SCSI, used in the real time telemetry and data acquisition industries. This disk acts as a 'fast data recorder'; it is fed with massive quantities of raw data from this other bus (from other rack mounted electronics such as analogue to digital converter modules). When the disk is recording data it dumps the raw bytes in a proprietary file format, defined by the manufacturer of that disk. When the disk is recording data it is not accessed by the host (the PC), but when it is finished, you effectively have files on the second disk in an alien file system format to those that Linux recognizes. That disk can accept commands from the other bus, to allow it to do basic administration, such as formating it in some proprietary way. IF I HAD THE SPECIFICATION OF THAT PROPRIETARY FILE SYSTEM FORMAT, ie. if I could get the details of how the blocks on the disks are mapped to files, (I think it is a flat file system with no directories), how much work is involved to get Linux to recogize that file system? By recognize, all I want Linux to do, is to allow a user to list the files of that disk so that they just look like UNIX files (with some sensible defaults for the access permissions), and allow a user program to use the normal open(), read(), write().... calls on them. So what I am trying to do is to make a foreign file system format look like a normal UNIX directory of files. In terms of design issues isn't this analogous to the design of the UMSDOS file system for LINUX? My thinking is that the SCSI device driver for the adapter card could remain the same, but a new device driver for the foreign file system would have to be written. The user would merely mount the disk using a device special file representing the driver for the foreign filesystem format. The command to make a file system would probably not be needed, as this would be issued by the other rack mounted electronics to create the proprietary format, prior to using the disk for data recording. So when data recording was finished, a nice looking UNIX GUI program could do read() and write()s with those telemetry files and display the data in fancy graphs and plots etc. How much work is involved in writing such a device driver? It is surely not a SCSI device driver that's required, but something at a slightly higher level of abstraction? I understand that it depends on how easy it is to interpret the proprietary file format, but say that was easy and nicely defined, how much new source needs to be written, and which existing functions of the kernel would need work? Please give me as much details as you can. IF NOBODY REPLIES TO THIS POST,(apart from not being suprised, and very disappointed) I will just plod along, studying the kernel sources of Linus, the LINUX KERNEL HACKERS GUIDE and reading the DIGITAL UNIX online books on SCSI block device drivers. Eventually I will know enough to know how to do it, but if someone gave me some pointers; that could save me days, or weeks even; so please help. Thanks for reading so far! and even greater thanks if you reply.