Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757653AbbGQKGW (ORCPT ); Fri, 17 Jul 2015 06:06:22 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:48778 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757638AbbGQKGU (ORCPT ); Fri, 17 Jul 2015 06:06:20 -0400 X-AuditID: cbfee61b-f79416d0000014c0-b1-55a8d38d1bea From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] f2fs: fix to wait all atomic written pages writeback Date: Fri, 17 Jul 2015 18:05:21 +0800 Message-id: <01a401d0c078$32519400$96f4bc00$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdDAd8Ksn4A00UqqR7uf515Bh7C09w== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsVy+t9jAd3eyytCDRavkrR4sn4Ws8WlRe4W l3fNYXNg9ti0qpPNY/eCz0wenzfJBTBHcdmkpOZklqUW6dslcGW8WDGFqeAUe8WulvVsDYzz 2boYOTgkBEwk7j8t6mLkBDLFJC7cWw8U5uIQEljEKLF9x0sWCOcVo8TdB2+ZQarYBFQklnf8 ZwKxRYDsQ4sus4PYzAIeEo0d31lBbGEBT4ldJ1rZQGwWAVWJOa2zwep5BSwl+pdsYoawBSV+ TL7HAtGrJbF+53EmCFteYvMaiF0SAgoSO86+ZgQ5VERAT2LKPXOIEnGJjUdusUxgFJiFZNIs JJNmIZk0C0nLAkaWVYyiqQXJBcVJ6blGesWJucWleel6yfm5mxjBwftMegfjqgaLQ4wCHIxK PLwNritChVgTy4orcw8xSnAwK4nwVu4ECvGmJFZWpRblxxeV5qQWH2KU5mBREuc9me8TKiSQ nliSmp2aWpBaBJNl4uCUamB0PXSIu2TNiinrv9kKynqtvZ2b8ERs/dYl8jsreBhDE/QWtPMG 3LxtHqXlKvbtt/Rpt4KKjhlxhb3vGj+8Tvtmsu3VpJ+TFm3+dFLHwMtSWsLNTHrWkhIv6d3p j3dPWjE7ZdFXwyC38/X39t3jnVt366q4c83F12fjPP23mvVNrcjmv9M/68IUJZbijERDLeai 4kQAzRmlw1oCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1185 Lines: 35 This patch fixes the incorrect range (0, LONG_MAX) which is used in ranged fsync. If we use LONG_MAX as the parameter for indicating the end of file we want to synchronize, in 32-bits architecture machine, these datas after 4GB offset may not be persisted in storage after ->fsync returned. Here, we alter LONG_MAX to LLONG_MAX to fix this issue. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 9989616..1bb1d6e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1355,7 +1355,7 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp) if (f2fs_is_atomic_file(inode)) commit_inmem_pages(inode, false); - ret = f2fs_sync_file(filp, 0, LONG_MAX, 0); + ret = f2fs_sync_file(filp, 0, LLONG_MAX, 0); mnt_drop_write_file(filp); clear_inode_flag(F2FS_I(inode), FI_ATOMIC_FILE); return ret; -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/