From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/4] btrfs: autodefrag: only scan one inode once
Date: Wed, 23 Feb 2022 16:53:01 +0100 [thread overview]
Message-ID: <20220223155301.GP12643@twin.jikos.cz> (raw)
In-Reply-To: <64987622-6786-6a67-ffac-65dc92ea90d0@gmx.com>
On Wed, Feb 23, 2022 at 07:42:05AM +0800, Qu Wenruo wrote:
> On 2022/2/23 01:32, David Sterba wrote:
> > On Sun, Feb 13, 2022 at 03:42:32PM +0800, Qu Wenruo wrote:
> > @@ -295,39 +265,29 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info,
> > goto cleanup;
> > }
> >
> > + if (cur >= i_size_read(inode)) {
> > + iput(inode);
> > + break;
>
> Would this even compile?
> Break without a while loop?
That was a typo, s/break/goto cleanup/.
> To me, the open-coded while loop using goto is even worse.
> I don't think just saving one indent is worthy.
Well for backport purposes the fix should be minimal and not necessarily
pretty. Indenting code produces a diff that replaces one blob with
another blob, with additional changes and increases line count, which is
one of the criteria for stable acceptance.
> Where can I find the final version to do more testing/review?
Now pushed to branch fix/autodefrag-io in my git repos, I've only
updated changelogs.
next prev parent reply other threads:[~2022-02-23 15:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 7:42 [PATCH 0/4] btrfs: make autodefrag to defrag and only defrag small write ranges Qu Wenruo
2022-02-13 7:42 ` [PATCH 1/4] btrfs: remove unused parameter for btrfs_add_inode_defrag() Qu Wenruo
2022-02-13 7:42 ` [PATCH 2/4] btrfs: add trace events for defrag Qu Wenruo
2022-02-13 7:42 ` [PATCH 3/4] btrfs: autodefrag: only scan one inode once Qu Wenruo
2022-02-22 17:32 ` David Sterba
2022-02-22 23:42 ` Qu Wenruo
2022-02-23 15:53 ` David Sterba [this message]
2022-02-24 6:59 ` Qu Wenruo
2022-02-24 9:45 ` Qu Wenruo
2022-02-24 12:18 ` Qu Wenruo
2022-02-24 19:44 ` David Sterba
2022-02-24 19:41 ` David Sterba
2022-02-13 7:42 ` [PATCH 4/4] btrfs: close the gap between inode_should_defrag() and autodefrag extent size threshold Qu Wenruo
2022-02-15 6:55 ` [PATCH 0/4] btrfs: make autodefrag to defrag and only defrag small write ranges Qu Wenruo
2022-02-22 1:10 ` Su Yue
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=20220223155301.GP12643@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@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