[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: using NTFS ADS, HFS+ ResourceForks or other file system metadata facility instead of a .svn directory

From: Joseph Galbraith <galb_at_vandyke.com>
Date: 2006-02-06 19:01:53 CET

David Rauschenbach wrote:
> Hi Michael,
>
> Michael wrote:
>> I would much rather try
>> sticking to the goal of Subversion being a revision management
>> system and that the files are "sacred" and should not be corrupted
>> or changed due to the use of Subversion. (I should get back what
>> I put in)

Just to kind of throw gasoline on the fire :-)

NTFS doesn't allow an unlimited number of ADS per file. I don't
recall what the limit is, but it was surprisingly low (at least
I recall being surprised when I heard it-- several thousand but
not 10's of thousands I think.)

I'm pretty sure that ACLs are not really stored as a named data
stream... so you couldn't overwrite the ACL with creative use
of CreateFile("myfile:$ACL") or some such. Likewise, create
time, change time, modified time, last access, and the file
attributes (including archive bit) are also not stored as
an ADS.

In terms of 'sacred' data... I don't believe that it would
have an impact. If subversions stored per-file meta data
in a ADS call myfile.txt:.svn, you'd have the same chances
of colliding with a real data stream as you do with today's
.svn directory for meta-data.

However, it was only as of Windows 2003 that microsoft
finally introduced a real way to enumerate alternate
data streams. (Previous to that you had to use tricks
with the backup APIs and parsing the backup data.)

As a result, most tools (including exploder) are not
aware of streams. If you want to see and admin turn
purple, mutter words like "root-kit", "malware", and
other creative swear-words, take half his disk space
and make it disappear from the view of all his available
tools... it's gone, but he can't figure out where.
Unfortunately, that is the state-of-ads as it stands
today.

In general, I would suggest it might be appropriate to store
a small amount of data as an ADS. For example, storing the
subversion properties as an ADS sounds like it would be a
sensible use (they might even stay MFT resident in which
case you wouldn't incure a allocatition-block-size hit in
disk space for a 12 byte string.)

Storing the textbase does not-- both because of the large amount
of space being 'hidden' and because you have no way to prevent
the user from deleting it.

Thanks,

Joseph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 6 19:01:34 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.