Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Nikolay Borisov <nborisov@suse.com>, dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: Make btrfs_start_delalloc_root's nr argument a long
Date: Mon, 11 Jan 2021 10:48:36 -0500	[thread overview]
Message-ID: <ad043e20-10de-d1f6-6361-9fec461dbaec@toxicpanda.com> (raw)
In-Reply-To: <20210111105812.423915-1-nborisov@suse.com>

On 1/11/21 5:58 AM, Nikolay Borisov wrote:
> It's currently u64 which gets instantly translated either to LONG_MAX
> (if U64_MAX is passed) or casted to an unsigned long (which is in fact,
> wrong because iwriteback_control::nr_to_write is a signed, long type).
> 
> Just convert the function's argument to be long time which obviates the
> need to manually convert u64 value to a long. Adjust all call sites
> which pass U64_MAX to pass LONG_MAX. Finally ensure that in
> shrink_delalloc the u64 is converted to a long without overflowing,
> resulting in a negative number.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

You can add

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

to both patches, thanks,

Josef

  parent reply	other threads:[~2021-01-11 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 10:58 [PATCH 1/2] btrfs: Make btrfs_start_delalloc_root's nr argument a long Nikolay Borisov
2021-01-11 10:58 ` [PATCH 2/2] btrfs: Remove always true condition in btrfs_start_delalloc_roots Nikolay Borisov
2021-01-11 15:48 ` Josef Bacik [this message]
2021-01-11 21:39 ` [PATCH 1/2] btrfs: Make btrfs_start_delalloc_root's nr argument a long 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=ad043e20-10de-d1f6-6361-9fec461dbaec@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@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