Re: A userland implementation of a good filesystem in a file

From: Pascal Bourguignon (spam_at_mouse-potato.com)
Date: 08/24/04


Date: 24 Aug 2004 08:05:19 +0200


"Shaun Clowes" <delius@no.spam.for.me.progsoc.org> writes:

> Hi All,
>
> I've done quite a bit of searching and surprisingly haven't found anything.
> Is anyone aware of an open source (or just free) implementation of a
> filesystem in a file?
>
> I'm thinking something along the lines of a library that provides filesystem
> type access to a file.
>
> For example
>
> FS *hey = fs_mount("/tmp/my.filesystem");
>
> FS_FILE *file = fs_open("/subdir/hey", O_RDWR);
>
> fs_read(buf, sizeof(buf), file);
>
> fs_umount(file);
>
> Has anyone seen anything like this previously? I'm kind of surprised since
> it seems like the kind of thing that would have been done before?

This is done everyday with Linux:

    dd if=/dev/zero of=/tmp/fs_file bs=1k count=20k
    mke2fs /tmp/fs_file
    mount -o loop /tmp/fs_file /mnt
    cp some_file /mnt
    umount /mnt

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.


Relevant Pages

  • A userland implementation of a good filesystem in a file
    ... I've done quite a bit of searching and surprisingly haven't found anything. ... Is anyone aware of an open source implementation of a ... I'm thinking something along the lines of a library that provides filesystem ... type access to a file. ...
    (comp.unix.programmer)
  • Re: A userland implementation of a good filesystem in a file
    ... In article, Shaun Clowes wrote: ... > I've done quite a bit of searching and surprisingly haven't found anything. ... > filesystem in a file? ... in games. ...
    (comp.unix.programmer)
  • Re: [opensuse] Beagle frontend
    ... And what 'organized' filesystem will let me see related IMs, documents, ... Filsystem symlinks do not provide the functionality of multi key indexing or a relational database. ... You would have to create an insane number of symlinks for every document in order to come close to even merely poorly faking the functionality of searching the document contents. ...
    (SuSE)
  • Re: A Suggestion For Higher-Quality Open-Source Software
    ... perhaps as an hook to ... the filesystem, where it belongs. ... don't care whether or not open source wins out in the long run. ... But instead of suggesting ...
    (comp.os.linux.misc)
  • Re: problems with "ll"
    ... I'm searching for the tool "ll" to view process images in the /proc ... filesystem. ... I'm using debian testing and I am more than a bit confused ...
    (comp.os.linux.misc)