lkml.org 
[lkml]   [2020]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [f2fs-dev] [PATCH v5 RESEND] f2fs: compress: add compress_inode to cache compressed blocks
    From
    Date
    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
    > .
    >

    \
     
     \ /
      Last update: 2020-12-08 02:02    [W:3.815 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site