Exemplo n.º 1
0
        void CommitGrowthRate()
        {
            if (0 != (this.modifiedFields & ModifiedFields.GrowthRate))
            {
                CLFS_MGMT_POLICY_GROWTHRATE policy;
                policy = new CLFS_MGMT_POLICY_GROWTHRATE(
                    Const.LOG_POLICY_OVERWRITE | Const.LOG_POLICY_PERSIST);

                if (this.growthRate.Type == PolicyUnitType.Extents)
                {
                    policy.AbsoluteGrowthInContainers = (uint)this.growthRate.Value;
                    policy.RelativeGrowthPercentage   = 0;
                }
                else
                {
                    policy.RelativeGrowthPercentage   = (uint)this.growthRate.Value;
                    policy.AbsoluteGrowthInContainers = 0;
                }

                UnsafeNativeMethods.InstallLogPolicy(this.store.Handle,
                                                     ref policy);
                this.modifiedFields &= ~ModifiedFields.GrowthRate;
            }
        }
Exemplo n.º 2
0
        void CommitGrowthRate()
        {
            if (0 != (this.modifiedFields & ModifiedFields.GrowthRate))
            {
                CLFS_MGMT_POLICY_GROWTHRATE policy;
                policy = new CLFS_MGMT_POLICY_GROWTHRATE(
                    Const.LOG_POLICY_OVERWRITE | Const.LOG_POLICY_PERSIST);

                if (this.growthRate.Type == PolicyUnitType.Extents)
                {
                    policy.AbsoluteGrowthInContainers = (uint)this.growthRate.Value;
                    policy.RelativeGrowthPercentage = 0;
                }
                else
                {
                    policy.RelativeGrowthPercentage = (uint)this.growthRate.Value;
                    policy.AbsoluteGrowthInContainers = 0;
                }

                UnsafeNativeMethods.InstallLogPolicy(this.store.Handle,
                                                     ref policy);
                this.modifiedFields &= ~ModifiedFields.GrowthRate;
            }
        }