On Fri, Oct 7, 2016 at 3:01 AM, robbieko <[email protected]> wrote:
> From: Robbie Ko <[email protected]>
>
> In run_delalloc_nocow, maybe not release subv_writers conter,
> will lead to create snapshot hang.
>
> Signed-off-by: Robbie Ko <[email protected]>
I've picked this into my integration branch for 4.11 and rewrote the
changelog and subject.
Thanks.
> ---
> fs/btrfs/inode.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index e6811c4..9722554 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -1386,11 +1386,17 @@ next_slot:
> * this ensure that csum for a given extent are
> * either valid or do not exist.
> */
> - if (csum_exist_in_range(root, disk_bytenr, num_bytes))
> + if (csum_exist_in_range(root, disk_bytenr,
> num_bytes)) {
> + if (!nolock)
> + btrfs_end_write_no_snapshoting(root);
> goto out_check;
> + }
> if (!btrfs_inc_nocow_writers(root->fs_info,
> - disk_bytenr))
> + disk_bytenr)) {
> + if (!nolock)
> + btrfs_end_write_no_snapshoting(root);
> goto out_check;
> + }
> nocow = 1;
> } else if (extent_type == BTRFS_FILE_EXTENT_INLINE) {
> extent_end = found_key.offset +
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Filipe David Manana,
"People will forget what you said,
people will forget what you did,
but people will never forget how you made them feel."
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html