diff options
author | Andreas Rohner <andreas.rohner@gmx.net> | 2014-04-03 17:50:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:25 -0400 |
commit | 82e11e857be3ffd2a0a952c9db8aa2379e2b9e44 (patch) | |
tree | cec1b7aeec361bf287c359d0a2c00c1c3315ffe0 /fs/nilfs2/sufile.h | |
parent | 2cc88f3a5f16ae9a3c8f54de1b2fd4a397b36075 (diff) |
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>
Diffstat (limited to 'fs/nilfs2/sufile.h')
-rw-r--r-- | fs/nilfs2/sufile.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nilfs2/sufile.h b/fs/nilfs2/sufile.h index 366003c93ec9..b8afd72f2379 100644 --- a/fs/nilfs2/sufile.h +++ b/fs/nilfs2/sufile.h | |||
@@ -66,6 +66,7 @@ void nilfs_sufile_do_set_error(struct inode *, __u64, struct buffer_head *, | |||
66 | int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs); | 66 | int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs); |
67 | int nilfs_sufile_read(struct super_block *sb, size_t susize, | 67 | int nilfs_sufile_read(struct super_block *sb, size_t susize, |
68 | struct nilfs_inode *raw_inode, struct inode **inodep); | 68 | struct nilfs_inode *raw_inode, struct inode **inodep); |
69 | int nilfs_sufile_trim_fs(struct inode *sufile, struct fstrim_range *range); | ||
69 | 70 | ||
70 | /** | 71 | /** |
71 | * nilfs_sufile_scrap - make a segment garbage | 72 | * nilfs_sufile_scrap - make a segment garbage |