Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full

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

 



On Wed, 5 Mar 2025 at 05:31, Rasmus Villemoes <ravi@xxxxxxxxx> wrote:
>
> On Mon, Mar 03 2025, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > +/*
> > + * We have to declare this outside 'struct pipe_inode_info',
> > + * but then we can't use 'union pipe_index' for an anonymous
> > + * union, so we end up having to duplicate this declaration
> > + * below. Annoying.
> > + */
> > +union pipe_index {
> > +     unsigned long head_tail;
> > +     struct {
> > +             pipe_index_t head;
> > +             pipe_index_t tail;
> > +     };
> > +};
> > +
>
> -fms-extensions ? Willy wanted to add that for use in mm/ some years ago
> [*], and it has come up a few other times as well.
>
> [*] https://lore.kernel.org/lkml/20180419152817.GD25406@xxxxxxxxxxxxxxxxxxxxxx/

Oh, I was unaware of that extension, and yes, it would have been
lovely here, avoiding that duplicate union declaration.

But it does require clang support - I see that clang has a
'-fms-extensions' as well, so it's presumably there.

I don't know if it's worth it for the (small handful) of cases we'd
have in the kernel, but it does seem useful.

                 Linus




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

  Powered by Linux