Beispiel #1
0
            private void LoadRootINode(FsImageProto.INodeSection.INode p)
            {
                INodeDirectory root    = LoadINodeDirectory(p, parent.GetLoaderContext());
                QuotaCounts    q       = root.GetQuotaCounts();
                long           nsQuota = q.GetNameSpace();
                long           dsQuota = q.GetStorageSpace();

                if (nsQuota != -1 || dsQuota != -1)
                {
                    dir.rootDir.GetDirectoryWithQuotaFeature().SetQuota(nsQuota, dsQuota);
                }
                EnumCounters <StorageType> typeQuotas = q.GetTypeSpaces();

                if (typeQuotas.AnyGreaterOrEqual(0))
                {
                    dir.rootDir.GetDirectoryWithQuotaFeature().SetQuota(typeQuotas);
                }
                dir.rootDir.CloneModificationTime(root);
                dir.rootDir.ClonePermissionStatus(root);
                AclFeature af = root.GetFeature(typeof(AclFeature));

                if (af != null)
                {
                    dir.rootDir.AddAclFeature(af);
                }
                // root dir supports having extended attributes according to POSIX
                XAttrFeature f = root.GetXAttrFeature();

                if (f != null)
                {
                    dir.rootDir.AddXAttrFeature(f);
                }
                dir.AddRootDirToEncryptionZone(f);
            }