Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4088043pxt; Tue, 10 Aug 2021 19:57:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu9Aihsd4RdGxzkEA7jN04sDKx3JPXGpo2n16OJ4NWrK7xM3AaKDzH0Oz+2eKx5SGmBGK9 X-Received: by 2002:a6b:b502:: with SMTP id e2mr689480iof.152.1628650663612; Tue, 10 Aug 2021 19:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628650663; cv=none; d=google.com; s=arc-20160816; b=fnQ6ly10SacUfENXAYV4soKQ4wyQRBzoB3MSZ8R5YCPLtxakA6SaqYP/ZYATnuuuCo 7Oo86lI63zgUv6t48QpIqdeiAfJoOsUdPcXF9D0n3yr+2Sp8ZSAvz7D5MPCMHjDp4UZf zSW8UvcBeKJSp2BCdqBCWxilNqx9HyULi+LK4xCxqImH4pjRozbq+BPPI8oNA5ZwVGX6 2LgFSDhHnXHAhe2j1EyDWNu1ZY7+1NUgRAtKka1OmECPVlBHFKEcM2dVZST0diP1J6YI K47yP8zPpuH8CCEdIuOvGeKCl1kGN+yJaGA0YuMMsBNK3mLVv+hijRY09EDjRehDaDIi SZ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:date:message-id:to:subject:from; bh=+8LJayoFX5q/5di+DCsqTX4n8BkdXihpHqAunyGkpsg=; b=i1VaSh1IlezqykAstMbre2SNd/ZuVMRdbI/2Kvf1S3IJwk57oaQtAuTpXF8KhbcXMv RAW0TshSxw+e16iGivPXYbxLZt+H0falIGcZnaGro4Yd7JNjZN92+BZRT0ljLdkz7SAd Bg58awB4jr5E1+HL3EnfSzjNmheIY1i/T39S+vMh+OAb24L/4W8AXiDBxlVUao9q3BUM M4tMcVhywUCKh1ncQqaGK8rRrRqltIXzR3M76XgmHKgwP17WEmOCuZUCUEB/IY8fy81Q 9WKUFmPvCzAWKmYLSviwktGiSj8dThJT9C7RK/uLxDxpA+CauWeGaOzttHkp9lOKKfDR ctGQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si29222915ild.123.2021.08.10.19.57.32; Tue, 10 Aug 2021 19:57:43 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbhHKC4z (ORCPT + 99 others); Tue, 10 Aug 2021 22:56:55 -0400 Received: from mail-m17656.qiye.163.com ([59.111.176.56]:53122 "EHLO mail-m17656.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbhHKC4y (ORCPT ); Tue, 10 Aug 2021 22:56:54 -0400 X-Greylist: delayed 455 seconds by postgrey-1.27 at vger.kernel.org; Tue, 10 Aug 2021 22:56:53 EDT Received: from [172.25.45.51] (unknown [58.251.74.232]) by mail-m17656.qiye.163.com (Hmail) with ESMTPA id 7AAC3C402E6; Wed, 11 Aug 2021 10:48:53 +0800 (CST) From: Wu Bo Subject: f2fs do DIO write make file corruption To: bo.wu@vivo.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Message-ID: <5b68208b-fd94-bf4e-fc4b-d79d13abf1c6@vivo.com> Date: Wed, 11 Aug 2021 10:48:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUhPN1dZLVlBSVdZDwkaFQgSH1lBWUJKQkxWQ0hLHklCTUJIGh 1DVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MAg6HTo6OT9IAyw3HUpPQxxM ERhPC0JVSlVKTUlDTU5LSkhPTklOVTMWGhIXVRkUVQwOOw0SDRRVGBQWRVlXWRILWUFZTkNVSU5K VUxPVUlISVlXWQgBWUFKSEtCNwY+ X-HM-Tid: 0a7b331cd85eda02kuws7aac3c402e6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I use the following command to create a file, the file may got corruption: f2fs_io write 2 0 512 inc_num dio $path And when I use bio or to set the chunk size to 1 block, the file is normal. The commands as following: f2fs_io write 2 0 512 inc_num buffered $path f2fs_io write 1 0 512 inc_num dio $path I find this bug on old kernel version 4.14.117, and not find on version 4.19.152. So this bug is fixed. Can anyone can tell me which patch fixed this bug?