From: Vladislav B. <vs...@vl...> - 2016-07-28 03:03:12
|
Hi, Alex Gorbachev wrote on 07/27/2016 08:55 AM: > Hi Vlad, > > On Mon, Jul 25, 2016 at 10:44 PM, Vladislav Bolkhovitin <vs...@vl...> wrote: >> Hi, >> >> I would suggest to rebuild SCST in the debug mode (after "make 2debug"), then before >> calling the unmap command enable "scsi" and "debug" logging for scst and scst_vdisk >> modules by 'echo add scsi >/sys/kernel/scst_tgt/trace_level; echo "add scsi" >>> /sys/kernel/scst_tgt/handlers/vdisk_fileio/trace_level; echo "add debug" >>> /sys/kernel/scst_tgt/handlers/vdisk_fileio/trace_level', then check, if for the unmap >> command vdisk_unmap_range() is reporting running blkdev_issue_discard() in the kernel >> logs. >> >> To double check, you might also add trace statement just before blkdev_issue_discard() >> in vdisk_unmap_range(). > > With the debug settings on, I am seeing the below output - this means > that discard is being sent to the backing (RBD) device, correct? Correct. However, you can see some other code in vdisk_unmap_range() between this trace statement and actual blkdev_issue_discard() call, so, to be completely sure, I'd suggest you to add something like: TRACE_DBG("Discarding (start_sector %lld, nr_sects %lld)", (unsigned long long)start_sector, (unsigned long long)nr_sects); right before blkdev_issue_discard() for your kernel. Vlad |