Re: Implementing Meta File information in Linux

Richard Gooch (rgooch@atnf.csiro.au)
Wed, 2 Sep 1998 22:32:36 +1000


Etienne Lorrain writes:
> Hi,
>
> Lots of propositions have been done, how about
> this one:
>
> A file with meta-data is a simple 'tar' file,
> i.e. uncompressed.
> It works for cp, mv, backups.
>
> A file with meta-data like ACL is protected
> to everybody (chmod 700), a suid daemon will
> take care of the ACL before giving the file
> content to an authorised user.

Sorry, I don't like this. I think we need to keep the distinction
between meta-data intended for userspace (icons and fluff) and that
intended for kernelspace (ACLs). One of the important functions of the
kernel is to safely determine access rights, so ACL processing belongs
in the kernel.
The kernel has no interest or business worrying about userspace
meta-data like icons, so there we have a userspace-only solution.

Really, ACLs and icons are very different classes of meta-data.

Furthermore, I think userspace meta-data should be kept as separate
files by storing data in <dirname>/data and icons in <dirname>/icons
and so forth, and having applications treat <dirname> as the
meta-file. Like Hans says, we should be using directories more, not
avoiding them.
This also has the advantage that you can manipulate a meta-file with
"dumb" utilities. You can copy meta-data between different meta-files
using cp and friends.

A centralised database of meta-data is a mistake. I've seen it done
with certain astronomical data reduction packages (a single catalogue
file is maintained for all datasets), and it's a real pain. Users
can't backup their data using tar, they need to use the package. Any
manipulations need to be done via the package. The package can end up
being an OS in itself :-(
Such an approach makes it very hard to penetrate the meta-data format
implementation and administer things. A sysadmin has to know the
package in order to safely move data around. This is rather onerous,
as the package is astronomy-specific and the sysadmin isn't likely to
be an astronomer, nor has the time to learn the package just to be
able to do "simple" things!

The best approach is to have all meta-data inside a plain file. In the
case of datafiles which have header information associated with the
raw data, it's not too hard to do this. Where you can't put meta-data
in with the file data (such as icons for an executable), make your
meta-file a directory with the components being files within it. The
specialised tools that can deal with this meta-data will know that a
directory with an "exe" file is really a programme that can be run,
which might have a pretty icon. "Dumb" tools can still be used to
manipulate the meta-data components and sysadmins won't require deep
knowledge of the meta-data format (it will be obvious from the
filenames). Trust me: in the long run everyone will thank you for
doing it this way :-)

Regards,

Richard....

-
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.altern.org/andrebalsa/doc/lkml-faq.html