osd: fix block device discard detection