All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/4] variables fixes in compression.c
Date: Mon, 31 May 2021 20:37:50 +0200	[thread overview]
Message-ID: <20210531183750.GC31483@twin.jikos.cz> (raw)
In-Reply-To: <cover.1622252932.git.anand.jain@oracle.com>

On Sat, May 29, 2021 at 05:48:32PM +0800, Anand Jain wrote:
> Patch (btrfs: reduce compressed_bio member's types) reduced the
> size to unsigned int as in [1]. Fix its cascading effects here.
> And one stale comment in the patch 4/4.
> 
> [1]
> -       unsigned long len;
> +       unsigned int len;
> 
> -       int compress_type;
> +       u8 compress_type;
> 
> -       unsigned long nr_pages;
> +       unsigned int nr_pages;
> 
> -       unsigned long compressed_len;
> +       unsigned int compressed_len;
> 
> -       int errors;
> +       u8 errors;
> 
> As shown in [2], we set the max compressable block size to 128K. So
> struct async_extent can reduce some of its members to unsigned int as
> well.
> 
> [2]
> static noinline int compress_file_range(struct async_chunk *async_chunk)
> ::
>   617         total_compressed = min_t(unsigned long, total_compressed,
>   618                         BTRFS_MAX_UNCOMPRESSED);
> 
> But changes touches too many places, and my first attempt to fix
> is unsatisfactory to me, so I am just sending the changes limited to the
> file compression.c.

That's fin. As long as a patch does one change (possibly cascading to
more places) it should be doable step by step.

> Anand Jain (4):
>   btrfs: optimize users of members of the struct compressed_bio
>   btrfs: optimize variables size in btrfs_submit_compressed_read
>   btrfs: optimize variables size in btrfs_submit_compressed_write
>   btrfs: fix comment about max_out in btrfs_compress_pages

Added to misc-next, thanks.

      parent reply	other threads:[~2021-05-31 18:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29  9:48 [PATCH 0/4] variables fixes in compression.c Anand Jain
2021-05-29  9:48 ` [PATCH 1/4] btrfs: reduce the variable size to fit nr_pages Anand Jain
2021-05-29  9:48 ` [PATCH 2/4] btrfs: optimize variables size in btrfs_submit_compressed_read Anand Jain
2021-05-29  9:48 ` [PATCH 3/4] btrfs: optimize variables size in btrfs_submit_compressed_write Anand Jain
2021-05-29  9:48 ` [PATCH 4/4] btrfs: fix comment about max_out in btrfs_compress_pages Anand Jain
2021-05-31 18:37 ` 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=20210531183750.GC31483@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.