On Mon, May 02, 2011 at 01:25:04PM +0200, Lukas Czerner wrote: > Currently there is no convenient way how to get the information from > userspace whether or not the block device supports discard other > than try to call BLKDISCARD ioctl and check the result, which is not > really good way to do it. > > We already have BLKDISCARDZEROES ioctl and > /sys/block/sda/queue/discard_zeroes_data to tell whether subsequent > reads after discard returns all zeroes. This commit adds at least sysfs > interface /sys/block/sda/queue/discard_support to tell whether device > support discard. > > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> > Cc: Jens Axboe <jaxboe@xxxxxxxxxxxx> > Cc: Jeff Moyer <jmoyer@xxxxxxxxxx> > --- > block/blk-sysfs.c | 11 +++++++++++ If you ever change/add/remove a sysfs file, you also need a Documentation/ABI/ entry. Please include that in the next revision of this patch, if you do one. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html