mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Eric Biggers <ebiggers@kernel.org>
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: Tue, 8 Dec 2020 08:59:12 +0800	[thread overview]
Message-ID: <8cccbe7f-94c0-ddd0-4da5-234d02839ae0@huawei.com> (raw)
In-Reply-To: <X85wshahXe4nR+N6@gmail.com>

On 2020/12/8 2:13, Eric Biggers wrote:
> 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.

I'd like to use "a filesystem managed inode" instead, if there is no further
comment.

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

Yup,

Thanks,

> 
> - Eric
> .
> 

      reply	other threads:[~2020-12-08  1:00 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 ` [f2fs-dev] " Eric Biggers
2020-12-08  0:59   ` 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=8cccbe7f-94c0-ddd0-4da5-234d02839ae0@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=ebiggers@kernel.org \
    --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 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®