From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org, osandov@osandov.com
Subject: Re: [PATCH 1/2] btrfs: Fold generic_write_checks() in btrfs_write_check()
Date: Thu, 10 Dec 2020 10:10:29 -0600 [thread overview]
Message-ID: <20201210161029.vi7ay6zslsnsklmn@fiona> (raw)
In-Reply-To: <20201210114756.GD6430@twin.jikos.cz>
On 12:47 10/12, David Sterba wrote:
> On Tue, Dec 08, 2020 at 12:42:40PM -0600, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues <rgoldwyn@suse.com>
> >
> > Code Cleanup.
> >
> > Fold generic_write_checks() in btrfs_write_check(), because
> > generic_write_checks() is called before btrfs_write_check() in both
> > cases. The prototype of btrfs_write_check() has been changed to return
> > ssize_t and it can return zero as a valid error code. btrfs_write_check
> > now returns the count of I/O to be performed.
>
> That's effectively reverting what Omar sent as a fix to your initial
> patch:
>
> https://lore.kernel.org/linux-btrfs/b096cecce8277b30e1c7e26efd0450c0bc12ff31.1605723568.git.osandov@fb.com/
>
> fixing a problem. Now you revert that to fix another problem, now with
> the lock added. I'd rather have one patch without this cleanup and given
> that this is technically fixing a regression in the new 5.11 code it'll
> go to post rc1 pull request.
This patchset fixes the problems mentioned there since both count and
pos are accessed after the btrfs_write_check is called. However, this
should be rejected because of the RWF_ENCODED work.
I will post a patch for fixing the regression only.
--
Goldwyn
next prev parent reply other threads:[~2020-12-10 16:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 18:42 [PATCH 0/2] Fix direct write with respect to inode locking Goldwyn Rodrigues
2020-12-08 18:42 ` [PATCH 1/2] btrfs: Fold generic_write_checks() in btrfs_write_check() Goldwyn Rodrigues
2020-12-10 8:43 ` Nikolay Borisov
2020-12-10 11:47 ` David Sterba
2020-12-10 16:10 ` Goldwyn Rodrigues [this message]
2020-12-08 18:42 ` [PATCH 2/2] btrfs: Make btrfs_direct_write atomic with respect to inode_lock Goldwyn Rodrigues
2020-12-10 8:52 ` Nikolay Borisov
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=20201210161029.vi7ay6zslsnsklmn@fiona \
--to=rgoldwyn@suse.de \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=osandov@osandov.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