diff options
author | Lukas Czerner <lczerner@redhat.com> | 2012-10-16 09:39:08 (GMT) |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-11-07 09:41:58 (GMT) |
commit | 076f0faa764ab3a5a32fc726ae05e2de0e66151d (patch) | |
tree | 044f34fe4c73b9c79191b6dfce1770980b4e9b41 /fs/locks.c | |
parent | 3a238adefb8c5b8cb8cde0ce689d513306176ff4 (diff) | |
download | linux-076f0faa764ab3a5a32fc726ae05e2de0e66151d.tar.xz |
GFS2: Fix FITRIM argument handling
Currently implementation in gfs2 uses FITRIM arguments as it were in
file system blocks units which is wrong. The FITRIM arguments
(fstrim_range.start, fstrim_range.len and fstrim_range.minlen) are
actually in bytes.
Moreover, check for start argument beyond the end of file system, len
argument being smaller than file system block and minlen argument being
bigger than biggest resource group were missing.
This commit converts the code to convert FITRIM argument to file system
blocks and also adds appropriate checks mentioned above.
All the problems were recognised by xfstests 251 and 260.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/locks.c')
0 files changed, 0 insertions, 0 deletions