Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix hole read corruption for compressed inline extents
Date: Mon, 28 Nov 2016 17:27:10 +0500	[thread overview]
Message-ID: <20161128172710.202587ce@natsu> (raw)
In-Reply-To: <1480309392-4786-1-git-send-email-ce3g8jdj@umail.furryterror.org>

On Mon, 28 Nov 2016 00:03:12 -0500
Zygo Blaxell <ce3g8jdj@umail.furryterror.org> wrote:

> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 8e3a5a2..b1314d6 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -6803,6 +6803,12 @@ static noinline int uncompress_inline(struct btrfs_path *path,
>  	max_size = min_t(unsigned long, PAGE_SIZE, max_size);
>  	ret = btrfs_decompress(compress_type, tmp, page,
>  			       extent_offset, inline_size, max_size);
> +	WARN_ON(max_size > PAGE_SIZE);
> +	if (max_size < PAGE_SIZE) {
> +		char *map = kmap(page);
> +		memset(map + max_size, 0, PAGE_SIZE - max_size);
> +		kunmap(page);
> +	}
>  	kfree(tmp);
>  	return ret;
>  }

Wasn't this already posted as:

btrfs: fix silent data corruption while reading compressed inline extents
https://patchwork.kernel.org/patch/9371971/

but you don't indicate that's a V2 or something, and in fact the patch seems
exactly the same, just the subject and commit message are entirely different.
Quite confusing.

-- 
With respect,
Roman

  reply	other threads:[~2016-11-28 12:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28  5:03 [PATCH] btrfs: fix hole read corruption for compressed inline extents Zygo Blaxell
2016-11-28 12:27 ` Roman Mamedov [this message]
2016-11-28 18:07   ` Zygo Blaxell
2016-12-11  5:16   ` Zygo Blaxell
2016-12-11 21:59     ` Xin Zhou
     [not found]     ` <trinity-05c92524-3d70-42a6-b8cd-f9bf40f58f9a-1481493419884@3capp-mailcom-bs05>
2016-12-13  6:40       ` Zygo Blaxell
2017-03-08  1:12         ` Liu Bo
2017-02-18 16:36 ` Zygo Blaxell

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=20161128172710.202587ce@natsu \
    --to=rm@romanrm.net \
    --cc=ce3g8jdj@umail.furryterror.org \
    --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