From: Chao Yu <chao2.yu@samsung.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Changman Lee <cm224.lee@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH 0/5] f2fs: support inline dir
Date: Sat, 09 Aug 2014 10:44:31 +0800 [thread overview]
Message-ID: <00be01cfb37b$f3ba83f0$db2f8bd0$@samsung.com> (raw)
There are large space in f2fs inode, so last inline data patch set have made
f2fs to acquire the ability of storing data of small file (less than ~3.4k)
directly in inode block, but not support inline dir. In this patch, we make
f2fs to support inline dir.
Layout:
Inline dir layout is the same as inline data layout,
a. i_addr[0] are reserved space for converting from inline dir to regular one
when out-of-space occur in inline dentry.
b. i_addr[1..872] will be used as storing space of inline dentry.
c. i_addr[873..922] are reserved for inline xattr.
Size:
Since our max size of inline dir space is limit to MAX_INLINE_DATA (3488 bytes),
we introduce inline dentry struct fit for available space, then our dentry slot
number in inline dentry reduce to 182, less than normal dentry block's 214.
Process:
In inline dir mode, our dir entries will be lookuped/stored/deleted in the
inline dentry space of inode, util there are no more space to store new added
dir entry, in this case we will convert inline dentry to normal 0-index dentry
block and disable inline dir mode for this inode.
Benefit points:
a) space saving
1) Test with fsstress with special arguments, it can save about 3% space.
time fsstress -c -p 20 -n 500 -l 10 -d /mnt/f2fs -w -f chown=0 -f creat=10
-f dwrite=0 -f fdatasync=0 -f fsync=0 -f link=10 -f mkdir=10 -f mknod=10
-f rename=0 -f rmdir=0 -f symlink=10 -f truncate=0 -f unlink=0 -f write=10 -S
based /dev/sdb 20969472 2234136 18591976 11% /mnt/f2fs
patched /dev/sdb 20969472 2303120 18522992 12% /mnt/f2fs
2) Test with storing kernel src, it can save less than 1% space.
b) performance
Test with fsstress shows cost time reduce 21%.
time fsstress -d /mnt/f2fs -l 5 -n 1000 -p 20 -c -r
based 168.503 s (inline data)
patched 132.840 s (inline data + inline dir)
Chao Yu (5):
f2fs: add infra macro and sturct for inline dir
f2fs: export dir operations for inline dir
f2fs: add key function to handle inline dir
f2fs: enable inline dir handling
f2fs: update f2fs documentation
Documentation/filesystems/f2fs.txt | 5 +-
fs/f2fs/dir.c | 48 +++--
fs/f2fs/f2fs.h | 18 +-
fs/f2fs/inline.c | 388 +++++++++++++++++++++++++++++++++++++
fs/f2fs/namei.c | 8 +-
fs/f2fs/recovery.c | 2 +-
include/linux/f2fs_fs.h | 18 ++
7 files changed, 469 insertions(+), 18 deletions(-)
--
2.0.1.474.g72c7794
------------------------------------------------------------------------------
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao2.yu@samsung.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Changman Lee <cm224.lee@samsung.com>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [f2fs-dev][PATCH 0/5] f2fs: support inline dir
Date: Sat, 09 Aug 2014 10:44:31 +0800 [thread overview]
Message-ID: <00be01cfb37b$f3ba83f0$db2f8bd0$@samsung.com> (raw)
There are large space in f2fs inode, so last inline data patch set have made
f2fs to acquire the ability of storing data of small file (less than ~3.4k)
directly in inode block, but not support inline dir. In this patch, we make
f2fs to support inline dir.
Layout:
Inline dir layout is the same as inline data layout,
a. i_addr[0] are reserved space for converting from inline dir to regular one
when out-of-space occur in inline dentry.
b. i_addr[1..872] will be used as storing space of inline dentry.
c. i_addr[873..922] are reserved for inline xattr.
Size:
Since our max size of inline dir space is limit to MAX_INLINE_DATA (3488 bytes),
we introduce inline dentry struct fit for available space, then our dentry slot
number in inline dentry reduce to 182, less than normal dentry block's 214.
Process:
In inline dir mode, our dir entries will be lookuped/stored/deleted in the
inline dentry space of inode, util there are no more space to store new added
dir entry, in this case we will convert inline dentry to normal 0-index dentry
block and disable inline dir mode for this inode.
Benefit points:
a) space saving
1) Test with fsstress with special arguments, it can save about 3% space.
time fsstress -c -p 20 -n 500 -l 10 -d /mnt/f2fs -w -f chown=0 -f creat=10
-f dwrite=0 -f fdatasync=0 -f fsync=0 -f link=10 -f mkdir=10 -f mknod=10
-f rename=0 -f rmdir=0 -f symlink=10 -f truncate=0 -f unlink=0 -f write=10 -S
based /dev/sdb 20969472 2234136 18591976 11% /mnt/f2fs
patched /dev/sdb 20969472 2303120 18522992 12% /mnt/f2fs
2) Test with storing kernel src, it can save less than 1% space.
b) performance
Test with fsstress shows cost time reduce 21%.
time fsstress -d /mnt/f2fs -l 5 -n 1000 -p 20 -c -r
based 168.503 s (inline data)
patched 132.840 s (inline data + inline dir)
Chao Yu (5):
f2fs: add infra macro and sturct for inline dir
f2fs: export dir operations for inline dir
f2fs: add key function to handle inline dir
f2fs: enable inline dir handling
f2fs: update f2fs documentation
Documentation/filesystems/f2fs.txt | 5 +-
fs/f2fs/dir.c | 48 +++--
fs/f2fs/f2fs.h | 18 +-
fs/f2fs/inline.c | 388 +++++++++++++++++++++++++++++++++++++
fs/f2fs/namei.c | 8 +-
fs/f2fs/recovery.c | 2 +-
include/linux/f2fs_fs.h | 18 ++
7 files changed, 469 insertions(+), 18 deletions(-)
--
2.0.1.474.g72c7794
next reply other threads:[~2014-08-09 2:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-09 2:44 Chao Yu [this message]
2014-08-09 2:44 ` [f2fs-dev][PATCH 0/5] f2fs: support inline dir Chao Yu
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='00be01cfb37b$f3ba83f0$db2f8bd0$@samsung.com' \
--to=chao2.yu@samsung.com \
--cc=cm224.lee@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.