[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7b3d9b1f-2394-6163-ada5-63e9a053475d@kernel.org>
Date: Tue, 8 Sep 2020 22:55:59 +0800
From: Chao Yu <chao@...nel.org>
To: Daeho Jeong <daeho43@...il.com>, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com
Cc: Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [f2fs-dev] [PATCH v3 1/2] f2fs: change i_compr_blocks of inode to
atomic value
On 2020-9-8 10:44, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@...gle.com>
>
> writepages() can be concurrently invoked for the same file by different
> threads such as a thread fsyncing the file and a kworker kernel thread.
> So, changing i_compr_blocks without protection is racy and we need to
> protect it by changing it with atomic type value. Plus, we don't need
> a 64bit value for i_compr_blocks, so just we will use a atomic value,
> not atomic64.
>
> Signed-off-by: Daeho Jeong <daehojeong@...gle.com>
Reviewed-by: Chao Yu <yuchao0@...wei.com>
Thanks,
Powered by blists - more mailing lists