linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: stable@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA
Date: Fri, 4 Jan 2019 17:31:52 +0800	[thread overview]
Message-ID: <3e50bcd6-1730-c28d-2d28-7a8e57f456cf@huawei.com> (raw)
In-Reply-To: <20190104042025.31982-1-jaegeuk@kernel.org>

On 2019/1/4 12:20, Jaegeuk Kim wrote:
> Otherwise, we can get wrong counts incurring checkpoint hang.
> 
> IO_W (CP:  -24, Data:   24, Flush: (   0    0    1), Discard: (   0    0))
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Good catch! ;)

I can understand this condition, but for other new developer who reads this
commit, it will be a little hard to understand situation here.

How about explaining a little more about problem here, maybe:

Thread A			Thread B		
- f2fs_write_data_pages
 -  __write_data_page
  - f2fs_submit_page_write
   - inc_page_count(F2FS_WB_DATA)
     type is F2FS_WB_DATA due to file is non-atomic one
- f2fs_ioc_start_atomic_write
 - set_inode_flag(FI_ATOMIC_FILE)
				- f2fs_write_end_io
				 - dec_page_count(F2FS_WB_CP_DATA)
				   type is F2FS_WB_DATA due to file becomes
				   atomic one

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

  parent reply	other threads:[~2019-01-04  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04  4:20 [PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA Jaegeuk Kim
2019-01-04  4:20 ` [PATCH 2/2] f2fs: don't access node/meta inode mapping after iput Jaegeuk Kim
2019-01-04  9:32   ` [f2fs-dev] " Chao Yu
2019-01-04  9:31 ` Chao Yu [this message]
2019-01-04 20:36   ` [f2fs-dev] [PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA 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=3e50bcd6-1730-c28d-2d28-7a8e57f456cf@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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).