DFSReturnVolumeBlockInformation

Returns the volume block usage bitmap for requested volume

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:4.x, 5.x, 6.x
Platform:NLM
Service:Direct File System

Syntax

  #include <nwdfs.h>  
   
  LONG DFSReturnVolumeBlockInformation  (  
     LONG    volumeNumber,   
     LONG    startingBlockNumber,   
     LONG    numberOfBlocks,   
     BYTE   *buffer); 
  

Parameters

volumeNumber
(IN) Specifies the volume number for which the volume block information is desired.
startingBlockNumber
(IN) Specifies volume logical block zero or an even multiple of 8 up to the last block of the volume.
numberOfBlocks
(IN/OUT) Specifies the number of blocks for which allocation bit flags are to be transferred into the buffer (If startingBlockNumber plus numberOfBlocks is greater than the total number of volume blocks, the number of volume blocks remaining starting from startingBlockNumber is substituted here).
buffer
(OUT) Points to a pointer to a buffer area where the information is returned. The area required for the buffer is the number of blocks rounded up modulus 8. The format of the data in the buffer is bit array, with 1 bits indicating available blocks. The relative bit address of each bit is the block address relative to the beginning of the specified starting file block number.

Return Values

Decimal

Constant

Description

0

DFSNormalCompletion

The operation is complete and information fields are valid.

152

DFSInvalidVolume

The volume number specified does not exist or not mounted.

Remarks

This function is used to determine which blocks on a volume are in use and that are available for allocation. This function returns a bitmap which has a bit for each block in the range specified in the calling parameters, beginning with the logical (zero-based) volume block indicated by startingBlockNumber. This information is required if an application NLM is attempting to do specific allocation for a file, in order to pick block ranges of contiguous free blocks to expand a file.

The data returned by this function is only valid until it is changed by some request, and can change dynamically before an application can successfully request allocation of the blocks selected. The application process must be designed to handle this exception, as well as the case where there is not a single contiguous free block area large enough to satisfy the file expansion request.

See Also

DFSReturnFileMappingInformation, DFSReturnVolumeMappingInformation