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: <c7bf6194-2613-0245-e133-8b6ad1386eb8@139.com>
Date:   Thu, 7 Oct 2021 14:08:03 +0800
From:   Chengguang Xu <cgxu519@....com>
To:     Miklos Szeredi <miklos@...redi.hu>,
        Chengguang Xu <cgxu519@...ernel.net>
Cc:     Jan Kara <jack@...e.cz>, Amir Goldstein <amir73il@...il.com>,
        linux-fsdevel@...r.kernel.org,
        overlayfs <linux-unionfs@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v5 03/10] ovl: implement overlayfs' ->evict_inode
 operation

在 2021/10/6 23:33, Miklos Szeredi 写道:
> On Thu, 23 Sept 2021 at 15:08, Chengguang Xu <cgxu519@...ernel.net> wrote:
>> Implement overlayfs' ->evict_inode operation,
>> so that we can clear dirty flags of overlayfs inode.
>>
>> Signed-off-by: Chengguang Xu <cgxu519@...ernel.net>
>> ---
>>   fs/overlayfs/super.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
>> index 51886ba6130a..2ab77adf7256 100644
>> --- a/fs/overlayfs/super.c
>> +++ b/fs/overlayfs/super.c
>> @@ -406,11 +406,18 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data)
>>          return ret;
>>   }
>>
>> +static void ovl_evict_inode(struct inode *inode)
>> +{
>> +       inode->i_state &= ~I_DIRTY_ALL;
>> +       clear_inode(inode);
> clear_inode() should already clear the dirty flags; the default
> eviction should work fine without having to define an ->evict_inode.
> What am I missing?

Yeah, you are right, we don't need overlayfs' own ->evict_inode anymore

because we wait all writeback upper inodes in overlayfs' ->sync_fs.


Thanks,

Chengguang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ