From: Lyashkov Alexey (shadow_at_itt.net.ru)
Date: Wed 25 Dec 2002 - 15:38:11 GMT
Hello vserver,
Me have 2 types of files
1) Files shared between contexts (some dir entry in different context
to one inode)
It's flagged by IMMUTABLE_LINK and this files is r/o in context other
from owner.
2) Files are pirated for context (one dir entry in one context to one
inode)
For per context disk quote we can scan vserver "root" directory for
count disk space used for private files. After scan this sum send to
kernel for start controlling disk quote. Control function insert in
parallel original DQUOT* function, not in inside (because if
CONFIG_QUOTA set to "n" all DQUOT* function will become inline).
For per user/group disks quote me must add super block (with dir entry
pointing to real vserver root) member in kernel context structure for
correctly read/save files with quotas. It's similar as a result "mount
-bind" command. For quote hash function me add context identifier as
high 16 bit system device identifier. It's defending hash against
collision.
For "quotacheck" tools, we can change type fs in fstab/mtab from
"ext2" to "nfs" ("none" is unknown for this tools) and patch stat
function to return type disk type "0" (It's type for NFS disks.) to
all requests from context other than zero.
Paul, Herbert what you opinion ?
-- Best regards, Lyashkov mailto:shadow_at_itt.net.ru