|
From: Stephen H. <she...@vy...> - 2010-05-07 18:17:52
|
On Fri, 7 May 2010 16:19:01 +0200
Helge Bahmann <hel...@se...> wrote:
> Am Thursday 06 May 2010 19:30:18 schrieb Stephen Hemminger:
> > This patch against the current squashfs-tools CVS repository provides
> > support for extended attributes in mksquashfs. It is compatible with
> > version done by Helge for libsqfs. One difference is that this code
> > provides deduplication of attributes since many files will have the same
> > attributes.
> >
> > One new option was added -no-attribute for the case where the source
> > filesystem has attributes that should be ignored.
>
> looks very nice me, but a few additional comments:
>
> - only dirs and regular files are covered; the format extension that I proposed
> also allows xattr for other file objects, and this is easily added if needed
> (I already have the need of storing an selinux label for device nodes)
There is no xattr on squashfs_dev_inode_header structure, therefore (unless
you want to change on disk format version and add compat code) there is no
easy way to do it for devices.
> - I think that there is a small division by zero problem if no xattrs are
> stored:
>
> > @@ -5038,6 +5259,13 @@ restore_filesystem:
> > printf("\t%.2f%% of uncompressed directory table size (%d bytes)\n",
> > ((float) directory_bytes / total_directory_bytes) * 100.0,
> > total_directory_bytes);
> > +
> > + printf("Extended Attributes table size %d bytes (%.2f Kbytes)\n",
> > + xattr_bytes, xattr_bytes / 1024.0);
> > + printf("\t%.2f%% of uncompressed attribute table size (%d bytes)\n",
> > + ((float) xattr_bytes / total_xattr_bytes) * 100.0,
> > + total_xattr_bytes);
> > +
>
> total_xattr_bytes will be zero then
Ok, will just skip second message if total_xattr_bytes is zero.
--
|