• C
    f2fs: fix to return success when trimming meta area · 3f16ecd9
    Chao Yu 提交于
    generic/251
        --- tests/generic/251.out	2016-05-03 20:20:11.381899000 +0800
         QA output created by 251
         Running the test: done.
        +fstrim: /mnt/scratch_f2fs: FITRIM ioctl failed: Invalid argument
        +fstrim: /mnt/scratch_f2fs: FITRIM ioctl failed: Invalid argument
        +fstrim: /mnt/scratch_f2fs: FITRIM ioctl failed: Invalid argument
        +fstrim: /mnt/scratch_f2fs: FITRIM ioctl failed: Invalid argument
        +fstrim: /mnt/scratch_f2fs: FITRIM ioctl failed: Invalid argument
        ...
    Ran: generic/251
    Failures: generic/251
    
    The reason is coverage of fstrim locates in meta area, previously we
    just return -EINVAL for such case, making generic/251 failed, to fix
    this problem, let's relieve restriction to return success with no
    block discarded.
    Signed-off-by: NChao Yu <yuchao0@huawei.com>
    Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
    3f16ecd9
segment.c 108.8 KB