On Wed, Oct 26, 2022 at 10:42 AM Martin K. Petersen <martin.petersen@xxxxxxxxxx> wrote: > > > Xiao, > > > If the upper layer submit 1GB request, SCSI will split them and handle > > 32MB requests in default. If the upper layer wants SCSI to handle 1GB > > one time, it needs to pass some information to SCSI, right? > > It is the device that defines its capabilities, not Linux. If the device > states it wants 32MB per request, then that's what we'll issue. > > >> In NVMe there's a limit of 64K blocks per range and 256 ranges per > >> request. So 8GB or 64GB per request for discard depending on the block > >> size. So presumably it will take several operations to deallocate an > >> entire drive. > > > > Could you tell the command how to check the block size. > > blockdev --getsz tells the sector size of the device. It should not be the > > block size you mentioned here. > > blockdev --getss will tell you the device's logical block size. > > -- > Martin K. Petersen Oracle Linux Engineering > Hi Martin Thanks for all the explanations :) Regards Xiao