Re: [PATCH v6] fat: Batched discard support for fat

OGAWA Hirofumi
2011-03-29T07:28:37Z

Kyungmin Park <kmpark@infradead.org> writes:

>> I looked at fstrim.c. It is lowlevel tools to just issue FITRIM - it
>> doesn't use the result at all.
>>
>> Um. Honestly I'd like to see more or wait until real user for now,
>> instead of providing unclear design.
>
> You can find the testcase xfs251(?)
>
> and it's our our usage. After UMS support finished, execute the trim
> command from 0 to MAXINT.
> and periodically call the trim FAT partitions.

It seems to be using fstrim. So state is same with fstrim.
More detail is,

1) This means to trim 0-ULLONG

fstrim mntpoint

2) step for each 1GB

while all blocks; do
fstrim -s start -l step mntpoint
done

Those bring the real problem up on this example. What is right behavior
if start + len is outside the end of FS? Also I think other issues on
this thread are same state.

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>