lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d354bbe-9d1e-f3e0-b918-b9ec023a93ba@huawei.com>
Date:   Fri, 27 Nov 2020 17:44:30 +0800
From:   Chao Yu <yuchao0@...wei.com>
To:     Daeho Jeong <daeho43@...il.com>
CC:     <linux-kernel@...r.kernel.org>,
        <linux-f2fs-devel@...ts.sourceforge.net>,
        <kernel-team@...roid.com>, Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: add compr_inode and compr_blocks sysfs
 nodes

Daeho,

How about updating this patch based on below patch?

	f2fs: introduce a new per-sb directory in sysfs

On 2020/10/22 10:53, Daeho Jeong wrote:
> Yep, It sounds good to me.
> 
> 2020년 10월 21일 (수) 오후 3:08, Chao Yu <yuchao0@...wei.com>님이 작성:
>>
>> On 2020/10/16 13:14, Daeho Jeong wrote:
>>> From: Daeho Jeong <daehojeong@...gle.com>
>>>
>>> Added compr_inode to show compressed inode count and compr_blocks to
>>> show compressed block count in sysfs.
>>
>> As there are so many entries in ../f2fs/<disk>/ directory, it looks a mess
>> there, I suggest that we can add a new directory 'stats' in ../f2fs/<disk>/,
>> in where we can store all readonly stats related entries there later.
>>
>> How do you think?
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Daeho Jeong <daehojeong@...gle.com>
>>> ---
>>>    Documentation/ABI/testing/sysfs-fs-f2fs | 10 ++++++++++
>>>    fs/f2fs/sysfs.c                         | 17 +++++++++++++++++
>>>    2 files changed, 27 insertions(+)
>>>
>>> diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
>>> index 834d0becae6d..a01c26484c69 100644
>>> --- a/Documentation/ABI/testing/sysfs-fs-f2fs
>>> +++ b/Documentation/ABI/testing/sysfs-fs-f2fs
>>> @@ -350,3 +350,13 @@ Date:            April 2020
>>>    Contact:    "Daeho Jeong" <daehojeong@...gle.com>
>>>    Description:        Give a way to change iostat_period time. 3secs by default.
>>>                The new iostat trace gives stats gap given the period.
>>> +
>>> +What:                /sys/fs/f2fs/<disk>/compr_inode
>>> +Date:                October 2020
>>> +Contact:     "Daeho Jeong" <daehojeong@...gle.com>
>>> +Description: Show compressed inode count
>>> +
>>> +What:                /sys/fs/f2fs/<disk>/compr_blocks
>>> +Date:                October 2020
>>> +Contact:     "Daeho Jeong" <daehojeong@...gle.com>
>>> +Description: Show compressed block count
>>> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
>>> index 94c98e412aa1..7139a29a00d3 100644
>>> --- a/fs/f2fs/sysfs.c
>>> +++ b/fs/f2fs/sysfs.c
>>> @@ -223,6 +223,19 @@ static ssize_t avg_vblocks_show(struct f2fs_attr *a,
>>>        f2fs_update_sit_info(sbi);
>>>        return sprintf(buf, "%llu\n", (unsigned long long)(si->avg_vblocks));
>>>    }
>>> +
>>> +static ssize_t compr_inode_show(struct f2fs_attr *a,
>>> +                             struct f2fs_sb_info *sbi, char *buf)
>>> +{
>>> +     return sprintf(buf, "%u\n", atomic_read(&sbi->compr_inode));
>>> +}
>>> +
>>> +static ssize_t compr_blocks_show(struct f2fs_attr *a,
>>> +                             struct f2fs_sb_info *sbi, char *buf)
>>> +{
>>> +     return sprintf(buf, "%llu\n", atomic64_read(&sbi->compr_blocks));
>>> +}
>>> +
>>>    #endif
>>>
>>>    static ssize_t main_blkaddr_show(struct f2fs_attr *a,
>>> @@ -591,6 +604,8 @@ F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_background_calls, bg_gc);
>>>    F2FS_GENERAL_RO_ATTR(moved_blocks_background);
>>>    F2FS_GENERAL_RO_ATTR(moved_blocks_foreground);
>>>    F2FS_GENERAL_RO_ATTR(avg_vblocks);
>>> +F2FS_GENERAL_RO_ATTR(compr_inode);
>>> +F2FS_GENERAL_RO_ATTR(compr_blocks);
>>>    #endif
>>>
>>>    #ifdef CONFIG_FS_ENCRYPTION
>>> @@ -675,6 +690,8 @@ static struct attribute *f2fs_attrs[] = {
>>>        ATTR_LIST(moved_blocks_foreground),
>>>        ATTR_LIST(moved_blocks_background),
>>>        ATTR_LIST(avg_vblocks),
>>> +     ATTR_LIST(compr_inode),
>>> +     ATTR_LIST(compr_blocks),
>>>    #endif
>>>        NULL,
>>>    };
>>>
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ