From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755840AbbIOJ4U (ORCPT ); Tue, 15 Sep 2015 05:56:20 -0400 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:59984 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753045AbbIOJ4R convert rfc822-to-8bit (ORCPT ); Tue, 15 Sep 2015 05:56:17 -0400 From: Junichi Nomura To: "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" CC: "akpm@linux-foundation.org" , "andi@firstfloor.org" , "fengguang.wu@intel.com" , "tony.luck@intel.com" , "liwanp@linux.vnet.ibm.com" , "david@fromorbit.com" , Tejun Heo , "Naoya Horiguchi" Subject: [PATCH 0/1] Fix false-negative error reporting from fsync/fdatasync Thread-Topic: [PATCH 0/1] Fix false-negative error reporting from fsync/fdatasync Thread-Index: AQHQ75trjk9dPtT7G0SF86JzBqZitw== Date: Tue, 15 Sep 2015 09:46:39 +0000 Message-ID: <20150915094638.GA13399@xzibit.linux.bs1.fc.nec.co.jp> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.85] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <9F23CF1F60D32E46A675B86DCFBCBB8E@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applications use fsync/fdatasync to make sure data is written back to storage. It is expected that those system calls return error if writeback has failed (e.g. disk/transport failure, memory failure..) However if admins run a command such as sync or fsfreeze along side, fsync/fdatasync may return success even if writeback has failed. That could lead to data corruption. This patch is a minimal fix for the problem. -- Jun'ichi Nomura, NEC Corporation