1. 13 Dec, 2019 3 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block · 5bd831a4
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - A tweak to IOSQE_IO_LINK (also marked for stable) to allow links that
         don't sever if the result is < 0.
      
         This is mostly for linked timeouts, where if we ask for a pure
         timeout we always get -ETIME. This makes links useless for that case,
         hence allow a case where it works.
      
       - Five minor optimizations to fix and improve cases that regressed
         since v5.4.
      
       - An SQTHREAD locking fix.
      
       - A sendmsg/recvmsg iov assignment fix.
      
       - Net fix where read_iter/write_iter don't honor IOCB_NOWAIT, and
         subsequently ensuring that works for io_uring.
      
       - Fix a case where for an invalid opcode we might return -EBADF instead
         of -EINVAL, if the ->fd of that sqe was set to an invalid fd value.
      
      * tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block:
        io_uring: ensure we return -EINVAL on unknown opcode
        io_uring: add sockets to list of files that support non-blocking issue
        net: make socket read/write_iter() honor IOCB_NOWAIT
        io_uring: only hash regular files for async work execution
        io_uring: run next sqe inline if possible
        io_uring: don't dynamically allocate poll data
        io_uring: deferred send/recvmsg should assign iov
        io_uring: sqthread should grab ctx->uring_lock for submissions
        io-wq: briefly spin for new work after finishing work
        io-wq: remove worker->wait waitqueue
        io_uring: allow unbreakable links
      5bd831a4
    • Linus Torvalds's avatar
      Merge tag 'for-5.5/dm-fixes' of... · 15da849c
      Linus Torvalds authored
      Merge tag 'for-5.5/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Fix DM multipath by restoring full path selector functionality for
         bio-based configurations that don't haave a SCSI device handler.
      
       - Fix dm-btree removal to ensure non-root btree nodes have at least
         (max_entries / 3) entries. This resolves userspace thin_check
         utility's report of "too few entries in btree_node".
      
       - Fix both the DM thin-provisioning and dm-clone targets to properly
         flush the data device prior to metadata commit. This resolves the
         potential for inconsistency across a power loss event when the data
         device has a volatile writeback cache.
      
       - Small documentation fixes to dm-clone and dm-integrity.
      
      * tag 'for-5.5/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        docs: dm-integrity: remove reference to ARC4
        dm thin: Flush data device before committing metadata
        dm thin metadata: Add support for a pre-commit callback
        dm clone: Flush destination device before committing metadata
        dm clone metadata: Use a two phase commit
        dm clone metadata: Track exact changes per transaction
        dm btree: increase rebalance threshold in __rebalance2()
        dm: add dm-clone to the documentation index
        dm mpath: remove harmful bio-based optimization
      15da849c
    • Linus Torvalds's avatar
      Merge tag 'sizeof_field-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 22ff311a
      Linus Torvalds authored
      Pull FIELD_SIZEOF conversion from Kees Cook:
       "A mostly mechanical treewide conversion from FIELD_SIZEOF() to
        sizeof_field(). This avoids the redundancy of having 2 macros
        (actually 3) doing the same thing, and consolidates on sizeof_field().
        While "field" is not an accurate name, it is the common name used in
        the kernel, and doesn't result in any unintended innuendo.
      
        As there are still users of FIELD_SIZEOF() in -next, I will clean up
        those during this coming development cycle and send the final old
        macro removal patch at that time"
      
      * tag 'sizeof_field-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        treewide: Use sizeof_field() macro
        MIPS: OCTEON: Replace SIZEOF_FIELD() macro
      22ff311a
  2. 12 Dec, 2019 2 commits
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.5-rc2' of git://github.com/ceph/ceph-client · 37d4e84f
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A fix to avoid a corner case when scheduling cap reclaim in batches
        from Xiubo, a patch to add some observability into cap waiters from
        Jeff and a couple of cleanups"
      
      * tag 'ceph-for-5.5-rc2' of git://github.com/ceph/ceph-client:
        ceph: add more debug info when decoding mdsmap
        ceph: switch to global cap helper
        ceph: trigger the reclaim work once there has enough pending caps
        ceph: show tasks waiting on caps in debugfs caps file
        ceph: convert int fields in ceph_mount_options to unsigned int
      37d4e84f
    • Linus Torvalds's avatar
      Merge tag 'afs-fixes-20191211' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · ae4b064e
      Linus Torvalds authored
      Pull AFS fixes from David Howells:
       "Fixes for AFS plus one patch to make debugging easier:
      
         - Fix how addresses are matched to server records. This is currently
           incorrect which means cache invalidation callbacks from the server
           don't necessarily get delivered correctly. This causes stale data
           and metadata to be seen under some circumstances.
      
         - Make the dynamic root superblock R/W so that rpm/dnf can reapply
           the SELinux label to it when upgrading the Fedora filesystem-afs
           package. If the filesystem is R/O, this fails and the upgrade
           fails.
      
           It might be better in future to allow setxattr from an LSM to
           bypass the R/O protections, if only for pseudo-filesystems.
      
         - Fix the parsing of mountpoint strings. The mountpoint object has to
           have a terminal dot, whereas the source/device string passed to
           mount should not. This confuses type-forcing suffix detection
           leading to the wrong volume variant being mounted.
      
         - Make lookups in the dynamic root superblock for creation events
           (such as mkdir) fail with EOPNOTSUPP rather than something like
           EEXIST. The dynamic root only allows implicit creation by the
           ->lookup() method - and only if the target cell exists.
      
         - Fix the looking up of an AFS superblock to include the cell in the
           matching key - otherwise all volumes with the same ID number are
           treated as the same thing, irrespective of which cell they're in.
      
         - Show the volume name of each volume in the volume records displayed
           in /proc/net/afs/<cell>/volumes. This proved useful in debugging as
           it provides a way to map the volume IDs to names, where the names
           are what appear in /proc/mounts"
      
      * tag 'afs-fixes-20191211' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Show volume name in /proc/net/afs/<cell>/volumes
        afs: Fix missing cell comparison in afs_test_super()
        afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP
        afs: Fix mountpoint parsing
        afs: Fix SELinux setting security label on /afs
        afs: Fix afs_find_server lookups for ipv4 peers
      ae4b064e
  3. 11 Dec, 2019 8 commits
    • Jens Axboe's avatar
      io_uring: ensure we return -EINVAL on unknown opcode · 9e3aa61a
      Jens Axboe authored
      If we submit an unknown opcode and have fd == -1, io_op_needs_file()
      will return true as we default to needing a file. Then when we go and
      assign the file, we find the 'fd' invalid and return -EBADF. We really
      should be returning -EINVAL for that case, as we normally do for
      unsupported opcodes.
      
      Change io_op_needs_file() to have the following return values:
      
      0   - does not need a file
      1   - does need a file
      < 0 - error value
      
      and use this to pass back the right value for this invalid case.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      9e3aa61a
    • Linus Torvalds's avatar
      Merge tag 'erofs-for-5.5-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs · 687dec9b
      Linus Torvalds authored
      Pull erofs fixes from Gao Xiang:
       "Mainly address a regression reported by David recently observed
        together with overlayfs due to the improper return value of
        listxattr() without xattr. Update outdated expressions in document as
        well.
      
        Summary:
      
         - Fix improper return value of listxattr() with no xattr
      
         - Keep up documentation with latest code"
      
      * tag 'erofs-for-5.5-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
        erofs: update documentation
        erofs: zero out when listxattr is called with no xattr
      687dec9b
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 6674fdb2
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Remove code I accidentally applied when doing a minor fix up to a
         patch, and then using "git commit -a --amend", which pulled in some
         other changes I was playing with.
      
       - Remove an used variable in trace_events_inject code
      
       - Fix function graph tracer when it traces a ftrace direct function.
         It will now ignore tracing a function that has a ftrace direct
         tramploine attached. This is needed for eBPF to use the ftrace direct
         code.
      
      * tag 'trace-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix function_graph tracer interaction with BPF trampoline
        tracing: remove set but not used variable 'buffer'
        module: Remove accidental change of module_enable_x()
      6674fdb2
    • Linus Torvalds's avatar
      pipe: simplify signal handling in pipe_read() and add comments · d1c6a2aa
      Linus Torvalds authored
      There's no need to separately check for signals while inside the locked
      region, since we're going to do "wait_event_interruptible()" right
      afterwards anyway, and the error handling is much simpler there.
      
      The check for whether we had already read anything was also redundant,
      since we no longer do the odd merging of reads when there are pending
      writers.
      
      But perhaps more importantly, this adds commentary about why we still
      need to wake up possible writers even though we didn't read any data,
      and why we can skip all the finishing touches now if we get a signal (or
      had a signal pending) while waiting for more data.
      
      [ This is a split-out cleanup from my "make pipe IO use exclusive wait
        queues" thing, which I can't apply because it triggers a nasty bug in
        the GNU make jobserver   - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d1c6a2aa
    • David Howells's avatar
      afs: Show volume name in /proc/net/afs/<cell>/volumes · 50559800
      David Howells authored
      Show the name of each volume in /proc/net/afs/<cell>/volumes to make it
      easier to work out the name corresponding to a volume ID.  This makes it
      easier to work out which mounts in /proc/mounts correspond to which volume
      ID.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      50559800
    • David Howells's avatar
      afs: Fix missing cell comparison in afs_test_super() · 106bc798
      David Howells authored
      Fix missing cell comparison in afs_test_super().  Without this, any pair
      volumes that have the same volume ID will share a superblock, no matter the
      cell, unless they're in different network namespaces.
      
      Normally, most users will only deal with a single cell and so they won't
      see this.  Even if they do look into a second cell, they won't see a
      problem unless they happen to hit a volume with the same ID as one they've
      already got mounted.
      
      Before the patch:
      
          # ls /afs/grand.central.org/archive
          linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
          # ls /afs/kth.se/
          linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
          # cat /proc/mounts | grep afs
          none /afs afs rw,relatime,dyn,autocell 0 0
          #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0
          #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0
          #grand.central.org:root.archive /afs/kth.se afs ro,relatime 0 0
      
      After the patch:
      
          # ls /afs/grand.central.org/archive
          linuxdev/  mailman/  moin/  mysql/  pipermail/  stage/  twiki/
          # ls /afs/kth.se/
          admin/        common/  install/  OldFiles/  service/  system/
          bakrestores/  home/    misc/     pkg/       src/      wsadmin/
          # cat /proc/mounts | grep afs
          none /afs afs rw,relatime,dyn,autocell 0 0
          #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0
          #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0
          #kth.se:root.cell /afs/kth.se afs ro,relatime 0 0
      
      Fixes: ^1da177e4 ("Linux-2.6.12-rc2")
      Reported-by: default avatarCarsten Jacobi <jacobi@de.ibm.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Tested-by: default avatarJonathan Billings <jsbillings@jsbillings.org>
      cc: Todd DeSantis <atd@us.ibm.com>
      106bc798
    • David Howells's avatar
      afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP · 1da4bd9f
      David Howells authored
      Fix the lookup method on the dynamic root directory such that creation
      calls, such as mkdir, open(O_CREAT), symlink, etc. fail with EOPNOTSUPP
      rather than failing with some odd error (such as EEXIST).
      
      lookup() itself tries to create automount directories when it is invoked.
      These are cached locally in RAM and not committed to storage.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Tested-by: default avatarJonathan Billings <jsbillings@jsbillings.org>
      1da4bd9f
    • David Howells's avatar
      afs: Fix mountpoint parsing · 158d5833
      David Howells authored
      Each AFS mountpoint has strings that define the target to be mounted.  This
      is required to end in a dot that is supposed to be stripped off.  The
      string can include suffixes of ".readonly" or ".backup" - which are
      supposed to come before the terminal dot.  To add to the confusion, the "fs
      lsmount" afs utility does not show the terminal dot when displaying the
      string.
      
      The kernel mount source string parser, however, assumes that the terminal
      dot marks the suffix and that the suffix is always "" and is thus ignored.
      In most cases, there is no suffix and this is not a problem - but if there
      is a suffix, it is lost and this affects the ability to mount the correct
      volume.
      
      The command line mount command, on the other hand, is expected not to
      include a terminal dot - so the problem doesn't arise there.
      
      Fix this by making sure that the dot exists and then stripping it when
      passing the string to the mount configuration.
      
      Fixes: bec5eb61 ("AFS: Implement an autocell mount capability [ver #2]")
      Reported-by: default avatarJonathan Billings <jsbillings@jsbillings.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Tested-by: default avatarJonathan Billings <jsbillings@jsbillings.org>
      158d5833
  4. 10 Dec, 2019 14 commits
  5. 09 Dec, 2019 13 commits