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: <6a709681-3f25-b4b7-4eb3-942f86e712d5@oracle.com>
Date:   Fri, 26 May 2017 15:48:51 -0500
From:   Dave Kleikamp <dave.kleikamp@...cle.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Jeff Layton <jlayton@...hat.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        Jan Kara <jack@...e.cz>,
        Matthew Wilcox <mawilcox@...rosoft.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] JFS: do not ignore return code from write_one_page()

Andrew,

Do you want to pick this up into akpm-current? I could push it through
the jfs tree, but without the change to write_one_page(), my version of
the patch would need a manual merge. It'd be a simple one, so maybe
that's not a big deal.

Thanks,
Shaggy

On 05/26/2017 03:45 PM, Dave Kleikamp wrote:
> There are a couple places where jfs calls write_one_page() where
> clean recovery is not possible. In these cases, the file system
> should be marked dirty. To do this, it is now necessary to store the
> superblock in the metapage structure.
> 
> Signed-off-by: Dave Kleikamp <dave.kleikamp@...cle.com>
> ---
>  fs/jfs/jfs_metapage.c | 7 +++++--
>  fs/jfs/jfs_metapage.h | 1 +
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
> index 744fa3c079e6..7cc1c85f4508 100644
> --- a/fs/jfs/jfs_metapage.c
> +++ b/fs/jfs/jfs_metapage.c
> @@ -664,6 +664,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
>  		INCREMENT(mpStat.pagealloc);
>  		mp = alloc_metapage(GFP_NOFS);
>  		mp->page = page;
> +		mp->sb = inode->i_sb;
>  		mp->flag = 0;
>  		mp->xflag = COMMIT_PAGE;
>  		mp->count = 1;
> @@ -711,7 +712,8 @@ void force_metapage(struct metapage *mp)
>  	get_page(page);
>  	lock_page(page);
>  	set_page_dirty(page);
> -	write_one_page(page);
> +	if (write_one_page(page))
> +		jfs_error(mp->sb, "write_one_page() failed\n");
>  	clear_bit(META_forcewrite, &mp->flag);
>  	put_page(page);
>  }
> @@ -756,7 +758,8 @@ void release_metapage(struct metapage * mp)
>  		set_page_dirty(page);
>  		if (test_bit(META_sync, &mp->flag)) {
>  			clear_bit(META_sync, &mp->flag);
> -			write_one_page(page);
> +			if (write_one_page(page))
> +				jfs_error(mp->sb, "write_one_page() failed\n");
>  			lock_page(page); /* write_one_page unlocks the page */
>  		}
>  	} else if (mp->lsn)	/* discard_metapage doesn't remove it */
> diff --git a/fs/jfs/jfs_metapage.h b/fs/jfs/jfs_metapage.h
> index a869fb4a20d6..8b0ee514eb84 100644
> --- a/fs/jfs/jfs_metapage.h
> +++ b/fs/jfs/jfs_metapage.h
> @@ -38,6 +38,7 @@ struct metapage {
>  
>  	/* implementation */
>  	struct page *page;
> +	struct super_block *sb;
>  	unsigned int logical_size;
>  
>  	/* Journal management */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ