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] [day] [month] [year] [list]
Date:	Tue, 19 Nov 2013 15:33:14 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net
Subject: RE: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_bio flow

Hi,

2013-11-19 (화), 13:25 +0800, Chao Yu:
> Hi
> 
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk.kim@...sung.com]
> > Sent: Monday, November 18, 2013 5:12 PM
> > Cc: linux-fsdevel@...r.kernel.org; linux-kernel@...r.kernel.org; linux-f2fs-devel@...ts.sourceforge.net
> > Subject: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_bio flow
> > 
> > This patch introduces PAGE_TYPE_OF_BIO() and cleans up do_submit_bio() with it.
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk.kim@...sung.com>
> > ---
> >  fs/f2fs/f2fs.h    |  1 +
> >  fs/f2fs/segment.c | 39 +++++++++++++++++++++------------------
> >  2 files changed, 22 insertions(+), 18 deletions(-)
> > 
> > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> > index fe5c2fc..1c783fd 100644
> > --- a/fs/f2fs/f2fs.h
> > +++ b/fs/f2fs/f2fs.h
> > @@ -351,6 +351,7 @@ enum count_type {
> >   *			with waiting the bio's completion
> >   * ...			Only can be used with META.
> >   */
> > +#define PAGE_TYPE_OF_BIO(type)	(type) > META ? META : (type)


I'll add parenthesis as you suggested. Thanks.

> >  enum page_type {
> >  	DATA,
> >  	NODE,
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 1f83999..dad5f1a 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -837,32 +837,35 @@ static void do_submit_bio(struct f2fs_sb_info *sbi,
> >  				enum page_type type, bool sync)
> >  {
> >  	int rw = sync ? WRITE_SYNC : WRITE;
> > -	enum page_type btype = type > META ? META : type;
> > +	enum page_type btype = PAGE_TYPE_OF_BIO(type);
> 
> ->f2fs_submit_bio()
> 	: enum page_type btype = PAGE_TYPE_OF_BIO(type);
> 	->do_submit_bio()
> 		: enum page_type btype = PAGE_TYPE_OF_BIO(type);
> 
> Could we remove PAGE_TYPE_OF_BIO or use f2fs_bug_on to instead
> in do_submit_bio()? because it looks redundant , and also 
> submit_write_page() will not pass the type which is larger than META.

The f2fs_submit_bio(type) calls do_submit_bio(type) in which the type is
able to be META_FLUSH from sync_meta_pages().
So, we need to do this. :)

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ