public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Timofey Titovets <nefelim4ag@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/4] [RESEND] Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction
Date: Thu, 26 Apr 2018 16:03:14 +0200	[thread overview]
Message-ID: <20180426140314.GW21272@twin.jikos.cz> (raw)
In-Reply-To: <20180424233717.31283-2-nefelim4ag@gmail.com>

On Wed, Apr 25, 2018 at 02:37:14AM +0300, Timofey Titovets wrote:
> At now btrfs_dedupe_file_range() restricted to 16MiB range for
> limit locking time and memory requirement for dedup ioctl()
> 
> For too big input range code silently set range to 16MiB
> 
> Let's remove that restriction by do iterating over dedup range.
> That's backward compatible and will not change anything for request
> less then 16MiB.
> 
> Changes:
>   v1 -> v2:
>     - Refactor btrfs_cmp_data_prepare and btrfs_extent_same
>     - Store memory of pages array between iterations
>     - Lock inodes once, not on each iteration
>     - Small inplace cleanups

I think this patch should be split into more, there are several logical
changes mixed together.

I can add the patch to for-next to see if there are any problems caught
by the existing test, but will expect more revisions of the patch. I
don't see any fundamental problems so far.

Suggested changes:
* factor out __btrfs_extent_same
* adjust parameters if needed by the followup patches
* add the chunk counting logic
* any other cleanups

  reply	other threads:[~2018-04-26 14:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 23:37 [PATCH 0/4] [RESEND] Btrfs: just bunch of patches to ioctl.c Timofey Titovets
2018-04-24 23:37 ` [PATCH 1/4] [RESEND] Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction Timofey Titovets
2018-04-26 14:03   ` David Sterba [this message]
2018-04-28  9:35     ` Timofey Titovets
2018-04-24 23:37 ` [PATCH 2/4] [RESEND] Btrfs: make should_defrag_range() understood compressed extents Timofey Titovets
2018-04-24 23:37 ` [PATCH 3/4] [RESEND] Btrfs: allow btrfs_defrag_file() uncompress files on defragmentation Timofey Titovets
2018-04-24 23:37 ` [PATCH 4/4] [RESEND] Btrfs: reduce size of struct btrfs_inode Timofey Titovets
2018-04-26 13:42   ` David Sterba
2018-04-28 10:01     ` Timofey Titovets
2018-05-01 15:39       ` 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=20180426140314.GW21272@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nefelim4ag@gmail.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