From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH 2/2] Make write(2) interruptible by a signal Date: Thu, 24 Nov 2011 17:10:21 -0700 Message-ID: <20111125001020.GN4387@parisc-linux.org> References: <1321441935-6802-1-git-send-email-jack@suse.cz> <1321441935-6802-3-git-send-email-jack@suse.cz> <20111116114421.GA9098@localhost> <20111122142805.4e59faae.akpm@linux-foundation.org> <20111123090533.GA22420@localhost> <20111123015005.8f366566.akpm@linux-foundation.org> <20111123122948.4aa7ddfa.akpm@linux-foundation.org> <20111124192711.GM4387@parisc-linux.org> <20111124205343.GA1043@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Wu Fengguang , Jan Kara , Christoph Hellwig , Al Viro , "linux-fsdevel@vger.kernel.org" To: Ted Ts'o Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:46337 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119Ab1KYAKX (ORCPT ); Thu, 24 Nov 2011 19:10:23 -0500 Content-Disposition: inline In-Reply-To: <20111124205343.GA1043@thunk.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Nov 24, 2011 at 03:53:43PM -0500, Ted Ts'o wrote: > On Thu, Nov 24, 2011 at 12:27:11PM -0700, Matthew Wilcox wrote: > > On the other hand, if there was a crash mid-write, they might also get a > > 36k write that actually hit media (right? Or do we guarantee that on > > reboot you see a multiple of 128k?) > > Sure, but in the case the crash we expect things to be in a wonky > state. The problem is if people assume atomic writes to files in a > non-crash case, which has been a traditional Unix/Linux "feature". > It's guaranteed by the standards as much a "close() implies fsync()", > but once application programmers start coding to such assumptions, > they refuse to admit they were wrong, and blame the kernel > programmers. Sure, but resorting to kill -9 is almost the same as pushing the BRS. Nobody's arguing in favour of non-fatal signals interrupting write() [well, Honza was earlier, but we all talked him out of it]. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."