Re: [PATCH and RFC] Compact time in cramfs

From: johan.adolfsson@axis.com
Date: Thu Apr 25 2002 - 03:39:12 EST


Daniel Quinlan writes:

> Johan Adolfsson writes:
>
> > The following patch gives a cramfs filesystem a single timestamp
> > stored in the superblock. It uses the "future" field so no space is
> > wasted. mkcramfs uses the newest mtime or ctime from the
> > filesystem.
>
> Agreed, it seems like a good idea to have a filesystem timestamp.
>
> The future field should probably be saved for use as the offset of a
> "secondary superblock" (or something like that) rather than squandered
> for one field. At least, I think that was the original intent for the
> field and it has always been my plan.

Ok, I wondered what the intent really was.

> Maybe it would be easiest to overload the super.fsid.edition field?

Makes sense.

> Then you could have an option (probably a backward-compatible flag in
> the superblock, but could be compile-time or mount-time) that indicates
> that the edition number is a timestamp.

Using a flag should be enough I think:
#define CRAMFS_FLAG_FSID_EDITION_IS_TIMESTAMP 0x00000004 /* edition field
used as timestamp */

And mkcramfs should perhaps have support for
-e timestamp
(the string timestamp) which would set the edition field to the timestamp
according to the files in the image and set the timestamp flag.
Perhaps another option to set the timestamp flag but use whatever number
is supplied in the -e option might be useful for some, although I personally
don't think I need it. E.g. -f FSID_EDITION_IS_TIMESTAMP

Another mkcramfs feature we have at Axis is the support for metafiles with
file info used when creating the image. That allows us to create device
nodes, change userid etc. without being root which is good when building
for embedded devices.
It was first posted in October last year but without any feedback:
http://www.ussg.iu.edu/hypermail/linux/kernel/0110.0/0098.html
What do you think about that?

> - Dan

/Johan

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



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:10 EST