| To: | bo.li.liu@xxxxxxxxxx, "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
|---|---|
| Subject: | Re: fallocate mode flag for "unshare blocks"? |
| From: | "Austin S. Hemmelgarn" <ahferroin7@xxxxxxxxx> |
| Date: | Thu, 31 Mar 2016 07:18:55 -0400 |
| Cc: | Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, linux-btrfs <linux-btrfs@xxxxxxxxxxxxxxx>, linux-api@xxxxxxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=/RGHvvSWdqiROlxyeVHHLIGvX76DrsyFA5l1/90V8HE=; b=LoZFsbcjLmmuyCAon5UdkudqPHXG9c2rZdxrZ7RRAgZv/SrG0sMM1jw64mCKUfz8Ev 5UAsLhmJ+KnFslnmBfQkSiMPZWz/mpReegQVgZh73MQs7sjJkfFDU9HrxY6ftefVD6gR 5TaWioMyU4ZQXToZo6s2DcOT8zF6Chgb7kU4IHbjXs50m9VZ67w6GcROsY/r7ugOCwaz anrJM4KQ4k/ZneUKXDoeFVSudrwI7nPR2meQw81vgLoHr/SUBXczmcC5exaMC3NI5fLV wDzI9Hfq5e2ErEowhZmMOGJae5/f64GlU9GU3RLg0vVUi/Xy/2ANuLisL9S0kUhJjtZg QXtA== |
| In-reply-to: | <20160331003242.GA5813@xxxxxxxxxxxxxxxxxxxxx> |
| References: | <20160302155007.GB7125@xxxxxxxxxxxxx> <20160330182755.GC2236@xxxxxxxxxxxxxxxx> <20160331003242.GA5813@xxxxxxxxxxxxxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 |
On 2016-03-30 20:32, Liu Bo wrote: And this _really_ should get fixed, otherwise glibc will add a check for running posix_fallocate against BTRFS and force emulation, and people _will_ complain about performance.On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote:Hi all, Christoph and I have been working on adding reflink and CoW support to XFS recently. Since the purpose of (mode 0) fallocate is to make sure that future file writes cannot ENOSPC, I extended the XFS fallocate handler to unshare any shared blocks via the copy on write mechanism I built for it. However, Christoph shared the following concerns with me about that interpretation:I know that I suggested unsharing blocks on fallocate, but it turns out this is causing problems. Applications expect falloc to be a fast metadata operation, and copying a potentially large number of blocks is against that expextation. This is especially bad for the NFS server, which should not be blocked for a long time in a synchronous operation. I think we'll have to remove the unshare and just fail the fallocate for a reflinked region for now. I still think it makes sense to expose an unshare operation, and we probably should make that another fallocate mode.I'm expecting fallocate to be fast, too. 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. |
| Previous by Date: | Re: fallocate mode flag for "unshare blocks"?, Dave Chinner |
|---|---|
| Next by Date: | Re: fallocate mode flag for "unshare blocks"?, Austin S. Hemmelgarn |
| Previous by Thread: | Re: fallocate mode flag for "unshare blocks"?, Henk Slager |
| Next by Thread: | Re: fallocate mode flag for "unshare blocks"?, Austin S. Hemmelgarn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |