From: Chao Yu <chao@kernel.org>
To: Sun Ke <sunke32@huawei.com>
Cc: guan@eryu.me, fstests@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] generic/260: f2fs is also special
Date: Wed, 16 Jun 2021 21:43:19 +0800 [thread overview]
Message-ID: <6362f24f-35d1-7e5b-c3cc-d6cbb18947fe@kernel.org> (raw)
In-Reply-To: <87024647-0ece-929d-8aa6-8dab9609159c@huawei.com>
On 2021/6/15 11:29, Sun Ke wrote:
> to linux-f2fs-devel@lists.sourceforge.net
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> It seem that f2fs also special like btrfs.
>>
>> [+] Default length with start set (should succeed)
>> [+] Length beyond the end of fs (should succeed)
>> [+] Length beyond the end of fs with start set (should succeed)
>> +After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
>> +It seems that fs logic handling len argument overflows
Well, the root cause is f2fs can tag a special flag TRIMMED_FLAG to
indicate the whole filesystem is trimmed, so after mkfs/fstrim(),
following fstrim() won't trim any block.
Can you please update commit message and add comments in script?
Thanks,
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I am not sure about that. o(╯□╰)o
>>
>> tests/generic/260 | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/generic/260 b/tests/generic/260
>> index 8021aa68..6bd861d2 100755
>> --- a/tests/generic/260
>> +++ b/tests/generic/260
>> @@ -100,7 +100,7 @@ fi
>> # It is because btrfs does not have not-yet-used parts of the device
>> # mapped and since we got here right after the mkfs, there is not
>> # enough free extents in the root tree.
>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
>> status=1
>> echo "After the full fs discard $bytes bytes were discarded"\
>> "however the file system is $(_math "$fssize*1024") bytes long."
>> @@ -160,7 +160,7 @@ _scratch_mount
>> # mapped and since we got here right after the mkfs, there is not
>> # enough free extents in the root tree.
>> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
>> status=1
>> echo "It seems that fs logic handling len argument overflows"
>> fi
>>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2021-06-16 13:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210611112211.1408767-1-sunke32@huawei.com>
2021-06-15 3:25 ` [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke
2021-06-16 12:36 ` Chao Yu
2021-06-17 3:45 ` Sun Ke
2021-06-17 23:46 ` Chao Yu
2021-06-18 2:03 ` Sun Ke
[not found] ` <20210611112211.1408767-2-sunke32@huawei.com>
2021-06-15 3:28 ` [f2fs-dev] [PATCH] generic/103: leave more space for f2fs Sun Ke
2021-06-16 13:15 ` Chao Yu
2021-06-17 6:22 ` Sun Ke
[not found] ` <20210611112211.1408767-3-sunke32@huawei.com>
2021-06-15 3:29 ` [f2fs-dev] [PATCH] generic/260: f2fs is also special Sun Ke
2021-06-16 13:43 ` Chao Yu [this message]
2021-06-17 6:38 ` Sun Ke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6362f24f-35d1-7e5b-c3cc-d6cbb18947fe@kernel.org \
--to=chao@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=sunke32@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).