nilfs2: add nilfs_sufile_trim_fs to trim clean segs
authorAndreas Rohner <andreas.rohner@gmx.net>
Thu, 3 Apr 2014 21:50:29 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:25 +0000 (16:21 -0700)
commit82e11e857be3ffd2a0a952c9db8aa2379e2b9e44
treecec1b7aeec361bf287c359d0a2c00c1c3315ffe0
parent2cc88f3a5f16ae9a3c8f54de1b2fd4a397b36075
nilfs2: add nilfs_sufile_trim_fs to trim clean segs

Add nilfs_sufile_trim_fs(), which takes an fstrim_range structure and
calls blkdev_issue_discard for every clean segment in the specified
range.  The range is truncated to file system block boundaries.

Signed-off-by: Andreas Rohner <andreas.rohner@gmx.net>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nilfs2/sufile.c
fs/nilfs2/sufile.h