From: Jens Axboe <axboe@kernel.dk>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>,
Markus Trippelsdorf <markus@trippelsdorf.de>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells
Date: Tue, 4 Jul 2017 16:16:52 -0600 [thread overview]
Message-ID: <c57bf8a7-fb0d-1a53-814d-bb4fba4b246b@kernel.dk> (raw)
In-Reply-To: <db94b5f7-d3a1-2340-0758-9437193d8254@suse.de>
On 07/04/2017 09:31 AM, Goldwyn Rodrigues wrote:
>
>
> On 07/04/2017 02:45 AM, Markus Trippelsdorf wrote:
>> On 2017.07.04 at 06:23 +0200, Markus Trippelsdorf wrote:
>>> commit edf064e7c6fec3646b06c944a8e35d1a3de5c2c3 (HEAD, refs/bisect/bad)
>>> Author: Goldwyn Rodrigues <rgoldwyn@suse.com>
>>> Date: Tue Jun 20 07:05:49 2017 -0500
>>>
>>> btrfs: nowait aio support
>>>
>>> apparently breaks several shell related features on my system.
>>
>> Here is a simple testcase:
>>
>> % echo "foo" >> test
>> % echo "foo" >> test
>> % cat test
>> foo
>> %
>>
>
> Thanks for testing.
> Yes, pos must be set with iocb->ki_pos for appends. I should not have
> removed the initialization. Could you try this patch?
>
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index 59e2dccdf75b..7947781229e5 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -1931,6 +1931,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb
> *iocb,
> */
> update_time_for_write(inode);
>
> + pos = iocb->ki_pos;
> start_pos = round_down(pos, fs_info->sectorsize);
> oldsize = i_size_read(inode);
> if (start_pos > oldsize) {
Please expedite getting this upstream, asap.
--
Jens Axboe
next prev parent reply other threads:[~2017-07-04 22:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 4:23 Commit edf064e7c (btrfs: nowait aio support) breaks shells Markus Trippelsdorf
2017-07-04 7:45 ` Markus Trippelsdorf
2017-07-04 15:31 ` Goldwyn Rodrigues
2017-07-04 15:37 ` Markus Trippelsdorf
2017-07-04 22:16 ` Jens Axboe [this message]
2017-07-08 1:51 ` Goldwyn Rodrigues
2017-07-08 2:09 ` Jens Axboe
2017-07-10 12:33 ` 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=c57bf8a7-fb0d-1a53-814d-bb4fba4b246b@kernel.dk \
--to=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=markus@trippelsdorf.de \
--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