From: David Sterba <dsterba@suse.cz>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: linux-btrfs@vger.kernel.org, linux-block@vger.kernel.org,
markus@trippelsdorf.de, linux-kernel@vger.kernel.org,
axboe@kernel.dk, dsterba@suse.com, marc.c.dionne@gmail.com,
Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: Re: [PATCH v2] btrfs: Correct assignment of pos
Date: Fri, 7 Jul 2017 18:15:10 +0200 [thread overview]
Message-ID: <20170707161510.GJ2866@twin.jikos.cz> (raw)
In-Reply-To: <20170705033307.8213-1-rgoldwyn@suse.de>
On Tue, Jul 04, 2017 at 10:33:07PM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> Assigning pos for usage early messes up in append mode, where
> the pos is re-assigned in generic_write_checks(). Assign
> pos later to get the correct position to write from iocb->ki_pos.
>
> Since check_can_nocow also uses the value of pos, we shift
> generic_write_checks() before check_can_nocow(). Checks with
> IOCB_DIRECT are present in generic_write_checks(), so checking
> for IOCB_NOWAIT is enough.
>
> Also, put locking sequence in the fast path.
>
> Changes since v1:
> - Moved pos higher up to encompass check_can_nocow() call.
>
> Fixes: edf064e7c6fe ("btrfs: nowait aio support")
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Acked-by: David Sterba <dsterba@suse.com>
next prev parent reply other threads:[~2017-07-07 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 3:33 [PATCH v2] btrfs: Correct assignment of pos Goldwyn Rodrigues
2017-07-07 16:15 ` David Sterba [this message]
2017-07-10 23:00 ` Liu Bo
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=20170707161510.GJ2866@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=axboe@kernel.dk \
--cc=dsterba@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.c.dionne@gmail.com \
--cc=markus@trippelsdorf.de \
--cc=rgoldwyn@suse.com \
--cc=rgoldwyn@suse.de \
/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