1. 12 3月, 2009 5 次提交
    • N
      NFS: flush cached directory information slightly more readily. · 37d9d76d
      NeilBrown 提交于
      If cached directory contents becomes incorrect, there is no way to
      flush the contents.  This contrasts with files where file locking is
      the recommended way to ensure cache consistency between multiple
      applications (a read-lock always flushes the cache).
      
      Also while changes to files often change the size of the file (thus
      triggering a cache flush), changes to directories often do not change
      the apparent size (as the size is often rounded to a block size).
      
      So it is particularly important with directories to avoid the
      possibility of an incorrect cache wherever possible.
      
      When the link count on a directory changes it implies a change in the
      number of child directories, and so a change in the contents of this
      directory.  So use that as a trigger to flush cached contents.
      
      When the ctime changes but the mtime does not, there are two possible
      reasons.
       1/ The owner/mode information has been changed.
       2/ utimes has been used to set the mtime backwards.
      
      In the first case, a data-cache flush is not required.
      In the second case it is.
      
      So on the basis that correctness trumps performance, flush the
      directory contents cache in this case also.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      37d9d76d
    • S
      NFS: Minor __nfs_revalidate_inode cleanup · 2b57dc6c
      Suresh Jayaraman 提交于
      Remove redundant NFS_STALE() check, a leftover due to the commit
      691beb13Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2b57dc6c
    • C
      SUNRPC: Avoid spurious wake-up during UDP connect processing · fe315e76
      Chuck Lever 提交于
      To clear out old state, the UDP connect workers unconditionally invoke
      xs_close() before proceeding with a new connect.  Nowadays this causes
      a spurious wake-up of the task waiting for the connect to complete.
      
      This is a little racey, but usually harmless.  The waiting task
      immediately retries the connect via a call_bind/call_connect sequence,
      which usually finds the transport already in the connected state
      because the connect worker has finished in the background.
      
      To avoid a spurious wake-up, factor the xs_close() logic that resets
      the underlying socket into a helper, and have the UDP connect workers
      call that helper instead of xs_close().
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fe315e76
    • T
      SUNRPC: xprt_connect() don't abort the task if the transport isn't bound · 01d37c42
      Trond Myklebust 提交于
      If the transport isn't bound, then we should just return ENOTCONN, letting
      call_connect_status() and/or call_status() deal with retrying. Currently,
      we appear to abort all pending tasks with an EIO error.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      01d37c42
    • T
      SUNRPC: Fix an Oops due to socket not set up yet... · fba91afb
      Trond Myklebust 提交于
      We can Oops in both xs_udp_send_request() and xs_tcp_send_request() if the
      call to xs_sendpages() returns an error due to the socket not yet being
      set up.
      Deal with that situation by returning a new error: ENOTSOCK, so that we
      know to avoid dereferencing transport->sock.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fba91afb
  2. 11 3月, 2009 25 次提交
  3. 10 3月, 2009 10 次提交
新手
引导
客服 返回
顶部