From: Chao Yu <chao2.yu@samsung.com> To: "'Jaegeuk Kim'" <jaegeuk@kernel.org> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: RE: [f2fs-dev] [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure Date: Mon, 12 Oct 2015 17:01:29 +0800 [thread overview] Message-ID: <020e01d104cc$af078480$0d168d80$@samsung.com> (raw) In-Reply-To: <1444350566-37795-1-git-send-email-jaegeuk@kernel.org> > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Friday, October 09, 2015 8:29 AM > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Jaegeuk Kim > Subject: [f2fs-dev] [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure > > This patch introduces F2FS_GOING_DOWN_METAFLUSH which flushes meta pages like > SSA blocks and then blocks all the writes. > This can be used by power-failure tests. > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Good idea! I test power-failure case by changing src/godown to use new macro, until now, I didn't catch any consistent problem. :) Reviewed-by: Chao Yu <chao2.yu@samsung.com> Thanks, > --- > fs/f2fs/f2fs.h | 1 + > fs/f2fs/file.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index aad4720..f05ae22 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -250,6 +250,7 @@ static inline bool __has_cursum_space(struct f2fs_summary_block *sum, int > size, > #define F2FS_GOING_DOWN_FULLSYNC 0x0 /* going down with full sync */ > #define F2FS_GOING_DOWN_METASYNC 0x1 /* going down with metadata */ > #define F2FS_GOING_DOWN_NOSYNC 0x2 /* going down */ > +#define F2FS_GOING_DOWN_METAFLUSH 0x3 /* going down with meta flush */ > > #if defined(__KERNEL__) && defined(CONFIG_COMPAT) > /* > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index b3985a6..6d3cfd5 100644 > --- a/fs/f2fs/file.c > +++ b/fs/f2fs/file.c > @@ -1498,6 +1498,10 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg) > case F2FS_GOING_DOWN_NOSYNC: > f2fs_stop_checkpoint(sbi); > break; > + case F2FS_GOING_DOWN_METAFLUSH: > + sync_meta_pages(sbi, META, LONG_MAX); > + f2fs_stop_checkpoint(sbi); > + break; > default: > return -EINVAL; > } > -- > 2.1.1 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao2.yu@samsung.com> To: 'Jaegeuk Kim' <jaegeuk@kernel.org> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure Date: Mon, 12 Oct 2015 17:01:29 +0800 [thread overview] Message-ID: <020e01d104cc$af078480$0d168d80$@samsung.com> (raw) In-Reply-To: <1444350566-37795-1-git-send-email-jaegeuk@kernel.org> > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Friday, October 09, 2015 8:29 AM > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Jaegeuk Kim > Subject: [f2fs-dev] [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure > > This patch introduces F2FS_GOING_DOWN_METAFLUSH which flushes meta pages like > SSA blocks and then blocks all the writes. > This can be used by power-failure tests. > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Good idea! I test power-failure case by changing src/godown to use new macro, until now, I didn't catch any consistent problem. :) Reviewed-by: Chao Yu <chao2.yu@samsung.com> Thanks, > --- > fs/f2fs/f2fs.h | 1 + > fs/f2fs/file.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index aad4720..f05ae22 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -250,6 +250,7 @@ static inline bool __has_cursum_space(struct f2fs_summary_block *sum, int > size, > #define F2FS_GOING_DOWN_FULLSYNC 0x0 /* going down with full sync */ > #define F2FS_GOING_DOWN_METASYNC 0x1 /* going down with metadata */ > #define F2FS_GOING_DOWN_NOSYNC 0x2 /* going down */ > +#define F2FS_GOING_DOWN_METAFLUSH 0x3 /* going down with meta flush */ > > #if defined(__KERNEL__) && defined(CONFIG_COMPAT) > /* > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index b3985a6..6d3cfd5 100644 > --- a/fs/f2fs/file.c > +++ b/fs/f2fs/file.c > @@ -1498,6 +1498,10 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg) > case F2FS_GOING_DOWN_NOSYNC: > f2fs_stop_checkpoint(sbi); > break; > + case F2FS_GOING_DOWN_METAFLUSH: > + sync_meta_pages(sbi, META, LONG_MAX); > + f2fs_stop_checkpoint(sbi); > + break; > default: > return -EINVAL; > } > -- > 2.1.1 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel ------------------------------------------------------------------------------
next prev parent reply other threads:[~2015-10-12 9:02 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-09 0:29 [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure Jaegeuk Kim 2015-10-09 0:29 ` [PATCH 2/2] Revert "f2fs: do not skip dentry block writes" Jaegeuk Kim 2015-10-12 9:01 ` Chao Yu [this message] 2015-10-12 9:01 ` [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure Chao Yu 2015-10-12 20:37 ` [f2fs-dev] " Jaegeuk Kim 2015-10-13 3:30 ` Chao Yu 2015-10-13 3:30 ` Chao Yu
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='020e01d104cc$af078480$0d168d80$@samsung.com' \ --to=chao2.yu@samsung.com \ --cc=jaegeuk@kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.