1. 23 Apr, 2015 6 commits
    • Peng Tao's avatar
      nfs: fix DIO good bytes calculation · 1ccbad9f
      Peng Tao authored
      For direct read that has IO size larger than rsize, we'll split
      it into several READ requests and nfs_direct_good_bytes() would
      count completed bytes incorrectly by eating last zero count reply.
      
      Fix it by handling mirror and non-mirror cases differently such that
      we only count mirrored writes differently.
      
      This fixes 5fadeb47("nfs: count DIO good bytes correctly with mirroring").
      Reported-by: default avatarJean Spector <jean@primarydata.com>
      Cc: <stable@vger.kernel.org> # v3.19+
      Signed-off-by: default avatarPeng Tao <tao.peng@primarydata.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      1ccbad9f
    • Anna Schumaker's avatar
      nfs: Fetch MOUNTED_ON_FILEID when updating an inode · ea96d1ec
      Anna Schumaker authored
      2ef47eb1 (NFS: Fix use of nfs_attr_use_mounted_on_fileid()) was a good
      start to fixing a circular directory structure warning for NFS v4
      "junctioned" mountpoints.  Unfortunately, further testing continued to
      generate this error.
      
      My server is configured like this:
      
      anna@nfsd ~ % df
      Filesystem      Size  Used Avail Use% Mounted on
      /dev/vda1       9.1G  2.0G  6.5G  24% /
      /dev/vdc1      1014M   33M  982M   4% /exports
      /dev/vdc2      1014M   33M  982M   4% /exports/vol1
      /dev/vdc3      1014M   33M  982M   4% /exports/vol1/vol2
      
      anna@nfsd ~ % cat /etc/exports
      /exports/          *(rw,async,no_subtree_check,no_root_squash)
      /exports/vol1/     *(rw,async,no_subtree_check,no_root_squash)
      /exports/vol1/vol2 *(rw,async,no_subtree_check,no_root_squash)
      
      I've been running chown across the entire mountpoint twice in a row to
      hit this problem.  The first run succeeds, but the second one fails with
      the circular directory warning along with:
      
      anna@client ~ % dmesg
      [Apr 3 14:28] NFS: server 192.168.100.204 error: fileid changed
                    fsid 0:39: expected fileid 0x100080, got 0x80
      
      WHere 0x80 is the mountpoint's fileid and 0x100080 is the mounted-on
      fileid.
      
      This patch fixes the issue by requesting an updated mounted-on fileid
      from the server during nfs_update_inode(), and then checking that the
      fileid stored in the nfs_inode matches either the fileid or mounted-on
      fileid returned by the server.
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      ea96d1ec
    • Jeff Layton's avatar
      sunrpc: make debugfs file creation failure non-fatal · 3f940098
      Jeff Layton authored
      v2: gracefully handle the case where some dentry pointers end up NULL
          and be more dilligent about zeroing out dentry pointers
      
      We currently have a problem that SELinux policy is being enforced when
      creating debugfs files. If a debugfs file is created as a side effect of
      doing some syscall, then that creation can fail if the SELinux policy
      for that process prevents it.
      
      This seems wrong. We don't do that for files under /proc, for instance,
      so Bruce has proposed a patch to fix that.
      
      While discussing that patch however, Greg K.H. stated:
      
          "No kernel code should care / fail if a debugfs function fails, so
           please fix up the sunrpc code first."
      
      This patch converts all of the sunrpc debugfs setup code to be void
      return functins, and the callers to not look for errors from those
      functions.
      
      This should allow rpc_clnt and rpc_xprt creation to work, even if the
      kernel fails to create debugfs files for some reason.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatar"J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      3f940098
    • Jeff Layton's avatar
      nfs: fix high load average due to callback thread sleeping · 5d05e54a
      Jeff Layton authored
      Chuck pointed out a problem that crept in with commit 6ffa30d3 (nfs:
      don't call blocking operations while !TASK_RUNNING). Linux counts tasks
      in uninterruptible sleep against the load average, so this caused the
      system's load average to be pinned at at least 1 when there was a
      NFSv4.1+ mount active.
      
      Not a huge problem, but it's probably worth fixing before we get too
      many complaints about it. This patch converts the code back to use
      TASK_INTERRUPTIBLE sleep, simply has it flush any signals on each loop
      iteration. In practice no one should really be signalling this thread at
      all, so I think this is reasonably safe.
      
      With this change, there's also no need to game the hung task watchdog so
      we can also convert the schedule_timeout call back to a normal schedule.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
      Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Fixes: commit 6ffa30d3 (“nfs: don't call blocking . . .”)
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      5d05e54a
    • Anna Schumaker's avatar
      NFS: Reduce time spent holding the i_mutex during fallocate() · f830f7dd
      Anna Schumaker authored
      At the very least, we should not be taking the i_mutex until after
      checking if the server even supports ALLOCATE or DEALLOCATE, allowing
      v4.0 or v4.1 to exit without potentially waiting on a lock.
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      f830f7dd
    • Anna Schumaker's avatar
      NFS: Don't zap caches on fallocate() · 9a51940b
      Anna Schumaker authored
      This patch adds a GETATTR to the end of ALLOCATE and DEALLOCATE
      operations so we can set the updated inode size and change attribute
      directly.  DEALLOCATE will still need to release pagecache pages, so
      nfs42_proc_deallocate() now calls truncate_pagecache_range() before
      contacting the server.
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      9a51940b
  2. 27 Mar, 2015 16 commits
  3. 13 Mar, 2015 2 commits
  4. 12 Mar, 2015 2 commits
  5. 08 Mar, 2015 7 commits
    • Linus Torvalds's avatar
      Linux 4.0-rc3 · 9eccca08
      Linus Torvalds authored
      9eccca08
    • Al Viro's avatar
      sunrpc: fix braino in ->poll() · 1711fd9a
      Al Viro authored
      POLL_OUT isn't what callers of ->poll() are expecting to see; it's
      actually __SI_POLL | 2 and it's a siginfo code, not a poll bitmap
      bit...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      Cc: Bruce Fields <bfields@fieldses.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1711fd9a
    • Linus Torvalds's avatar
      Merge tag 'usb-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1163d504
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here's a round of USB fixes for 4.0-rc3.
      
        Nothing major, the usual gadget, xhci and usb-serial fixes and a few
        new device ids as well.
      
        All have been in linux-next successfully"
      
      * tag 'usb-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (36 commits)
        xhci: Workaround for PME stuck issues in Intel xhci
        xhci: fix reporting of 0-sized URBs in control endpoint
        usb: ftdi_sio: Add jtag quirk support for Cyber Cortex AV boards
        USB: ch341: set tty baud speed according to tty struct
        USB: serial: cp210x: Adding Seletek device id's
        USB: pl2303: disable break on shutdown
        USB: mxuport: fix null deref when used as a console
        USB: serial: clean up bus probe error handling
        USB: serial: fix port attribute-creation race
        USB: serial: fix tty-device error handling at probe
        USB: serial: fix potential use-after-free after failed probe
        USB: console: add dummy __module_get
        USB: ftdi_sio: add PIDs for Actisense USB devices
        Revert "USB: serial: make bulk_out_size a lower limit"
        cdc-acm: Add support for Denso cradle CU-321
        usb-storage: support for more than 8 LUNs
        uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS539
        USB: usbfs: don't leak kernel data in siginfo
        xhci: Clear the host side toggle manually when endpoint is 'soft reset'
        xhci: Allocate correct amount of scratchpad buffers
        ...
      1163d504
    • Linus Torvalds's avatar
      Merge tag 'tty-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · bbbce516
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are some tty and serial driver fixes for 4.0-rc3.
      
        Along with the atime fix that you know about, here are some other
        serial driver bugfixes as well.  Most notable is a wait_until_sent
        bugfix that was traced back to being around since before 2.6.12 that
        Johan has fixed up.
      
        All have been in linux-next successfully"
      
      * tag 'tty-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        TTY: fix tty_wait_until_sent maximum timeout
        TTY: fix tty_wait_until_sent on 64-bit machines
        USB: serial: fix infinite wait_until_sent timeout
        TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation
        net: irda: fix wait_until_sent poll timeout
        serial: uapi: Declare all userspace-visible io types
        serial: core: Fix iotype userspace breakage
        serial: sprd: Fix missing spin_unlock in sprd_handle_irq()
        console: Fix console name size mismatch
        tty: fix up atime/mtime mess, take four
        serial: 8250_dw: Fix get_mctrl behaviour
        serial:8250:8250_pci: delete unneeded quirk entries
        serial:8250:8250_pci: fix redundant entry report for WCH_CH352_2S
        Change email address for 8250_pci
        serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO"
        Revert "tty/serial: of_serial: add DT alias ID handling"
      bbbce516
    • Linus Torvalds's avatar
      Merge tag 'staging-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 47df986b
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are some IIO and staging driver fixes for 4.0-rc3.
      
        Details are in the shortlog, nothing major, mostly IIO fixes for
        reported issues.
      
        All have been in linux-next successfully"
      
      * tag 'staging-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (23 commits)
        staging: comedi: adv_pci1710: fix AI INSN_READ for non-zero channel
        staging: comedi: vmk80xx: remove "firmware version" kernel messages
        staging: comedi: comedi_isadma: fix "stalled" detect in comedi_isadma_disable_on_sample()
        iio: ak8975: fix AK09911 dependencies
        iio: common: ssp_sensors: Protect PM-only functions to kill warning
        IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc
        Revert "iio:humidity:si7020: fix pointer to i2c client"
        iio: light: gp2ap020a00f: Select REGMAP_I2C
        iio: light: jsa1212: Select REGMAP_I2C
        iio: ad5686: fix optional reference voltage declaration
        iio:adc:mcp3422 Fix incorrect scales table
        iio: mxs-lradc: fix iio channel map regression
        iio: imu: adis16400: Fix sign extension
        staging: iio: ad2s1200: Fix sign extension
        iio: mxs-lradc: only update the buffer when its conversions have finished
        iio: mxs-lradc: make ADC reads not unschedule touchscreen conversions
        iio: mxs-lradc: make ADC reads not disable touchscreen interrupts
        iio: mxs-lradc: separate touchscreen and buffer virtual channels
        iio: imu: inv_mpu6050: Prevent dereferencing NULL
        iio: iadc: wait_for_completion_timeout time in jiffies
        ...
      47df986b
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 29191c7f
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are two char/misc fixes for 4.0-rc3.
      
        One is a reported binder driver fix needed due to a change in the mm
        core that happened in 4.0-rc1.  Another is a mei driver fix that
        resolves a reported issue in that driver.
      
        Both have been in linux-next for a while"
      
      * tag 'char-misc-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        mei: make device disabled on stop unconditionally
        android: binder: fix binder mmap failures
      29191c7f
    • Linus Torvalds's avatar
      Merge tag 'cc-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · b0bc6572
      Linus Torvalds authored
      Pull "code of conflict" from Greg KH:
       "This file tries to set the rational basis for our code reviews, gives
        some advice on how to conduct them, and provides an excalation channel
        for any kernel developers if they so desire it"
      
      [ Let's see how this works ]
      
      * tag 'cc-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        Code of Conflict
      b0bc6572
  6. 07 Mar, 2015 7 commits