Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1680730 > unrolled thread

Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells

Started byMarkus Trippelsdorf <markus@trippelsdorf.de>
First post2017-07-04 09:50 +0200
Last post2017-07-10 14:40 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-07-04 09:50 +0200
    Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells Goldwyn Rodrigues <rgoldwyn@suse.de> - 2017-07-04 17:40 +0200
      Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-07-04 17:40 +0200
      Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells Jens Axboe <axboe@kernel.dk> - 2017-07-05 00:20 +0200
        Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells Goldwyn Rodrigues <rgoldwyn@suse.de> - 2017-07-08 04:00 +0200
          Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells Jens Axboe <axboe@kernel.dk> - 2017-07-08 04:10 +0200
            Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells David Sterba <dsterba@suse.cz> - 2017-07-10 14:40 +0200

#1680730 — Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells

FromMarkus Trippelsdorf <markus@trippelsdorf.de>
Date2017-07-04 09:50 +0200
SubjectRe: Commit edf064e7c (btrfs: nowait aio support) breaks shells
Message-ID<tZqKS-5ky-13@gated-at.bofh.it>
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
 %

-- 
Markus

[toc] | [next] | [standalone]


#1681057

FromGoldwyn Rodrigues <rgoldwyn@suse.de>
Date2017-07-04 17:40 +0200
Message-ID<tZy5H-1N0-1@gated-at.bofh.it>
In reply to#1680730

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) {



-- 
Goldwyn

[toc] | [prev] | [next] | [standalone]


#1681058

FromMarkus Trippelsdorf <markus@trippelsdorf.de>
Date2017-07-04 17:40 +0200
Message-ID<tZy5I-1N0-13@gated-at.bofh.it>
In reply to#1681057
On 2017.07.04 at 10:31 -0500, 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?

It fixes the issue. Thank you.

-- 
Markus

[toc] | [prev] | [next] | [standalone]


#1681204

FromJens Axboe <axboe@kernel.dk>
Date2017-07-05 00:20 +0200
Message-ID<tZEkN-5Ye-5@gated-at.bofh.it>
In reply to#1681057
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

[toc] | [prev] | [next] | [standalone]


#1683512

FromGoldwyn Rodrigues <rgoldwyn@suse.de>
Date2017-07-08 04:00 +0200
Message-ID<u0Ncm-477-3@gated-at.bofh.it>
In reply to#1681204

On 07/04/2017 05:16 PM, Jens Axboe wrote:
> 
> Please expedite getting this upstream, asap.
> 

Jens,

I have posted an updated patch [1] and it is acked by David. Would you
pick it up or should it go through the btrfs tree (or some other tree)?

[1] https://patchwork.kernel.org/patch/9825813/

-- 
Goldwyn

[toc] | [prev] | [next] | [standalone]


#1683513

FromJens Axboe <axboe@kernel.dk>
Date2017-07-08 04:10 +0200
Message-ID<u0Nm1-4qP-1@gated-at.bofh.it>
In reply to#1683512
On 07/07/2017 07:51 PM, Goldwyn Rodrigues wrote:
> 
> 
> On 07/04/2017 05:16 PM, Jens Axboe wrote:
>>
>> Please expedite getting this upstream, asap.
>>
> 
> Jens,
> 
> I have posted an updated patch [1] and it is acked by David. Would you
> pick it up or should it go through the btrfs tree (or some other tree)?
> 
> [1] https://patchwork.kernel.org/patch/9825813/

I'm fine with either, I just want it to go in asap. I'm sending off
a pull Monday. David, up to you.

-- 
Jens Axboe

[toc] | [prev] | [next] | [standalone]


#1684195

FromDavid Sterba <dsterba@suse.cz>
Date2017-07-10 14:40 +0200
Message-ID<u1G8O-53s-27@gated-at.bofh.it>
In reply to#1683513
On Fri, Jul 07, 2017 at 08:09:28PM -0600, Jens Axboe wrote:
> On 07/07/2017 07:51 PM, Goldwyn Rodrigues wrote:
> > On 07/04/2017 05:16 PM, Jens Axboe wrote:
> >>
> >> Please expedite getting this upstream, asap.
> > 
> > I have posted an updated patch [1] and it is acked by David. Would you
> > pick it up or should it go through the btrfs tree (or some other tree)?
> > 
> > [1] https://patchwork.kernel.org/patch/9825813/
> 
> I'm fine with either, I just want it to go in asap. I'm sending off
> a pull Monday. David, up to you.

I'm reading this just now, so I'll send the patch in my pull today.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web