From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:54432 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbcCaHzb (ORCPT ); Thu, 31 Mar 2016 03:55:31 -0400 Date: Thu, 31 Mar 2016 00:55:29 -0700 From: Christoph Hellwig To: Liu Bo Cc: "Darrick J. Wong" , Christoph Hellwig , xfs@oss.sgi.com, linux-fsdevel , linux-btrfs , linux-api@vger.kernel.org Subject: Re: fallocate mode flag for "unshare blocks"? Message-ID: <20160331075529.GB4209@infradead.org> References: <20160302155007.GB7125@infradead.org> <20160330182755.GC2236@birch.djwong.org> <20160331003242.GA5813@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20160331003242.GA5813@localhost.localdomain> Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Wed, Mar 30, 2016 at 05:32:42PM -0700, Liu Bo wrote: > Well, btrfs fallocate doesn't allocate space if it's a shared one > because it thinks the space is already allocated. So a later overwrite > over this shared extent may hit enospc errors. And this makes it an incorrect implementation of posix_fallocate, which glibcs implements using fallocate if available.