From: He YunLei <heyunlei@huawei.com>
To: <jaegeuk@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>,
<linux-fsdevel@vger.kernel.org>,
Bintian <bintian.wang@huawei.com>, <hujianyang@huawei.com>
Subject: [f2fs-dev] Not use inline_data after file shrink
Date: Fri, 29 May 2015 13:05:06 +0800 [thread overview]
Message-ID: <5567F382.5060403@huawei.com> (raw)
Hi Jaegeuk,
I found that when files(size > MAX_INLINE_DATA) shrink(size < MAX_INLINE_DATA),
inline_data option is not used in the file after narrow
I mount f2fs with inline_data as follow:
/dev/block/mmcblk0p40 /data f2fs rw,nosuid,nodev,noatime,background_gc=on,discard,
user_xattr,inline_xattr,acl,inline_data,active_logs=6 0 0
First,I create a small file by command echo for testing inline_data.
root@hyl:/data # echo 123 > tmp1
root@hyl:/data # busybox stat tmp1
File: tmp1
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: 10300h/66304d Inode: 2173 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 0/ UNKNOWN) Gid: ( 0/ UNKNOWN)
Access: 2015-05-29 02:59:53.000000000
Modify: 2015-05-29 02:59:53.000000000
Change: 2015-05-29 02:59:53.000000000
It works well, then I create a file with size 4096(>MAX_INLINE_DATA).
127|root@hyl:/data # busybox stat tmp
File: tmp
Size: 4096 Blocks: 16 IO Block: 4096 regular file
Device: 10300h/66304d Inode: 109 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 0/ UNKNOWN) Gid: ( 0/ UNKNOWN)
Access: 2015-05-28 08:48:50.000000000
Modify: 2015-05-28 08:48:50.000000000
Change: 2015-05-28 08:53:18.000000000
It doesn't use inline_data because file size 4096 > MAX_INLINE_DATA,
So I shrink the file by I/O redirection
root@hyl:/data # echo 123 > tmp
root@hyl:/data # busybox stat tmp
File: tmp
Size: 4 Blocks: 16 IO Block: 4096 regular file
Device: 10300h/66304d Inode: 109 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 0/ UNKNOWN) Gid: ( 0/ UNKNOWN)
Access: 2015-05-28 08:48:50.000000000
Modify: 2015-05-29 02:58:31.000000000
Change: 2015-05-29 02:58:31.000000000
We can see that file still uses 16 Blocks
How do we deal with such situation? it's meaningful to reuse inline_data?
I wish you and other developers in this list could help me in a correct way.
Thanks,
He
next reply other threads:[~2015-05-29 5:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 5:05 He YunLei [this message]
2015-05-29 10:51 ` [f2fs-dev] Not use inline_data after file shrink Chao Yu
2015-05-29 23:14 ` Jaegeuk Kim
2015-06-05 10:13 ` Chao Yu
2015-05-29 22:41 ` Jaegeuk Kim
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=5567F382.5060403@huawei.com \
--to=heyunlei@huawei.com \
--cc=bintian.wang@huawei.com \
--cc=hujianyang@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
/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).