public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: trim: Check the range passed into to prevent overflow
Date: Thu, 30 May 2019 15:13:24 +0300	[thread overview]
Message-ID: <e6e5d0e7-dfac-826b-5d21-a2d110c3d3e9@suse.com> (raw)
In-Reply-To: <20190530120402.GD15290@twin.jikos.cz>



On 30.05.19 г. 15:04 ч., David Sterba wrote:
> On Tue, May 28, 2019 at 04:21:54PM +0800, Qu Wenruo wrote:
>> Normally the range->len is set to default value (U64_MAX), but when it's
>> not default value, we should check if the range overflows.
>>
>> And if overflows, return -EINVAL before doing anything.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
> 
> The range support of TRIM will be reverted so this patch won't be
> needed.
> 

Range support is going to be removed only from unallocated device space
trimming, not block group trimming. So it's still required.

  parent reply	other threads:[~2019-05-30 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28  8:21 [PATCH] btrfs: trim: Check the range passed into to prevent overflow Qu Wenruo
2019-05-28 12:22 ` Nikolay Borisov
2019-05-30 12:04 ` David Sterba
2019-05-30 12:05   ` Qu Wenruo
2019-05-30 12:13   ` Nikolay Borisov [this message]
2019-05-31  5:35 ` Anand Jain
2019-05-31  5:56   ` Qu Wenruo
2019-05-31  6:01     ` Qu Wenruo
2019-08-07 12:03 ` Qu Wenruo
2019-08-07 12:30   ` David Sterba

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=e6e5d0e7-dfac-826b-5d21-a2d110c3d3e9@suse.com \
    --to=nborisov@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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