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


Groups > linux.kernel > #1358520

Re: [WTF] utterly tasteless ABI in hfi1 (around ->write()/->write_iter())

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [WTF] utterly tasteless ABI in hfi1 (around ->write()/->write_iter())
Date 2016-03-16 05:40 +0100
Message-ID <rdbpw-3Ku-7@gated-at.bofh.it> (permalink)
References <rdb69-3CG-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 15, 2016 at 9:17 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
>         Take a look at drivers/staging/rdma/hfi1/file_ops.c in -next and
> compare hfi1_write_iter() with hfi1_file_write().  Folks, this ABI is too
> ugly to live, let alone to be allowed breeding.
>
>         It's also brittle as hell - trivial massage around fs/read_write.c
> and fs/aio.c is quite capable of breaking that shit.  Arguably, IOCB_CMD_PWRITE
> and IOCB_CMD_PWRITEV both triggering your writev() semantics is an example of
> just such breakage.  Sigh...

We could just decide that if a file descriptor has both ->write and
->write_iter entities, we always pick ->write_iter in the vfs layer.

That way it's always consistent.

Simple ordering change in __vfs_write()..

We can switch is back later, but make sure it hits a release or two.
Or at least a few rc's, to flush out any problems.

Anybody who thinks that they can have different semantics for write()
and writev() is just completely broken.

              Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[WTF] utterly tasteless ABI in hfi1 (around ->write()/->write_iter()) Al Viro <viro@ZenIV.linux.org.uk> - 2016-03-16 05:20 +0100
  Re: [WTF] utterly tasteless ABI in hfi1 (around ->write()/->write_iter()) Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-16 05:40 +0100
  Re: [WTF] utterly tasteless ABI in hfi1 (around  ->write()/->write_iter()) Doug Ledford <dledford@redhat.com> - 2016-03-16 16:50 +0100
    Re: [WTF] utterly tasteless ABI in hfi1 (around  ->write()/->write_iter()) Theodore Ts'o <tytso@mit.edu> - 2016-03-16 17:10 +0100
    Re: [WTF] utterly tasteless ABI in hfi1 (around ->write()/->write_iter()) Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-16 17:40 +0100
      Re: [WTF] utterly tasteless ABI in hfi1 (around  ->write()/->write_iter()) Al Viro <viro@ZenIV.linux.org.uk> - 2016-03-16 18:10 +0100
    RE: [WTF] utterly tasteless ABI in hfi1 (around  ->write()/->write_iter()) "Dalessandro, Dennis" <dennis.dalessandro@intel.com> - 2016-03-17 00:00 +0100

csiph-web