From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Monakhov Subject: Re: [patch] RFC directio: partial writes support Date: Sat, 27 Feb 2010 14:10:35 +0300 Message-ID: <87vddj6ij8.fsf@openvz.org> References: <87iq9lxz3t.fsf@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "linux-fsdevel\@vger.kernel.org" , Andrew Morton To: "linux-kernel\@vger.kernel.org" Return-path: Received: from mail-bw0-f209.google.com ([209.85.218.209]:33462 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965569Ab0B0LKl (ORCPT ); Sat, 27 Feb 2010 06:10:41 -0500 In-Reply-To: <87iq9lxz3t.fsf@openvz.org> (Dmitry Monakhov's message of "Thu, 25 Feb 2010 15:45:58 +0300") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Dmitry Monakhov writes: > Can someone please describe me why directio deny partial writes. > For example if someone try to write 100Mb but file system has less > data it return ENOSPC in the middle of block allocation. > All allocated blocks will be truncated (it may be 100Mb -4k) end > ENOSPC will be returned. As far as i remember direct_io always act > like this, but i never asked why? > Why do we have to give up all the progress we made? > In fact partial writes are possible in case of holes, when we > fall back to buffered write. XFS implemented partial writes. > > I've done trivial changes and it works like charm. > Let's enable partial writes support and allow caller to define > this behavior. add Andrew to cc: