FreeBSD/sys/dev/isci/scil/sati_unmap.c
/**
 * @brief This method translates a given number of DSM
 *        requests into DSM blocks based on the devices logical block size
 *
 * @return Number of DSM blocks required for the DSM descriptor count
 */
@brief This method translates a given number of DSM
requests into DSM blocks based on the devices logical block size

@return Number of DSM blocks required for the DSM descriptor count
@brief This method translates a given number of DSM requests into DSM blocks based on the devices logical block size @return Number of DSM blocks required for the DSM descriptor count
U32 sati_unmap_calculate_dsm_blocks(
   SATI_TRANSLATOR_SEQUENCE_T * sequence,
   U32                          dsm_descriptor_count
)
{
   U32 blocks = (dsm_descriptor_count * sizeof(TRIM_PAIR))/sequence->device->logical_block_size;
   if ((dsm_descriptor_count * sizeof(TRIM_PAIR)) % sequence->device->logical_block_size)
   {
       blocks++;
   }
   return blocks;
}
U32 sati_unmap_calculate_dsm_blocks ( SATI_TRANSLATOR_SEQUENCE_T * sequence , U32 dsm_descriptor_count ) { U32 blocks = ( dsm_descriptor_count * sizeof ( TRIM_PAIR ) ) / sequence -> device -> logical_block_size ; if ( ( dsm_descriptor_count * sizeof ( TRIM_PAIR ) ) % sequence -> device -> logical_block_size ) { blocks ++ ; } return blocks ; }
@brief This method translates a given number of DSM
        requests into DSM blocks based on the devices logical block size
@brief This method translates a given number of DSM requests into DSM blocks based on the devices logical block size