1. 24 4月, 2015 5 次提交
    • P
      nfs: fix DIO good bytes calculation · 1ccbad9f
      Peng Tao 提交于
      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: NJean Spector <jean@primarydata.com>
      Cc: <stable@vger.kernel.org> # v3.19+
      Signed-off-by: NPeng Tao <tao.peng@primarydata.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      1ccbad9f
    • A
      nfs: Fetch MOUNTED_ON_FILEID when updating an inode · ea96d1ec
      Anna Schumaker 提交于
      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: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      ea96d1ec
    • J
      nfs: fix high load average due to callback thread sleeping · 5d05e54a
      Jeff Layton 提交于
      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: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Tested-by: NChuck Lever <chuck.lever@oracle.com>
      Fixes: commit 6ffa30d3 (“nfs: don't call blocking . . .”)
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      5d05e54a
    • A
      NFS: Reduce time spent holding the i_mutex during fallocate() · f830f7dd
      Anna Schumaker 提交于
      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: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      f830f7dd
    • A
      NFS: Don't zap caches on fallocate() · 9a51940b
      Anna Schumaker 提交于
      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: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      9a51940b
  2. 28 3月, 2015 16 次提交
  3. 13 3月, 2015 2 次提交
  4. 04 3月, 2015 4 次提交
  5. 03 3月, 2015 5 次提交
  6. 02 3月, 2015 8 次提交