public static MessageStatus QueryFileSystemInfo(
            FileSystemInfoClass fileInfoClass,
            OutputBufferSize outBufSmall,
            out FsInfoByteCount byteCount)
        {
            byteCount = FsInfoByteCount.Zero;

            switch (fileInfoClass)
            {
                #region 3.1.5.12.1    FileFsVolumeInformation

                case (FileSystemInfoClass.File_FsVolumeInformation):
                    {
                        // If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2638, @"[In FileFsVolumeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_VOLUME_INFORMATION.VolumeLabel) + BytesToCopy.");
                        byteCount = FsInfoByteCount.FieldOffset_FILE_FS_VOLUME_INFORMATION_VolumeLabel_Add_BytesToCopy;

                        Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.VolumeLabelLength else STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.2    FileFsLabelInformation //3.1.5.12.9    FileFsDriverPathInformation

                case (FileSystemInfoClass.File_FsLabelInformation):
                    {
                        Helper.CaptureRequirement(2751, @"[MS-FSCC] section 2.5, FileFsLabelInformation is intended for local use only. Query request does not match the usage, STATUS_INVALID_INFO_CLASS is returned.");
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                case (FileSystemInfoClass.File_FsDriverPath_Information):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.4   FileFsDeviceInformation, Pseudocode for the operation is as follows:]
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DRIVER_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2764, @"[In FileFsDriverPathInformation]This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                        return MessageStatus.NOT_SUPPORTED;

                    }

                #endregion

                #region 3.1.5.12.3    FileFsSizeInformation //3.1.5.12.7    FileFsFullSizeInformation

                case (FileSystemInfoClass.File_FsSizeInformation):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.3 FileFsSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2672, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount MUST be set to sizeof(FILE_FS_SIZE_INFORMATION).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_SIZE_INFORMATION;

                        Helper.CaptureRequirement(2673, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                case (FileSystemInfoClass.File_FsFullSize_Information):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.7 FileFsFullSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_FULL_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2729, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_FULL_SIZE_INFORMATION ).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_FULL_SIZE_INFORMATION;

                        Helper.CaptureRequirement(2730, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.4    FileFsDeviceInformation

                case (FileSystemInfoClass.File_FsDevice_Information):
                    {
                        // If OutputBufferSize is smaller than sizeof( FILE_FS_DEVICE_INFORMATION )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.4 FileFsDeviceInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DEVICE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2753, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_DEVICE_INFORMATION ).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_DEVICE_INFORMATION;

                        Helper.CaptureRequirement(2680, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.5    FileFsAttributeInformation
                case (FileSystemInfoClass.File_FsAttribute_Information):
                    {
                        //If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2691, @"[In FileFsAttributeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName) + BytesToCopy.");
                        byteCount = FsInfoByteCount.FieldOffset_FILE_FS_ATTRIBUTE_INFORMATION_FileSystemName_Add_BytesToCopy;

                        Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.FileSystemNameLength else STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }
                #endregion

                #region 3.1.5.12.6    FileFsControlInformation

                case (FileSystemInfoClass.File_FsControlInformation):
                    {
                        // If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2707, @"[In FileFsControlInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 ) the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        if (!gIsImplementQueryFileFsControlInformation)
                        {
                            Helper.CaptureRequirement(7802, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                            return MessageStatus.INVALID_PARAMETER;
                        }

                        if (!gisQuotasSupported)
                        {
                            Helper.CaptureRequirement(7803, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                                If Open.File.Volume.IsQuotasSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED");
                            return MessageStatus.VOLUME_NOT_UPGRADED;
                        }

                        Helper.CaptureRequirement(2715, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof(FILE_FS_CONTROL_INFORMATION).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_CONTROL_INFORMATION;

                        Helper.CaptureRequirement(2716, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.8    FileFsObjectIdInformation

                case (FileSystemInfoClass.File_FsObjectId_Information):
                    {
                        // If OutputBufferSize is less than the size of FILE_FS_OBJECTID_INFORMATION
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2755, @"[In FileFsObjectIdInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is less than sizeof( FILE_FS_OBJECTID_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        if (!gIsImplementQueryFileFsObjectIdInformation)
                        {
                            Helper.CaptureRequirement(4811, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                            return MessageStatus.INVALID_PARAMETER;
                        }

                        if (!gisObjectIDsSupported)
                        {
                            Helper.CaptureRequirement(4812, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                                If Open.File.Volume.IsObjectIDsSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED.");
                            return MessageStatus.VOLUME_NOT_UPGRADED;
                        }

                        Helper.CaptureRequirement(2761, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_OBJECTID_INFORMATION ).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;

                        Helper.CaptureRequirement(2762, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 2.1.5.12.10   FileFsSectorSizeInformation

                case (FileSystemInfoClass.File_FsSectorSizeInformation):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SECTOR_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to the size of the FILE_FS_SECTOR_SIZE_INFORMATION structure.");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_SECTOR_SIZE_INFORMATION;

                        Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region Information Class which is not defined in MS-FSCC
                case FileSystemInfoClass.Zero:
                    {
                        Requirement.Capture(@"[MS-FSCC 2.5 File System Information Classes] If an Information Class is specified that does not match the usage in the above table, STATUS_INVALID_INFO_CLASS MUST be returned.");
                        return MessageStatus.INVALID_INFO_CLASS;
                    }
                case FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"Negative test with artificial FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
                                If OutputBufferSize is smaller than sizeof(NOT_DEFINED_IN_FSCC), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[MS-SMB2 section 3.3.5.20.2 Handling SMB2_0_INFO_FILESYSTEM] If the store does not support the data requested, the server MUST fail the request with STATUS_NOT_SUPPORTED.");
                        return MessageStatus.NOT_SUPPORTED;
                    }
                #endregion

                default:
                    break;
            }

            Helper.CaptureRequirement(2630, @"[In Application Requests a Query of File System Information]On completion, the object store MUST return:
                [Status,OutputBuffer,ByteCount].");
            return MessageStatus.SUCCESS;
        }
 internal static MessageStatus WorkAroundQueryFileSystemInfo(FileSystemInfoClass fileInfoClass, OutputBufferSize outBufSmall, MessageStatus returnedStatus, ref FsInfoByteCount byteCount, ITestSite site)
 {
     if (fileInfoClass == FileSystemInfoClass.File_FsObjectId_Information && returnedStatus == MessageStatus.OBJECT_NAME_NOT_FOUND)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.SUCCESS, returnedStatus, site);
         byteCount      = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;
     }
     return(returnedStatus);
 }
 internal static MessageStatus WorkAroundQueryFileSystemInfo(FileSystemInfoClass fileInfoClass, OutputBufferSize outBufSmall, MessageStatus returnedStatus, ref FsInfoByteCount byteCount, ITestSite site)
 {
     if (fileInfoClass == FileSystemInfoClass.File_FsDriverPath_Information && outBufSmall == OutputBufferSize.NotLessThan)
     {
         // According to MS-FSA, it is expected to get error code STATUS_NOT_SUPPORTED
         // In SMB2 server, it returns STATUS_NOT_SUPPORTED correctly.
         // But SMB1 server responses with STATUS_INVALID_PARAMETER.
         // To keep same model behavior, transfer the error code to STATUS_NOT_SUPPORTED.
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.NOT_SUPPORTED, returnedStatus, site);
     }
     else if (fileInfoClass == FileSystemInfoClass.NOT_DEFINED_IN_FSCC && outBufSmall == OutputBufferSize.NotLessThan)
     {
         // For undefined information class, it is expected to get error code STATUS_NOT_SUPPORTED
         // In SMB2 server, it returns STATUS_NOT_SUPPORTED correctly.
         // But SMB1 server responses with STATUS_SUCCESS, and with "WarningErrorInfo" structure in query info outBuffer.
         // To keep same model behavior, transfer the error code to STATUS_NOT_SUPPORTED.
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.NOT_SUPPORTED, returnedStatus, site);
     }
     else if (fileInfoClass == FileSystemInfoClass.File_FsObjectId_Information && returnedStatus == MessageStatus.OBJECT_NAME_NOT_FOUND)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.SUCCESS, returnedStatus, site);
         byteCount      = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;
     }
     return(returnedStatus);
 }
        public static MessageStatus QueryFileSystemInfo(
            FileSystemInfoClass fileInfoClass,
            OutputBufferSize outBufSmall,
            out FsInfoByteCount byteCount)
        {
            byteCount = FsInfoByteCount.Zero;

            switch (fileInfoClass)
            {
                #region 3.1.5.12.1    FileFsVolumeInformation

            case (FileSystemInfoClass.File_FsVolumeInformation):
            {
                // If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2638, @"[In FileFsVolumeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_VOLUME_INFORMATION.VolumeLabel) + BytesToCopy.");
                byteCount = FsInfoByteCount.FieldOffset_FILE_FS_VOLUME_INFORMATION_VolumeLabel_Add_BytesToCopy;

                Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.VolumeLabelLength else STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.2    FileFsLabelInformation //3.1.5.12.9    FileFsDriverPathInformation

            case (FileSystemInfoClass.File_FsLabelInformation):
            {
                Helper.CaptureRequirement(2751, @"[MS-FSCC] section 2.5, FileFsLabelInformation is intended for local use only. Query request does not match the usage, STATUS_INVALID_INFO_CLASS is returned.");
                return(MessageStatus.INVALID_INFO_CLASS);
            }

            case (FileSystemInfoClass.File_FsDriverPath_Information):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.4   FileFsDeviceInformation, Pseudocode for the operation is as follows:]
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DRIVER_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2764, @"[In FileFsDriverPathInformation]This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                return(MessageStatus.NOT_SUPPORTED);
            }

                #endregion

                #region 3.1.5.12.3    FileFsSizeInformation //3.1.5.12.7    FileFsFullSizeInformation

            case (FileSystemInfoClass.File_FsSizeInformation):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.3 FileFsSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2672, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount MUST be set to sizeof(FILE_FS_SIZE_INFORMATION).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_SIZE_INFORMATION;

                Helper.CaptureRequirement(2673, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

            case (FileSystemInfoClass.File_FsFullSize_Information):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.7 FileFsFullSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_FULL_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2729, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_FULL_SIZE_INFORMATION ).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_FULL_SIZE_INFORMATION;

                Helper.CaptureRequirement(2730, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.4    FileFsDeviceInformation

            case (FileSystemInfoClass.File_FsDevice_Information):
            {
                // If OutputBufferSize is smaller than sizeof( FILE_FS_DEVICE_INFORMATION )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.4 FileFsDeviceInformation] Pseudocode for the operation is as follows: 
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DEVICE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2753, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_DEVICE_INFORMATION ).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_DEVICE_INFORMATION;

                Helper.CaptureRequirement(2680, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.5    FileFsAttributeInformation
            case (FileSystemInfoClass.File_FsAttribute_Information):
            {
                //If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2691, @"[In FileFsAttributeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 ), 
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName) + BytesToCopy.");
                byteCount = FsInfoByteCount.FieldOffset_FILE_FS_ATTRIBUTE_INFORMATION_FileSystemName_Add_BytesToCopy;

                Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.FileSystemNameLength else STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }
                #endregion

                #region 3.1.5.12.6    FileFsControlInformation

            case (FileSystemInfoClass.File_FsControlInformation):
            {
                // If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2707, @"[In FileFsControlInformation] Pseudocode for the operation is as follows: 
                                If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 ) the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                if (!gIsImplementQueryFileFsControlInformation)
                {
                    Helper.CaptureRequirement(7802, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:] 
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                    return(MessageStatus.INVALID_PARAMETER);
                }

                if (!gisQuotasSupported)
                {
                    Helper.CaptureRequirement(7803, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:] 
                                If Open.File.Volume.IsQuotasSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED");
                    return(MessageStatus.VOLUME_NOT_UPGRADED);
                }

                Helper.CaptureRequirement(2715, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:] 
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof(FILE_FS_CONTROL_INFORMATION).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_CONTROL_INFORMATION;

                Helper.CaptureRequirement(2716, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.8    FileFsObjectIdInformation

            case (FileSystemInfoClass.File_FsObjectId_Information):
            {
                // If OutputBufferSize is less than the size of FILE_FS_OBJECTID_INFORMATION
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2755, @"[In FileFsObjectIdInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is less than sizeof( FILE_FS_OBJECTID_INFORMATION ), 
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                if (!gIsImplementQueryFileFsObjectIdInformation)
                {
                    Helper.CaptureRequirement(4811, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:] 
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                    return(MessageStatus.INVALID_PARAMETER);
                }

                if (!gisObjectIDsSupported)
                {
                    Helper.CaptureRequirement(4812, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:] 
                                If Open.File.Volume.IsObjectIDsSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED.");
                    return(MessageStatus.VOLUME_NOT_UPGRADED);
                }

                Helper.CaptureRequirement(2761, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_OBJECTID_INFORMATION ).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;

                Helper.CaptureRequirement(2762, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 2.1.5.12.10   FileFsSectorSizeInformation

            case (FileSystemInfoClass.File_FsSectorSizeInformation):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SECTOR_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to the size of the FILE_FS_SECTOR_SIZE_INFORMATION structure.");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_SECTOR_SIZE_INFORMATION;

                Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region Information Class which is not defined in MS-FSCC
            case FileSystemInfoClass.Zero:
            {
                Requirement.Capture(@"[MS-FSCC 2.5 File System Information Classes] If an Information Class is specified that does not match the usage in the above table, STATUS_INVALID_INFO_CLASS MUST be returned.");
                return(MessageStatus.INVALID_INFO_CLASS);
            }

            case FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"Negative test with artificial FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
                                If OutputBufferSize is smaller than sizeof(NOT_DEFINED_IN_FSCC), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[MS-SMB2 section 3.3.5.20.2 Handling SMB2_0_INFO_FILESYSTEM] If the store does not support the data requested, the server MUST fail the request with STATUS_NOT_SUPPORTED.");
                return(MessageStatus.NOT_SUPPORTED);
            }
                #endregion

            default:
                break;
            }

            Helper.CaptureRequirement(2630, @"[In Application Requests a Query of File System Information]On completion, the object store MUST return:
                [Status,OutputBuffer,ByteCount].");
            return(MessageStatus.SUCCESS);
        }
 internal static MessageStatus WorkAroundQueryFileSystemInfo(FileSystemInfoClass fileInfoClass, OutputBufferSize outBufSmall, MessageStatus returnedStatus, ref FsInfoByteCount byteCount, ITestSite site)
 {
     if (fileInfoClass == FileSystemInfoClass.File_FsObjectId_Information && returnedStatus == MessageStatus.OBJECT_NAME_NOT_FOUND)
     {
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(2674, MessageStatus.SUCCESS, returnedStatus, site);
         byteCount = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;
     }
     return returnedStatus;
 }