From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH] sys/block: Add discard_support entry Date: Mon, 2 May 2011 10:36:10 -0700 Message-ID: <20110502173610.GA13337@kroah.com> References: <1304335504-14048-1-git-send-email-lczerner@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Jens Axboe , Jeff Moyer To: Lukas Czerner Return-path: Received: from kroah.org ([198.145.64.141]:55193 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753938Ab1EBRf3 (ORCPT ); Mon, 2 May 2011 13:35:29 -0400 Content-Disposition: inline In-Reply-To: <1304335504-14048-1-git-send-email-lczerner@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 > Cc: Jens Axboe > Cc: Jeff Moyer > --- > 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