Re: [PATCH 1/6] seq_file: add seq_read_iter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 16, 2020 at 12:25:13AM +0000, Al Viro wrote:
> On Sun, Nov 15, 2020 at 04:51:49PM -0700, Nathan Chancellor wrote:
> > Looks good to me on top of d4d50710a8b46082224376ef119a4dbb75b25c56,
> > thanks for quickly looking into this!
> > 
> > Tested-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
> 
> OK... a variant with (hopefully) better comments and cleaned up
> logics in the second loop (
>                 if (seq_has_overflowed(m) || err) {
>                         m->count = offs;
>                         if (likely(err <= 0))
>                                 break;
>                 }
> replaced with
>                 if (err > 0) {          // ->show() says "skip it"
>                         m->count = offs;
>                 } else if (err || seq_has_overflowed(m)) {
>                         m->count = offs;
>                         break;
>                 }
> ) follows.  I'm quite certain that it is an equivalent transformation
> (seq_has_overflowed() has no side effects) and IMO it's slightly
> more readable that way.  Survives local beating; could you check if
> it's still OK with your testcase?  Equivalent transformation or not,
> I'd rather not slap anyone's Tested-by: on a modified variant of
> patch...

Still good.

Tested-by: Nathan Chancellor <natechancellor@xxxxxxxxx>

> BTW, is that call of readv() really coming from init?  And if it
> is, what version of init are you using?

I believe that it is but since this is WSL2, I believe that /init is a
proprietary Microsoft implementation, rather than systemd or another
init system:

https://wiki.ubuntu.com/WSL#Keeping_Ubuntu_Updated_in_WSL

So I am not sure how possible it is to see exactly what is going on or
getting it improved.

Cheers,
Nathan



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux