From: Chao Yu <chao@kernel.org>
To: Wu Bo <bo.wu@vivo.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Wu Bo <wubo.oduw@gmail.com>
Subject: Re: [RFC PATCH 0/5] Add inline tail support
Date: Fri, 12 Jul 2024 15:12:11 +0800 [thread overview]
Message-ID: <2b5ab848-1ce1-4f5d-bb7f-2286bf76e6cf@kernel.org> (raw)
In-Reply-To: <cover.1720515215.git.bo.wu@vivo.com>
On 2024/7/10 9:33, Wu Bo wrote:
> The inode in F2FS occupies an entire 4k block. For many small files, this means
> they consume much more space than their actual size. Therefore, there is
> significant potential to better utilize the inode block space.
>
> Currently, F2FS has two features to make use of the inode block space: inline
> data and inline xattr.
>
> Inline data stores file which size is smaller then 3.5k in inode block. However,
> for slightly larger small files, there still have much waste.
> For example, a 5k file requires 3 blocks, totaling 12k of space, which is
> more than twice the size of the file itself!
>
> Additionally, the end of a file often does not occupy an entire block. If we can
> store the end of the file data within the inode block, we can save an entire
> block for the file. This is particularly important for small files.
>
> In fact, the current inline data is a special case of inline tail, and
> inline tail is an extension of inline data.
>
> To verify the benefits of inline tail, I have developed these preliminary codes.
> To make it simple, inline tail only on small files(<64k). And the layout of
> an inode block is following:
>
> | inode block | 4096 | inline tail enable |
> | --------------- | ---- | --------------------------|
> | inode info | 360 | |
> | --------------- | ---- | --------------------------|
> | | | extra info | 0~36 |
> | | | **compact_addr[16] | 64 |
> | addr table[923] | 3692 | reserved | 4 |
> | | | **tail data | |
> | | | inline_xattr | 200 |
> | --------------- | ---- | --------------------------|
> | nid table[5] | 20 |
> | node footer | 24 |
>
> I tested inline tail by copying the source code of Linux 6.9.7. The storage
> space was reduced by approximately 8%. Additionally, due to the reduced IO, the
> copy time also reduced by around 10%.
Wu Bo,
Thanks for the effort, but can you please change user-space tools as well?
since this patchset changes layout of inode.
Thanks,
>
> Wu Bo (5):
> f2fs: add inline tail mount option
> f2fs: add inline tail disk layout definition
> f2fs: implement inline tail write & truncate
> f2fs: implement inline tail read & fiemap
> f2fs: set inline tail flag when create inode
>
> fs/f2fs/data.c | 61 ++++++++++++++++++++++++++++++++++++++++++++-
> fs/f2fs/f2fs.h | 44 ++++++++++++++++++++++++++++++++-
> fs/f2fs/file.c | 10 ++++++++
> fs/f2fs/inline.c | 64 ++++++++++++++++++++++++++++++++----------------
> fs/f2fs/inode.c | 6 +++++
> fs/f2fs/namei.c | 3 +++
> fs/f2fs/node.c | 6 ++++-
> fs/f2fs/super.c | 15 ++++++++++++
> 8 files changed, 185 insertions(+), 24 deletions(-)
>
prev parent reply other threads:[~2024-07-12 7:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 1:33 Wu Bo
2024-07-10 1:33 ` [RFC PATCH 1/5] f2fs: add inline tail mount option Wu Bo
2024-07-10 1:33 ` [RFC PATCH 2/5] f2fs: add inline tail disk layout definition Wu Bo
2024-07-10 1:33 ` [RFC PATCH 3/5] f2fs: implement inline tail write & truncate Wu Bo
2024-07-10 1:33 ` [RFC PATCH 4/5] f2fs: implement inline tail read & fiemap Wu Bo
2024-07-10 1:33 ` [RFC PATCH 5/5] f2fs: set inline tail flag when create inode Wu Bo
2024-07-12 7:12 ` Chao Yu [this message]
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=2b5ab848-1ce1-4f5d-bb7f-2286bf76e6cf@kernel.org \
--to=chao@kernel.org \
--cc=bo.wu@vivo.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=wubo.oduw@gmail.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
all inboxes | Powered by JetHome®