[OpenAFS] Setting quotas with interesting numbers
Steve Simmons
scs@umich.edu
Thu, 22 Sep 2011 15:30:27 -0400
I've been working on a patch to AFS so that one could add scales to =
numbers. The primary goal is to be able to do things like
$ fs setq . 1g
and get a gigabyte quota. For we who use powers of 1024, that's a =
helluva lot easier than
$ fs setq . 1048576
Especially when setting, say, 23g quotas. What, you don't have 23g =3D=3D =
24117248 memorized? :-) While doing this I stumbled across a feature and =
a possible bug in the fs setq command.
The feature is that 'fs setq' and maybe other things accept well-formed =
octal and hexadecimal numbers. Thus you can set a 1 gigabyte quota with =
any of these:
$ fs setq . 0x100000
$ fs setq . 04000000
$ fs setq . 1048576
And yes, negative quotas can be expressed in octal and hex.
Ya learn something new every day.
Steve=