1. 16 12月, 2005 2 次提交
    • K
      [SCSI] Fix st oops with new scsi_execute infrastructure · 787926b1
      Kai Makisara 提交于
      Patch from Kai minus last sg_segs clearing which was merged already.
      
      > > Was there a oops or lockup or any debug output you can send me? I will try
      > > some more large request tests with scsi_debug. You also have to compile your
      > > kernel with SCSI_MAX_PHYS_SEGMENTS == 255 to get larger requests now.
      >
      It was an oops in sgl_unmap_user_pages(). The reason is this:
      
      		/* XXX: just for debug. Remove when PageReserved is removed */
      		BUG_ON(PageReserved(page));
      
      I was using /dev/zero as input and it triggers this. When I used a file as
      input, this did not trigger. Should this BUG_ON be removed?
      
      In the same log I noticed that there was another ->sg_segs inconsistency.
      Also, the field ->last_SRpnt was not reset when scsi_execute_async()
      failed. This caused the error message "Async command already active"
      later and prevented proper close.
      
      While doing the changes, I noticed that the current code (since
      2.6.0-test4) does not set the pages dirty when reading with direct i/o.
      
      All of these st problems (including the one I sent earlier) are fixed in
      the patch at the end of this message. These fixes should probably be
      included already in 2.6.15.
      
      After these fixes, the tape seems to operate as expected. Without other
      changes, the largest block size with sym53c896 SCSI adapter is 384 kB. The
      maximum number of sg segments is set to 96 and clustering is disabled in
      the driver. 96 x 4 kB = 384 kB. OK.
      
      I enabled clustering and set max_sectors to 10000 in the SCSI HBA driver.
      Now the block size limit is 5000 kB as expected.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      787926b1
    • M
      [SCSI] seperate max_sectors from max_hw_sectors · defd94b7
      Mike Christie 提交于
      - export __blk_put_request and blk_execute_rq_nowait
      needed for async REQ_BLOCK_PC requests
      - seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and
      SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was
      already testing against max_sectors and SCSI-ml was setting max_sectors and
      max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only
      prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set
      a valid max_hw_sectors for all LLDs. Today if a LLD does not set it
      SCSI-ml sets it to a safe default and some LLDs set it to a artificial low
      value to overcome memory and feedback issues.
      
      Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024,
      drivers that used to call blk_queue_max_sectors with a large value of
      max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      defd94b7
  2. 15 12月, 2005 9 次提交
  3. 14 12月, 2005 29 次提交