[OpenAFS-devel] Large Caches: Implementation Discussion

Derek Atkins warlord@MIT.EDU
17 Jul 2001 18:46:02 -0400


<eichin-oa@boxedpenguin.com> writes:

> And while you're there make sure you check for "ludicrous" values,
> perhaps some lower bound on files/dir... warn about it, too.

Indeed.  My current bounds are 10 and 2^30.  I figure those are
reasonable (perhaps '10' is a bit small, but whatever, and 2^30 is
essentially a single directory).  That should satisfy everyone.

Sam, I've changed the argument to take a real number of files instead
of a log2.  So "files_per_subdir" is now an accurate description.

Jim, you'll be happy to know that yes, I _can_ cope with arbitrary
numbers (it was a simple change, and I've done it in my code).  So,
you can give any arbitrary number of files_per_subdir between 10 and
2^30.

> When you scan, do you check that the st_dev's all match?  (since it
> was suggested earlier that this is a constraint that must hold true,
> it would seem appropriate to catch it early...)

No, I don't check st_dev at all, mostly because I assume that afsd
created the cache directory in the first place.  Anyone who actually
violates the cache abstraction and builds their own cache directory by
hand deserves to lose anyways ;)

Are you guaranteed to get '.' before any other directory entry?
Otherwise, I'm not sure how to grab the st_dev ahead of time to
compare it.  However I'll take a look and see what I can come up
with.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available