linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Chao Yu <chao2.yu@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: remove the own bi_private allocation
Date: Mon, 02 Dec 2013 17:14:54 +0900	[thread overview]
Message-ID: <1385972094.2417.104.camel@kjgkr> (raw)
In-Reply-To: <000201ceef25$e145cec0$a3d16c40$@samsung.com>

2013-12-02 (월), 14:14 +0800, Chao Yu:
> Hi Kim,
> 
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> > Sent: Saturday, November 30, 2013 9:48 AM
> > Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
> > Subject: [f2fs-dev] [PATCH] f2fs: remove the own bi_private allocation
> > 
> > Previously f2fs allocates its own bi_private data structure all the time even
> > though we don't use it. But, can we remove this bi_private allocation?
> > 
> > This patch removes such the additional bi_private allocation.
> > 
> > 1. Retrieve f2fs_sb_info from its page->mapping->host->i_sb.
> >  - This removes the usecases of bi_private in end_io.
> > 
> > 2. Use bi_private only when we really need it.
> >  - The bi_private is used only when the checkpoint procedure is conducted.
> >  - When conducting the checkpoint, f2fs submits a META_FLUSH bio to wait its bio
> > completion.
> >  - Since we have no dependancies to remove bi_private now, let's just use
> >  bi_private pointer as the completion pointer.
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
> > ---
> >  fs/f2fs/segment.c | 43 ++++++++++++++++---------------------------
> >  fs/f2fs/segment.h |  7 -------
> >  2 files changed, 16 insertions(+), 34 deletions(-)
> > 
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 0387863..0db4027 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -791,7 +791,7 @@ static void f2fs_end_io_write(struct bio *bio, int err)
> >  {
> >  	const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
> >  	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
> > -	struct bio_private *p = bio->bi_private;
> > +	struct f2fs_sb_info *sbi = F2FS_SB(bvec->bv_page->mapping->host->i_sb);
> 
> I'm not sure whether bvec->bv_page->mapping will be set to NULL in the flow
> where may not check WRITEBACK flag of page. Is it possible?

The mapping should be not NULL cause it is a writebacking page.
Otherwise, it's a bug.
Thanks,

-- 
Jaegeuk Kim
Samsung



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2013-12-02  8:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30  1:48 [PATCH] f2fs: remove the own bi_private allocation Jaegeuk Kim
2013-12-02  1:29 ` Gu Zheng
2013-12-02  6:14 ` [f2fs-dev] " Chao Yu
2013-12-02  8:14   ` Jaegeuk Kim [this message]
2013-12-02  8:59     ` Chao Yu
2013-12-03  9:36       ` Jaegeuk Kim

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=1385972094.2417.104.camel@kjgkr \
    --to=jaegeuk.kim@samsung.com \
    --cc=chao2.yu@samsung.com \
    --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: 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).