Ejemplo n.º 1
0
        void CommitNewExtentPrefix()
        {
            if (0 != (this.modifiedFields & ModifiedFields.NewExtentPrefix))
            {
                CLFS_MGMT_POLICY_NEWCONTAINERPREFIX policy;
                policy = new CLFS_MGMT_POLICY_NEWCONTAINERPREFIX(
                    Const.LOG_POLICY_OVERWRITE | Const.LOG_POLICY_PERSIST);

                // The prefix length should not include the NULL terminator.
                // Including NULL terminator will cause the CLFS container
                // name to have embedded NULL and container creation will fail.
                policy.PrefixLengthInBytes = (ushort)((this.newExtentPrefix.Length) * 2);
                policy.PrefixString        = this.newExtentPrefix;

                UnsafeNativeMethods.InstallLogPolicy(this.store.Handle,
                                                     ref policy);
                this.modifiedFields &= ~ModifiedFields.NewExtentPrefix;
            }
        }
Ejemplo n.º 2
0
        void CommitNewExtentPrefix()
        {
            if (0 != (this.modifiedFields & ModifiedFields.NewExtentPrefix))
            {
                CLFS_MGMT_POLICY_NEWCONTAINERPREFIX policy;
                policy = new CLFS_MGMT_POLICY_NEWCONTAINERPREFIX(
                    Const.LOG_POLICY_OVERWRITE | Const.LOG_POLICY_PERSIST);

                // The prefix length should not include the NULL terminator. 
                // Including NULL terminator will cause the CLFS container 
                // name to have embedded NULL and container creation will fail. 
                policy.PrefixLengthInBytes = (ushort)((this.newExtentPrefix.Length) * 2);
                policy.PrefixString = this.newExtentPrefix;

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