Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2451300pxu; Mon, 14 Dec 2020 02:40:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvxdxNMw6fgZ+ZfBalUzhHmtlAHUDWycGvGPXCNMokFPk7wLiIRWOKozh3QrxBsHw0+LST X-Received: by 2002:a17:907:3312:: with SMTP id ym18mr22304089ejb.437.1607942444508; Mon, 14 Dec 2020 02:40:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607942444; cv=none; d=google.com; s=arc-20160816; b=PvLOI3tPw3AEfpaiFr0Yt1ldtP3hmc7pD7NXnlpWt7xxfI9XmMZ0MAmkTyG3w9s1f3 CAJDlKN0oDXEAkn2l1aSOH988oiSL7VNDA1YKvY/4uutXuSojPPdbAGRq1ReNPUb0Y6/ 3oZ6bU7oY/CZhLb95I62XY8UPRvn1MJCIqgtd7Wep0lUoB2hZ5Ei/YjsEPQHtASsfw1o 8uqH0PdMYO4bMRwqh2fD9UhU8VYPSS4+uBFFCVO+z6hr9fLlvU334B5sNTY17/RQ3RO5 lt1JapdF5An7P3UK5Aaq25vAxJm8s6u5eiw0J94XuR8XDcjxRBOLTacDF7fqn0LfT1Mg oUaw== 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 :message-id:date:subject:cc:to:from; bh=NNqZ1jNwIEQWqMwh7TUFhnYCWZUWGLixYSU+gzKtXBo=; b=EB5Jz1114Y7bK/voec6164GfLi1NisXE/4mPH1YiKXRPC2cvjxS/DntCiUa08+AnBp bHEUPdRxhJ3veCKXD8co7QJGXUwC/xHExczZYnpYzicY1vmP2pTVIz6U9EuLsW3jnDW7 qHM9g8F7fWoacs0HM6RCBnxAS84Fe2ljj6c40cjOQswxxFRF2xellbqfjqmUfuIBuPSU GZfhARc92HtUdrKo4jNHSnekK+vr5K5gfqDJ3Cf80H92VvUFXCuI7Rzkq4QlJElUeMOq ambjSfPV5nM7Vpl5fVLukOQYxScoeZrehU9QOrAfDQ/gXyp1AHXovkmlqV/MkWQOGhBc HM4w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb3si9350551ejb.126.2020.12.14.02.40.21; Mon, 14 Dec 2020 02:40:44 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394902AbgLNJWa (ORCPT + 99 others); Mon, 14 Dec 2020 04:22:30 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:9875 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbgLNJVu (ORCPT ); Mon, 14 Dec 2020 04:21:50 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CvbTV4tSCz7Fq6; Mon, 14 Dec 2020 17:20:30 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Mon, 14 Dec 2020 17:21:00 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH] f2fs: fix to tag FIEMAP_EXTENT_MERGED in f2fs_fiemap() Date: Mon, 14 Dec 2020 17:20:57 +0800 Message-ID: <20201214092057.21629-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org f2fs does not natively support extents in metadata, 'extent' in f2fs is used as a virtual concept, so in f2fs_fiemap() interface, it needs to tag FIEMAP_EXTENT_MERGED flag to indicated the extent status is a result of merging. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 894c5680db4a..baa9ccf84e2c 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1971,6 +1971,7 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, } if (size) { + flags |= FIEMAP_EXTENT_MERGED; if (IS_ENCRYPTED(inode)) flags |= FIEMAP_EXTENT_DATA_ENCRYPTED; -- 2.29.2