From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: [PATCH] clear PageError bit in msync & fsync Date: Fri, 12 Nov 2010 12:04:47 -0500 Message-ID: <4CDD73AF.8070505@redhat.com> References: <20101109114422.3918e7f6@annuminas.surriel.com> <20101109142109.224267d0@corrin.poochiereds.net> <4CD9A209.6070807@redhat.com> <20101109210715.GJ3099@thunk.org> <4CD9BA08.2000002@redhat.com> <20101109134139.c6f9f6dc.akpm@linux-foundation.org> <4CDCC457.9030400@redhat.com> <20101112105250.75f01670@tlielax.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Morton , "Ted Ts'o" , linux-kernel@vger.kernel.org, esandeen@redhat.com, jmoyer@redhat.com, linux-fsdevel@vger.kernel.org, Alexander Viro , lmcilroy@redhat.com To: Jeff Layton Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18792 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757558Ab0KLRE7 (ORCPT ); Fri, 12 Nov 2010 12:04:59 -0500 In-Reply-To: <20101112105250.75f01670@tlielax.poochiereds.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 11/12/2010 10:52 AM, Jeff Layton wrote: > Now, process A issues an fsync. He gets an error but his data was > flushed to disk just fine. Is that also incorrect behavior? I suspect it is better for fsync to return an error when it wasn't process A's error (but there was an error), than to pretend everything was just fine when in fact an error did happen. When getting an error, the program can retry the write (to redirty the pages) and retry the IO by calling fsync again. If no real error happened, at worst it gets to do the IO twice. -- All rights reversed