Re: The loop device

David Holland (dholland@hcs.harvard.edu)
Fri, 23 Feb 1996 22:11:55 -0500 (EST)


> I put a version of mount on ftp.win.tue.nl:/pub/linux/util/mount-2.5b.tar.gz
> that can handle mounting something over the loop device. For example,
> mount -t lo@/dev/loop3 fdimage /mnt -o vfs=msdos:blocksize=1024
> will attach the device /dev/loop3 to the file fdimage, and then
> mount it as a msdos file system, with blocksize 1024.
> (No doubt this syntax should be changed, and the loop device should be
> invoked implicitly whenever an ordinary file is mounted, or an
> encryption option is given. Later.)

Why shouldn't the mount system call just accept files? I took a brief
look at this a while back, and there didn't appear to be any
particular reason for requiring block devices.

I can imagine interesting things might happen if you had a filesystem
mounted r/w on a sparse file in another filesystem with no free space,
but you can already hang yourself that way with swap files... ;-)

-- 
   - David A. Holland          | Number of words in the English language that
     dholland@hcs.harvard.edu  | exist because of typos or misreadings: 381