1. 06 Dec, 2006 8 commits
    • Trond Myklebust's avatar
      NFS: Fix nfs_sync_inode_wait(FLUSH_INVALIDATE) · e8e058e8
      Trond Myklebust authored
      Currently nfs_sync_inode_wait() will fail to loop correctly when we call
      nfs_sync_inode_wait with the FLUSH_INVALIDATE argument.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      e8e058e8
    • Trond Myklebust's avatar
    • Trond Myklebust's avatar
      NFS: Fix asynchronous read error handling · 0b671301
      Trond Myklebust authored
      We must always call ->read_done() before we truncate the page data, or
      decide to flag an error. The reasons are that
      	in NFSv2, ->read_done() is where the eof flag gets set.
      	in NFSv3/v4 ->read_done() handles EJUKEBOX-type errors, and
      		  v4 state recovery.
      
      However, we need to mark the pages as uptodate before we deal with short
      read errors, since we may need to modify the nfs_read_data arguments.
      
      We therefore split the current nfs_readpage_result() into two parts:
      nfs_readpage_result(), which calls ->read_done() etc, and
      nfs_readpage_retry(), which subsequently handles short reads.
      
      Note: Removing the code that retries in case of a short read also fixes a
      bug in nfs_direct_read_result(), which used to return a corrupted number of
      bytes.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      0b671301
    • Andy Ryan's avatar
      NFS Exclusive open not supported bug · 46b9f8e1
      Andy Ryan authored
      When trying to open a file with the O_EXCL flag over NFS on a server that does
      not support exclusive mode, the file does not open.  The reason,
      rpc_call_sync returns a errno number, and not the nfs error number.  I fixed
      it by changing the status check in nfs3proc.c.  Either this is how it should
      be fixed, or rpc_call_sync should be fixed to return the NFS error.
      Signed-off-by: default avatarAndy Ryan <genanr@allantgroup.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      46b9f8e1
    • Trond Myklebust's avatar
      SUNRPC: Fix a potential race in rpc_wake_up_task() · 8aca67f0
      Trond Myklebust authored
      Use RCU to ensure that we can safely call rpc_finish_wakeup after we've
      called __rpc_do_wake_up_task. If not, there is a theoretical race, in which
      the rpc_task finishes executing, and gets freed first.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      8aca67f0
    • Trond Myklebust's avatar
      e6b3c4db
    • Christophe Saout's avatar
      Subject: Re: [PATCH] Fix SUNRPC wakeup/execute race condition · cc4dc59e
      Christophe Saout authored
      The sunrpc scheduler contains a race condition that can let an RPC
      task end up being neither running nor on any wait queue. The race takes
      place between rpc_make_runnable (called from rpc_wake_up_task) and
      __rpc_execute under the following condition:
      
      First __rpc_execute calls tk_action which puts the task on some wait
      queue. The task is dequeued by another process before __rpc_execute
      continues its execution. While executing rpc_make_runnable exactly after
      setting the task `running' bit and before clearing the `queued' bit
      __rpc_execute picks up execution, clears `running' and subsequently
      both functions fall through, both under the false assumption somebody
      else took the job.
      
      Swapping rpc_test_and_set_running with rpc_clear_queued in
      rpc_make_runnable fixes that hole. This introduces another possible
      race condition that can be handled by checking for `queued' after
      setting the `running' bit.
      
      Bug noticed on a 4-way x86_64 system under XEN with an NFSv4 server
      on the same physical machine, apparently one of the few ways to hit
      this race condition at all.
      
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: J. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: default avatarChristophe Saout <christophe@saout.de>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
      cc4dc59e
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · ec0bf39a
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (73 commits)
        [SCSI] aic79xx: Add ASC-29320LPE ids to driver
        [SCSI] stex: version update
        [SCSI] stex: change wait loop code
        [SCSI] stex: add new device type support
        [SCSI] stex: update device id info
        [SCSI] stex: adjust default queue length
        [SCSI] stex: add value check in hard reset routine
        [SCSI] stex: fix controller_info command handling
        [SCSI] stex: fix biosparam calculation
        [SCSI] megaraid: fix MMIO casts
        [SCSI] tgt: fix undefined flush_dcache_page() problem
        [SCSI] libsas: better error handling in sas_expander.c
        [SCSI] lpfc 8.1.11 : Change version number to 8.1.11
        [SCSI] lpfc 8.1.11 : Misc Fixes
        [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable
        [SCSI] lpfc 8.1.11 : Removed decoding of PCI Subsystem Id
        [SCSI] lpfc 8.1.11 : Add MSI (Message Signalled Interrupts) support
        [SCSI] lpfc 8.1.11 : Adjust LOG_FCP logging
        [SCSI] lpfc 8.1.11 : Fix Memory leaks
        [SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_support
        ...
      ec0bf39a
  2. 05 Dec, 2006 32 commits