From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Rohner Subject: [PATCH 0/2] nilfs2: add support for FITRIM ioctl Date: Mon, 17 Feb 2014 23:39:50 +0100 Message-ID: Return-path: Sender: linux-nilfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Andreas Rohner Hi, This patch adds support for the FITRIM ioctl, which allows user space tools like fstrim to issue TRIM/DISCARD requests to the underlying device. It takes a fstrim_range structure as a parameter and for every clean segment in the specified range the function blkdev_issue_discard is called. The range is truncated to sector boundaries. Best regards, Andreas Rohner --- v1->v2 (based on review by Ryusuke Konishi) * Remove upper limit of minlen * Add check for minlen * Round range to sector boundary instead of segment boundary * Fix minor bug * Use kmap_atomic instead of kmap * Move input checks to ioctl.c * Use nilfs_sufile_segment_usages_in_block() -- Andreas Rohner (2): nilfs2: add nilfs_sufile_trim_fs to trim clean segs nilfs2: add FITRIM ioctl support for nilfs2 fs/nilfs2/ioctl.c | 52 +++++++++++++++++++ fs/nilfs2/sufile.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nilfs2/sufile.h | 1 + 3 files changed, 197 insertions(+) -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html