lkml.org 
[lkml]   [2021]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [f2fs-dev] [PATCH] f2fs: include non-compressed blocks in compr_written_block
Sorry, many parts of userspace already rely on these names.
I wrote that compr_written_blocks shows the block count written after
compression since mount.
So, the count of blocks written as original data after compression
because of no gain would not be an exception.

Thanks,


On Wed, Oct 13, 2021 at 7:17 AM Chao Yu <chao@kernel.org> wrote:
>
> On 2021/10/12 0:02, Daeho Jeong wrote:
> >>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> >>> index c1bf9ad4c220..9b663eaf4805 100644
> >>> --- a/fs/f2fs/compress.c
> >>> +++ b/fs/f2fs/compress.c
> >>> @@ -1530,6 +1530,7 @@ int f2fs_write_multi_pages(struct compress_ctx *cc,
> >>> if (cluster_may_compress(cc)) {
> >>> err = f2fs_compress_pages(cc);
> >>> if (err == -EAGAIN) {
> >>> + add_compr_block_stat(cc->inode, cc->cluster_size);
> >>
> >> Shouldn't we relocate this after 'write' label?
> >>
> >> One more concern, it looks we've changed what compr_block stat indicated,
> >> literally, the block we account should be compressed..., how about accounting
> >> it by introducing .presist_blocks, used_blocks or occupied_blocks.... thoughts?
> >>
> >
> > What I wanted to add here is just one case in which compression was
> > tried, but couldn't save any block, so gave up.
> > If we put this below the "write" label, we will count blocks, even if
> > the file is turned off for compression in "user-controlled
> > compression" mode.
> > Like the commit comment says, I want to estimate the overall compression rate.
> > But, if we include every other compression disabled condition, it
> > won't work like that.
>
> Got it, thanks for the explanation.
>
> Any thoughts about renaming compr_block? since some blocks accounted in
> .compr_block weren't compressed blocks.
>
> Thanks,
>
> >
> > Thanks,
> >

\
 
 \ /
  Last update: 2021-10-13 19:53    [W:0.085 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site