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]
Date:   Thu, 09 Mar 2017 08:28:44 +1100
From:   NeilBrown <neilb@...e.com>
To:     Trond Myklebust <trondmy@...marydata.com>,
        "viro\@zeniv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "jlayton\@redhat.com" <jlayton@...hat.com>,
        "akpm\@linux-foundation.org" <akpm@...ux-foundation.org>
Cc:     "linux-nilfs\@vger.kernel.org" <linux-nilfs@...r.kernel.org>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        "konishi.ryusuke\@lab.ntt.co.jp" <konishi.ryusuke@....ntt.co.jp>,
        "linux-mm\@kvack.org" <linux-mm@...ck.org>,
        "adilger\@dilger.ca" <adilger@...ger.ca>,
        "James.Bottomley\@HansenPartnership.com" 
        <James.Bottomley@...senPartnership.com>,
        "linux-fsdevel\@vger.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "ross.zwisler\@linux.intel.com" <ross.zwisler@...ux.intel.com>,
        "openosd\@gmail.com" <openosd@...il.com>,
        "jack\@suse.cz" <jack@...e.cz>
Subject: Re: [PATCH v2 6/9] mm: set mapping error when launder_pages fails

On Thu, Mar 09 2017, Trond Myklebust wrote:

> On Wed, 2017-03-08 at 11:29 -0500, Jeff Layton wrote:
>> If launder_page fails, then we hit a problem writing back some inode
>> data. Ensure that we communicate that fact in a subsequent fsync
>> since
>> another task could still have it open for write.
>> 
>> Signed-off-by: Jeff Layton <jlayton@...hat.com>
>> ---
>>  mm/truncate.c | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>> 
>> diff --git a/mm/truncate.c b/mm/truncate.c
>> index 6263affdef88..29ae420a5bf9 100644
>> --- a/mm/truncate.c
>> +++ b/mm/truncate.c
>> @@ -594,11 +594,15 @@ invalidate_complete_page2(struct address_space
>> *mapping, struct page *page)
>>  
>>  static int do_launder_page(struct address_space *mapping, struct
>> page *page)
>>  {
>> +	int ret;
>> +
>>  	if (!PageDirty(page))
>>  		return 0;
>>  	if (page->mapping != mapping || mapping->a_ops->launder_page 
>> == NULL)
>>  		return 0;
>> -	return mapping->a_ops->launder_page(page);
>> +	ret = mapping->a_ops->launder_page(page);
>> +	mapping_set_error(mapping, ret);
>> +	return ret;
>>  }
>>  
>>  /**
>
> No. At that layer, you don't know that this is a page error. In the NFS
> case, it could, for instance, just as well be a fatal signal.
>

In that case, would 'ret' be ERESTARTSYS or EAGAIN or similar?
Should mapping_set_error() ignore those?

Thanks,
NeilBrown

> -- 
> Trond Myklebust
> Linux NFS client maintainer, PrimaryData
> trond.myklebust@...marydata.com

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ