1. 17 Jan, 2010 5 commits
    • Boaz Harrosh's avatar
      [SCSI] scsi_lib: Fix bug in completion of bidi commands · 63c43b0e
      Boaz Harrosh authored
      Because of the terrible structuring of scsi-bidi-commands
      it breaks some of the life time rules of a scsi-command.
      It is now not allowed to free up the block-request before
      cleanup and partial deallocation of the scsi-command. (Which
      is not so for none bidi commands)
      
      The right fix to this problem would be to make bidi command
      a first citizen by allocating a scsi_sdb pointer at scsi command
      just like cmd->prot_sdb. The bidi sdb should be allocated/deallocated
      as part of the get/put_command (Again like the prot_sdb) and the
      current decoupling of scsi_cmnd and blk-request should be kept.
      
      For now make sure scsi_release_buffers() is called before the
      call to blk_end_request_all() which might cause the suicide of
      the block requests. At best the leak of bidi buffers, at worse
      a crash, as there is a race between the existence of the bidi_request
      and the free of the associated bidi_sdb.
      
      The reason this was never hit before is because only OSD has the potential
      of doing asynchronous bidi commands. (So does bsg but it is never used)
      And OSD clients just happen to do all their bidi commands synchronously, up
      until recently.
      
      CC: Stable Tree <stable@kernel.org>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      63c43b0e
    • Anatolij Gustschin's avatar
      [SCSI] mptsas: Fix issue with chain pools allocation on katmai · f1053a7c
      Anatolij Gustschin authored
      Since commit 9d2e9d66
      mptsas driver fails to allocate memory for the MPT chain buffers
      for second LSI adapter on PPC440SPe Katmai platform:
      ...
      ioc1: LSISAS1068E B3: Capabilities={Initiator}
      mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
      mptbase: ioc1: ERROR - didn't initialize properly! (-3)
      mptsas: probe of 0002:31:00.0 failed with error -3
      
      This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
      doesn't differentiate between SAS and FC causing increased allocation
      for SAS case, too. Later pci_alloc_consistent() fails to allocate
      increased chain buffer pool size for SAS case.
      
      Provide a fix by looking at the bus type and using appropriate
      MPT_SAS_CAN_QUEUE value while calculation of the number of chain
      buffers.
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      Acked-by: default avatarKashyap Desai <kashyap.desai@lsi.com>
      Cc: Stable Tree <stable@kernel.org>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      f1053a7c
    • Penchala Narasimha Reddy Chilakala, ERS-HCLTech's avatar
      [SCSI] aacraid: fix File System going into read-only mode · cacb6dc3
      These particular problems were reported by Cisco and SAP and customers
      as well. Cisco reported on RHEL4 U6 and SAP reported on SLES9 SP4 and
      SLES10 SP2. We added these fixes on RHEL4 U6 and gave a private build
      to IBM and Cisco. Cisco and IBM tested it for more than 15 days and
      they reported that they did not see the issue so far. Before the fix,
      Cisco used to see the issue within 5 days. We generated a patch for
      SLES9 SP4 and SLES10 SP2 and submitted to Novell. Novell applied the
      patch and gave a test build to SAP. SAP tested and reported that the
      build is working properly.
      
      We also tested in our lab using the tools "dishogsync", which is IO
      stress tool and the tool was provided by Cisco.
      
      Issue1:  File System going into read-only mode
      
      Root cause: The driver tends to not free the memory (FIB) when the
      management request exits prematurely. The accumulation of such
      un-freed memory causes the driver to fail to allocate anymore memory
      (FIB) and hence return 0x70000 value to the upper layer, which puts
      the file system into read only mode.
      
      Fix details: The fix makes sure to free the memory (FIB) even if the
      request exits prematurely hence ensuring the driver wouldn't run out
      of memory (FIBs).
      
      
      Issue2: False Raid Alert occurs
      
      When the Physical Drives and Logical drives are reported as deleted or
      added, even though there is no change done on the system
      
      Root cause: Driver IOCTLs is signaled with EINTR while waiting on
      response from the lower layers. Returning "EINTR" will never initiate
      internal retry.
      
      Fix details: The issue was fixed by replacing "EINTR" with
      "ERESTARTSYS" for mid-layer retries.
      Signed-off-by: default avatarPenchala Narasimha Reddy <ServeRAIDDriver@hcl.in>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      cacb6dc3
    • James Bottomley's avatar
      [SCSI] lpfc: fix file permissions · e6622df3
      James Bottomley authored
      lpfc_hbadisc.c and lpfc_hw4.h accidentally got set executable.
      Reported-by: default avatarThomas Backlund <tmb@mandriva.org>
      Cc: James Smart <James.Smart@Emulex.Com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      e6622df3
    • KOSAKI Motohiro's avatar
      page allocator: update NR_FREE_PAGES only when necessary · 6ccf80eb
      KOSAKI Motohiro authored
      commit f2260e6b (page allocator: update NR_FREE_PAGES only as necessary)
      made one minor regression.  if __rmqueue() was failed, NR_FREE_PAGES stat
      go wrong.  this patch fixes it.
      Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
      Reported-by: default avatarHuang Shijie <shijie8@gmail.com>
      Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6ccf80eb
  2. 16 Jan, 2010 35 commits