file: remove f_version

Obviously not for this merge window anymore but let me get it out now:

The f_version member in struct file isn't particularly well-defined. It
is mainly used as a cookie to detect concurrent seeks when iterating
directories. But it is also abused by some subsytems for completely
unrelated things.

It really is a directory specific thing that doesn't really need to live
in struct file afaict. There's one exception: pipes.

For pipes, f_version is (ab)used to defer poll notifications until a
write has happened. And struct pipe_inode_info is used by multiple
struct files in their ->private_data so there's no chance of pushing
that down into file->private_data without introducing another pointer
indirection.

But this is a solvable problem. Only regular files with FMODE_ATOMIC_POS
and directories require f_pos_lock. Pipes and other files don't. So this
adds a union into struct file encompassing f_pos_lock and a pipe
specific f_pipe member that pipes can use. This union of course can be
extended to other file types and is similar to what we do in struct
inode already.

This holds up in xfstests and LTP.
  
To: linux-fsdevel@vger.kernel.org
Cc: Jan Kara <jack@suse.com>
Cc: linux-ext4@vger.kernel.org
Cc: ocfs2-devel@lists.linux.dev
Cc: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>

--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
  "series": {
    "revision": 1,
    "change-id": "20240829-vfs-file-f_version-66321e3dafeb",
    "prefixes": [
      "RFC"
    ],
    "base-branch": "vfs.file"
  }
}