From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeff Layton <jlayton@redhat.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Jan Kara <jack@suse.cz>, Matthew Wilcox <mawilcox@microsoft.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] JFS: do not ignore return code from write_one_page()
Date: Fri, 26 May 2017 15:48:51 -0500 [thread overview]
Message-ID: <6a709681-3f25-b4b7-4eb3-942f86e712d5@oracle.com> (raw)
In-Reply-To: <db45ab67-55c7-08ff-6776-f76b3bf5cbf5@oracle.com>
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@oracle.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 */
>
next prev parent reply other threads:[~2017-05-26 20:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 2:43 linux-next: build warning after merge of the akpm-current tree Stephen Rothwell
2017-05-26 10:16 ` Jeff Layton
2017-05-26 11:28 ` Dave Kleikamp
2017-05-26 20:45 ` [PATCH] JFS: do not ignore return code from write_one_page() Dave Kleikamp
2017-05-26 20:48 ` Dave Kleikamp [this message]
2017-05-27 6:36 ` Andrew Morton
2017-05-28 23:23 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a709681-3f25-b4b7-4eb3-942f86e712d5@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mawilcox@microsoft.com \
--cc=ross.zwisler@linux.intel.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).