linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@kernel-upstream.org>
To: Chao Yu <chao2.yu@samsung.com>,
	'Shawn Lin' <shawn.lin@rock-chips.com>,
	'Jaegeuk Kim' <jaegeuk@kernel.org>
Cc: shawn.lin@kernel-upstream.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking
Date: Fri, 11 Mar 2016 14:34:28 +0800	[thread overview]
Message-ID: <56E266F4.4000200@kernel-upstream.org> (raw)
In-Reply-To: <00fe01d17b57$30b6e9c0$9224bd40$@samsung.com>

Hi Chao Yu,

On 2016/3/11 13:29, Chao Yu wrote:
> Hi Shawn,
>
>> -----Original Message-----
>> From: Shawn Lin [mailto:shawn.lin@rock-chips.com]
>> Sent: Friday, March 11, 2016 11:28 AM
>> To: Jaegeuk Kim
>> Cc: Shawn Lin; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
>> Subject: [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking
>>
>>
>> This patchset is going to remove some redunant checking
>> of inline data flag and also going to avoid some unnecessary
>> cpu waste when doing inline stuff.
>
> When we are accessing inline inode, inline inode conversion can happen
> concurrently, we should check inline flag again under inode page's lock
> to avoid accessing the wrong inline data which may have been converted.
>

that sounds reasonable at first glance, and it more seems like that
mopst part of this patchset is just puting the checking in the right way.

If we need to check the inline inode under the protection of inode
page's lock, it means any callers who calling inline API stuff is
wasting time on checing the flag outside the API, right?

So we can just remove the redundant checking of the caller, but not
change the behaviour of checing inline flag under page's lock?

Thanks for catching it.

> Thanks,
>
>>
>> Note:
>> Sorry for sending previous four patches in separate, let
>> drop them and make them in this thread for better review.
>>
>>
>>
>> Shawn Lin (8):
>>    f2fs: check inline flag ahead for f2fs_write_inline_data
>>    f2fs: remove checing inline data flag for f2fs_write_data_page
>>    f2fs: check inline flag ahead for f2fs_read_inline_data
>>    f2fs: remove redundant checking of inline data flag
>>    f2fs: f2fs: check inline flag ahead for f2fs_inline_data_fiemap
>>    f2fs: remove checing inline data flag for f2fs_fiemap
>>    f2fs: remove unnecessary inline checking for f2fs_convert_inline_inode
>>    f2fs: check inline flag ahead for get_dnode_of_data
>>
>>   fs/f2fs/data.c   | 17 +++++++----------
>>   fs/f2fs/inline.c | 27 ++++++++++-----------------
>>   fs/f2fs/node.c   | 12 +++++-------
>>   3 files changed, 22 insertions(+), 34 deletions(-)
>>
>> --
>> 2.3.7
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>

  reply	other threads:[~2016-03-11  6:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  3:28 [PATCH 0/8] some cleanup of inline flag checking Shawn Lin
2016-03-11  3:28 ` [PATCH 1/8] f2fs: check inline flag ahead for f2fs_write_inline_data Shawn Lin
2016-03-11  3:28 ` [PATCH 2/8] f2fs: remove checing inline data flag for f2fs_write_data_page Shawn Lin
2016-03-11  3:28 ` [PATCH 3/8] f2fs: check inline flag ahead for f2fs_read_inline_data Shawn Lin
2016-03-11  3:28 ` [PATCH 4/8] f2fs: remove redundant checking of inline data flag Shawn Lin
2016-03-11  3:28 ` [PATCH 5/8] f2fs: f2fs: check inline flag ahead for f2fs_inline_data_fiemap Shawn Lin
2016-03-11  3:29 ` [PATCH 6/8] f2fs: remove checing inline data flag for f2fs_fiemap Shawn Lin
2016-03-11  3:29 ` [PATCH 7/8] f2fs: remove unnecessary inline checking for f2fs_convert_inline_inode Shawn Lin
2016-03-11  3:29 ` [PATCH 8/8] f2fs: check inline flag ahead for get_dnode_of_data Shawn Lin
2016-03-11  5:29 ` [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking Chao Yu
2016-03-11  6:34   ` Shawn Lin [this message]
2016-03-11  7:25     ` 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=56E266F4.4000200@kernel-upstream.org \
    --to=shawn.lin@kernel-upstream.org \
    --cc=chao2.yu@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawn.lin@rock-chips.com \
    /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).