Date: Fri, 1 Mar 2002 19:13:52 -0500 (EST) From: Robert Watson <rwatson@freebsd.org> To: Galen Sampson <galen_sampson@yahoo.com> Cc: current@freebsd.org Subject: Re: extended attribute files sizes Message-ID: <Pine.NEB.3.96L.1020301191102.97093B-100000@fledge.watson.org> In-Reply-To: <20020301073228.8391.qmail@web14105.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Feb 2002, Galen Sampson wrote: > I am curious about the file sizes of the backing files for extend > attributes. I have compiled a custom kernel that has both extended > attribute support and acl support. I can sucessfully add and remove > acls for files. I am quite impressed. I used a sparse backing file > (i.e. no -p option when creating the backing file) to see if acl's would > work. I am aware of the security implications of this, but my only goal > was to test them out. The size of the backing file when used with -p > and 388 bytes is too large of an overhead for me to live with anyhow. > > I am curious about the file sizes displayed in 'ls -l' for these sparse > backing files. The sparse files are indeed small. Unfortunately I see > strange results with 'ls -l'. An example... What's going on is that ls -l lists the size of the file in terms of addressable space, whereas du lists the actual size in blocks. The space isn't actually consumed, but if you were to read at any of the addresses in the file, you're get the zero's back associated with the sparse locations. With the advent of UFS2, this won't be a problem since we'll support extended attributes natively in the file layout, and won't have to rely on backing files. BTW, the quota system has the same quirk: it uses a sparse file indexed by uid or gid, leaving sparse blocks all over the place if you have a sparse uid or gid space. We might want to add a quirk entry to the FAQ about this, since it will no doubt result in questions. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1020301191102.97093B-100000>