From: Eric Biggers <ebiggers@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v5 RESEND] f2fs: compress: add compress_inode to cache compressed blocks
Date: Mon, 7 Dec 2020 10:13:06 -0800 [thread overview]
Message-ID: <X85wshahXe4nR+N6@gmail.com> (raw)
In-Reply-To: <20201207095220.73093-1-yuchao0@huawei.com>
On Mon, Dec 07, 2020 at 05:52:20PM +0800, Chao Yu wrote:
> diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst
> index dae15c96e659..fd413d319e93 100644
> --- a/Documentation/filesystems/f2fs.rst
> +++ b/Documentation/filesystems/f2fs.rst
> @@ -268,6 +268,9 @@ compress_mode=%s Control file compression mode. This supports "fs" and "user"
> choosing the target file and the timing. The user can do manual
> compression/decompression on the compression enabled files using
> ioctls.
> +compress_cache Support to use address space of inner inode to cache
> + compressed block, in order to improve cache hit ratio of
> + random read.
What is an "inner inode"? Mount options should be understandable without
understanding filesystem implementation details.
> +const struct address_space_operations f2fs_compress_aops = {
> + .releasepage = f2fs_release_page,
> + .invalidatepage = f2fs_invalidate_page,
> +};
> +
> +struct address_space *COMPRESS_MAPPING(struct f2fs_sb_info *sbi)
> +{
> + return sbi->compress_inode->i_mapping;
> +}
> +
> +void invalidate_compress_page(struct f2fs_sb_info *sbi, block_t blkaddr)
> +{
> + if (!sbi->compress_inode)
> + return;
> + invalidate_mapping_pages(COMPRESS_MAPPING(sbi), blkaddr, blkaddr);
> +}
Global functions should have the "f2fs_" prefix.
- Eric
next prev parent reply other threads:[~2020-12-07 18:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 9:52 Chao Yu
2020-12-07 18:13 ` Eric Biggers [this message]
2020-12-08 0:59 ` [f2fs-dev] " 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=X85wshahXe4nR+N6@gmail.com \
--to=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@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
Powered by JetHome