Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: dsterba@suse.cz, 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 22:39:02 +0100	[thread overview]
Message-ID: <20210111213902.GG6430@twin.jikos.cz> (raw)
In-Reply-To: <20210111105812.423915-1-nborisov@suse.com>

On Mon, Jan 11, 2021 at 12:58:11PM +0200, 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>
> ---
> David,
> 
> Here are 2 patches which I believe should be folded into
> "btrfs: shrink delalloc pages instead of full inodes"

That patch is about to be merged to Linus' tree so I'll apply your
patches separately.

      parent reply	other threads:[~2021-01-11 21:41 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 ` [PATCH 1/2] btrfs: Make btrfs_start_delalloc_root's nr argument a long Josef Bacik
2021-01-11 21:39 ` David Sterba [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=20210111213902.GG6430@twin.jikos.cz \
    --to=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