Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4194069pxk; Tue, 8 Sep 2020 13:11:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAodPEZy2Z7/JJTWp91SBeIfncttWoT+cMuFjO0NJYwGaVQV0YB9Y/DKkBZtfpPKMZQrWy X-Received: by 2002:a17:906:8143:: with SMTP id z3mr127287ejw.323.1599595864920; Tue, 08 Sep 2020 13:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599595864; cv=none; d=google.com; s=arc-20160816; b=gx0mcYA+BwGy3IHbi0XW+3NS/0YqYnKoe4upPppj5d6zEE8IdzHnGJEIMdcbIGEL1b VrgKUFybEecTdFQF0QOOBb4B9TORDnobJug9hLtOgmI4bH3+JPdVh9ZBecAauRi6woWp ek7e/RHAywlWiagM6CBI36+iP6bdwie2PjxBCr+xdbnQyHvIDAiDSkSVqWVBn3YPPUWP 5Kbm5std8w+/mL5qLR0LTOvo4RituBXyC/NymuE9qCAWXA6/QndThSnQ7Sva/jaktSDI wtH1uUfIzg6cfWpcY/kv2jpdY8j86wk+5txZ4HFyMvCohIxXVnbN4bjSkKGwea3821nD kCkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature; bh=9IraBddHKBi8D39cZOi4SSf6qZh84ONmGT1YEQT8fAE=; b=eE9pKuvhl8/cNQ7JLmhO3OvlmgIYg0PvmyhZjaQmScQmCoMz9w7OC4UCXERc5gJfSW end7brwWDvvv+V8oYU+EHunDu1CZI9EWEAoJLc5SpkgYKR8pQj+GldtK4eHxc6aRBI7X Q6moQt8YJxhvKUDjbAVK2oC1tKfkgbUt43MOiGfOIPja3UkTE90V8kPGhwA7w0T0o6/O TKnLqNKI39LQ5QdgQlzAJcKo4hpCbwmRjf0hu8UVCuiPZo681ImG1PtXGWZUskwdN4j4 WL0jvI1FWSPkg3Cp0KWB+t04PGSSEhWH9IBQ1Ro8qvMFX5kF5GGYa5EUIF8ew2yXgGWU xHHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KJ9alqSC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si78097edn.499.2020.09.08.13.10.42; Tue, 08 Sep 2020 13:11:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KJ9alqSC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731333AbgIHUKN (ORCPT + 99 others); Tue, 8 Sep 2020 16:10:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:53338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730259AbgIHPQT (ORCPT ); Tue, 8 Sep 2020 11:16:19 -0400 Received: from [192.168.0.108] (unknown [117.89.211.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD480224D2; Tue, 8 Sep 2020 14:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599576967; bh=9IraBddHKBi8D39cZOi4SSf6qZh84ONmGT1YEQT8fAE=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=KJ9alqSCRqr7fLiIFOLAqEQDlWFKjk6op0NHZuDAs5HzemGEsJwR7b3PMbTC7f21S ISKLnoQpyICXf6iOUJuSrTHhxyw0XLE1cpkoMXqxB3Zr1b8RGOCKs73XYICEspIDcM 1R/zpGMLK0cHu5PCukycx2jhOmpoqbvUN1eYGcIA= Subject: Re: [f2fs-dev] [PATCH v3 1/2] f2fs: change i_compr_blocks of inode to atomic value To: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com References: <20200908024411.2692388-1-daeho43@gmail.com> Cc: Daeho Jeong From: Chao Yu Message-ID: <7b3d9b1f-2394-6163-ada5-63e9a053475d@kernel.org> Date: Tue, 8 Sep 2020 22:55:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20200908024411.2692388-1-daeho43@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-9-8 10:44, Daeho Jeong wrote: > From: Daeho Jeong > > 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 Reviewed-by: Chao Yu Thanks,