All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] nilfs2: add support for FITRIM ioctl
@ 2014-02-23  8:42 Andreas Rohner
       [not found] ` <cover.1393144838.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Rohner @ 2014-02-23  8:42 UTC (permalink / raw)
  To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA; +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 file system block boundaries.

I tested it with a 32 bit and 64 bit kernel. On the 32 bit system 
CONFIG_LBDAF was disabled so that sector_t was 32 bit.  

Best regards,
Andreas Rohner

---
v3->v4 (based on review by Ryusuke Konishi)
 * Fix integer overflow
 * Add comment
v2->v3 (based on review by Ryusuke Konishi)
 * Fix integer overflow
 * Round range to block boundary instead of sector boundary
 * Move range check to nilfs_sufile_trim_fs()
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  |  45 ++++++++++++++++
 fs/nilfs2/sufile.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/nilfs2/sufile.h |   1 +
 3 files changed, 198 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-23  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23  8:42 [PATCH v4 0/2] nilfs2: add support for FITRIM ioctl Andreas Rohner
     [not found] ` <cover.1393144838.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-23  8:42   ` [PATCH v4 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs Andreas Rohner
2014-02-23  8:42   ` [PATCH v4 2/2] nilfs2: add FITRIM ioctl support for nilfs2 Andreas Rohner
2014-02-23  9:53   ` [PATCH v4 0/2] nilfs2: add support for FITRIM ioctl Ryusuke Konishi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.