linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev]  Not use inline_data  after file shrink
@ 2015-05-29  5:05 He YunLei
  2015-05-29 10:51 ` Chao Yu
  2015-05-29 22:41 ` Jaegeuk Kim
  0 siblings, 2 replies; 5+ messages in thread
From: He YunLei @ 2015-05-29  5:05 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-fsdevel, Bintian, hujianyang

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-05 10:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29  5:05 [f2fs-dev] Not use inline_data after file shrink He YunLei
2015-05-29 10:51 ` Chao Yu
2015-05-29 23:14   ` Jaegeuk Kim
2015-06-05 10:13     ` Chao Yu
2015-05-29 22:41 ` Jaegeuk Kim

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).