From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: oliver@oli1170.net, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: prevent checkpoint once any IO failure is detected
Date: Thu, 24 Jan 2013 17:09:53 +0900 [thread overview]
Message-ID: <1359014993.22847.8.camel@kjgkr> (raw)
In-Reply-To: <CAKYAXd-HR+BCAYpK+4bcKxGD=gnX30CCg+v+w=rbUYTqod01=A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2546 bytes --]
Hi,
2013-01-24 (목), 15:37 +0900, Namjae Jeon:
> 2013/1/24, Jaegeuk Kim <jaegeuk.kim@samsung.com>:
> > This patch enhances the checkpoint routine to cope with IO errors.
> >
> > Basically f2fs detects IO errors from end_io_write, and the errors are able
> > to
> > be occurred during one of data, node, and meta page writes.
> >
> > In the previous code, when an IO error is occurred during writes, f2fs sets
> > a
> > flag, CP_ERROR_FLAG, in the raw ckeckpoint buffer which will be written to
> > disk.
> > Afterwards, write_checkpoint() will check the flag and remount f2fs as a
> > read-only (ro) mode.
> >
> > However, even once f2fs is remounted as a ro mode, dirty checkpoint pages
> > are
> > freely able to be written to disk by flusher or kswapd in background.
> > In such a case, after cold reboot, f2fs would restore the checkpoint data
> > having
> > CP_ERROR_FLAG, resulting in disabling write_checkpoint and remounting f2fs
> > as
> > a ro mode again.
> >
> > Therefore, let's prevent any checkpoint page (meta) writes once an IO error
> > is
> > occurred, and remount f2fs as a ro mode right away at that moment.
> Hi Jaegeuk.
> 1. there is no meaingful return type in write_meta_page. how about
> change void function prototype ?
Agreed.
> 2. "A bug case: need to run fsck" => what is fsck ? Is there fsck for f2fs ?
We've developing a very naive fsck tool, but it's too messy to release
now. I hope to release it within a couple of months later.
BTW, I think it is no problem to add such a comment since fsck should be
implemented whether it exists or not.
> 3. do_checkpoint()->sync_meta_pages()->
> while (index <= end) {
> int i, nr_pages;
> nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
> PAGECACHE_TAG_DIRTY,
> min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1);
> if (nr_pages == 0)
> break;
>
> for (i = 0; i < nr_pages; i++) {
> struct page *page = pvec.pages[i];
> lock_page(page);
> BUG_ON(page->mapping != mapping);
> BUG_ON(!PageDirty(page));
> clear_page_dirty_for_io(page);
> f2fs_write_meta_page(page, &wbc); -> At this
> point error need to be handled ?
Agreed. I'll send v2.
Thank you for reviewing. :)
--
Jaegeuk Kim
Samsung
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-01-24 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 10:58 [PATCH] f2fs: prevent checkpoint once any IO failure is detected Jaegeuk Kim
2013-01-24 6:37 ` Namjae Jeon
2013-01-24 8:09 ` Jaegeuk Kim [this message]
2013-01-24 8:15 ` [PATCH v2] " Jaegeuk Kim
2013-01-24 8:20 ` Namjae Jeon
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=1359014993.22847.8.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=linkinjeon@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=oliver@oli1170.net \
/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).