From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: [PATCH] btrfs: Replace opencoded sizes with their symbolic constants
Date: Mon, 16 Oct 2017 15:41:25 +0200 [thread overview]
Message-ID: <20171016134125.GK3521@twin.jikos.cz> (raw)
In-Reply-To: <1508160596-30915-1-git-send-email-nborisov@suse.com>
On Mon, Oct 16, 2017 at 04:29:56PM +0300, Nikolay Borisov wrote:
> Currently btrfs' code uses a mix of opencoded sizes and defines from sizes.h.
> Let's unifiy the code base to always use the symbolic constants. No functional
> changes
>
> -#define BTRFS_DEFRAG_BATCH 1024
> +#define BTRFS_DEFRAG_BATCH SZ_1K
This is a number, not a size, so the SZ_ constant is misleading
> static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info,
> struct inode_defrag *defrag)
> diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
> index a7f79254ecca..553172271913 100644
> --- a/fs/btrfs/raid56.c
> +++ b/fs/btrfs/raid56.c
> @@ -58,7 +58,7 @@
> */
> #define RBIO_CACHE_READY_BIT 3
>
> -#define RBIO_CACHE_SIZE 1024
> +#define RBIO_CACHE_SIZE SZ_1K
Same here.
The rest is ok.
next prev parent reply other threads:[~2017-10-16 13:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 13:29 [PATCH] btrfs: Replace opencoded sizes with their symbolic constants Nikolay Borisov
2017-10-16 13:41 ` David Sterba [this message]
2017-10-16 13:48 ` [PATCH v2] " Nikolay Borisov
2017-10-16 14:51 ` 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=20171016134125.GK3521@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;
as well as URLs for NNTP newsgroup(s).