linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <clm@fb.com>
To: Filipe David Borba Manana <fdmanana@gmail.com>,
	<linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v5] Btrfs: make fsync work after cloning into a file
Date: Sun, 29 Jun 2014 12:51:44 -0400	[thread overview]
Message-ID: <53B04420.5040807@fb.com> (raw)
In-Reply-To: <1402282085-32217-1-git-send-email-fdmanana@gmail.com>



On 06/08/2014 10:48 PM, Filipe David Borba Manana wrote:
> When cloning into a file, we were correctly replacing the extent
> items in the target range and removing the extent maps. However
> we weren't replacing the extent maps with new ones that point to
> the new extents - as a consequence, an incremental fsync (when the
> inode doesn't have the full sync flag) was a NOOP, since it relies
> on the existence of extent maps in the modified list of the inode's
> extent map tree, which was empty. Therefore add new extent maps to
> reflect the target clone range.
> 
> A test case for xfstests follows.

[ ... ]

> @@ -3406,6 +3471,10 @@ process_slot:
>  		}
>  		ret = clone_finish_inode_update(trans, inode, destoff + len,
>  						destoff, olen);
> +		if (ret)
> +			goto out;
> +		clone_update_extent_map(inode, trans, path, NULL, last_dest_end,
> +					destoff + len - last_dest_end);
>  	}
>  
>  out:
> 

path has already been released by this point, I'm getting use-fater-free
crashes during xfstests.

-chris

      reply	other threads:[~2014-06-29 16:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06  4:05 [PATCH] Btrfs: make fsync work after cloning into a file Filipe David Borba Manana
2014-06-06 10:33 ` Liu Bo
2014-06-06 15:35 ` [PATCH v2] " Filipe David Borba Manana
2014-06-06 16:12 ` [PATCH v3] " Filipe David Borba Manana
2014-06-08 12:13 ` [PATCH v4] " Filipe David Borba Manana
2014-06-09  2:48 ` [PATCH v5] " Filipe David Borba Manana
2014-06-29 16:51   ` Chris Mason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B04420.5040807@fb.com \
    --to=clm@fb.com \
    --cc=fdmanana@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).