1. 18 Feb, 2009 9 commits
    • Neil Brown's avatar
      block: fix booting from partitioned md array · 41b8c853
      Neil Brown authored
      Hi Tejun,
      
       it looks like your commit:
      
         block: don't depend on consecutive minor space
         f331c029
      
       broke a particular case for booting from partitioned md/raid devices.
       That is the second time this has been broken recently.  The previous
       time was fixed by
      
         block: do_mounts - accept root=<non-existant partition>
         30f2f0eb
      
       Because the data isn't available when an md device is first created
       (we add disks and set it up after creation), the initial partition
       scan finds nothing.  It is not until the device is opened that
       another partition scan happens and finds something.
      
       So at the point where the kernel parameter "root=/dev/md_d0p1" is
       being parsed, md_d0 exists, but md_d0p1 does not.
       However if we let blk_lookup_devt return the correct device number
       even though the device doesn't exist, then the attempt to mount it
       will successfully find the partition.
      
       I have tried in the past to find a way to get the partition table to
       be read as soon as the array is assembled but that proved impossible
       (at the time).  I don't remember the details, and could possibly
       revisit it.  However it would be really nice if blk_lookup_devt
       could be adjusted to again accept non existant partitions.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      41b8c853
    • Jens Axboe's avatar
      block: revert part of 18ce3751 · 78f707bf
      Jens Axboe authored
      The above commit added WRITE_SYNC and switched various places to using
      that for committing writes that will be waited upon immediately after
      submission. However, this causes a performance regression with AS and CFQ
      for ext3 at least, since sync_dirty_buffer() will submit some writes with
      WRITE_SYNC while ext3 has sumitted others dependent writes without the sync
      flag set. This causes excessive anticipation/idling in the IO scheduler
      because sync and async writes get interleaved, causing a big performance
      regression for the below test case (which is meant to simulate sqlite
      like behaviour).
      
      ---- test case ----
      
      int main(int argc, char **argv)
      {
      
      	int fdes, i;
      	FILE *fp;
      	struct timeval start;
      	struct timeval end;
      	struct timeval res;
      
      	gettimeofday(&start, NULL);
      	for (i=0; i<ROWS; i++) {
      		fp = fopen("test_file", "a");
      		fprintf(fp, "Some Text Data\n");
      		fdes = fileno(fp);
      		fsync(fdes);
      		fclose(fp);
      	}
      	gettimeofday(&end, NULL);
      
      	timersub(&end, &start, &res);
      	fprintf(stdout, "time to write %d lines is %ld(msec)\n", ROWS,
      			(res.tv_sec*1000000 + res.tv_usec)/1000);
      
      	return 0;
      }
      
      -------------------
      
      Thanks to Sean.White@APCC.com for tracking down this performance
      regression and providing a test case.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      78f707bf
    • Chip Coldwell's avatar
      cciss: PCI power management reset for kexec · 82eb03cf
      Chip Coldwell authored
      The kexec kernel resets the CCISS hardware in three steps:
      
      1. Use PCI power management states to reset the controller in the
         kexec kernel.
      
      2. Clear the MSI/MSI-X bits in PCI configuration space so that MSI
         initialization in the kexec kernel doesn't fail.
      
      3. Use the CCISS "No-op" message to determine when the controller
         firmware has recovered from the PCI PM reset.
      
      [akpm@linux-foundation.org: cleanups]
      Signed-off-by: default avatarMike Miller <mike.miller@hp.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      82eb03cf
    • Roel Kluin's avatar
      paride/pg.c: xs(): &&/|| confusion · c8cbec6b
      Roel Kluin authored
      &&/|| confusion
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      c8cbec6b
    • Subhash Peddamallu's avatar
      fs/bio: bio_alloc_bioset: pass right object ptr to mempool_free · a60e78e5
      Subhash Peddamallu authored
      When freeing from bio pool use right ptr to account for bs->front_pad,
      instead of bio ptr,
      Signed-off-by: default avatarSubhash Peddamallu <subhash.peddamallu@gmail.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      a60e78e5
    • Jens Axboe's avatar
      block: fix bad definition of BIO_RW_SYNC · 93dbb393
      Jens Axboe authored
      We can't OR shift values, so get rid of BIO_RW_SYNC and use BIO_RW_SYNCIO
      and BIO_RW_UNPLUG explicitly. This brings back the behaviour from before
      213d9417.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      93dbb393
    • Boaz Harrosh's avatar
      bsg: Fix sense buffer bug in SG_IO · c1c20120
      Boaz Harrosh authored
      When submitting requests via SG_IO, which does a sync io, a
      bsg_command is not allocated. So an in-Kernel sense_buffer was not
      set. However when calling blk_execute_rq() with no sense buffer
      one is provided from the stack. Now bsg at blk_complete_sgv4_hdr_rq()
      would check if rq->sense_len and a sense was requested by sg_io_v4
      the rq->sense was copy_user() back, but by now it is already mangled
      stack memory.
      
      I have fixed that by forcing a sense_buffer when calling bsg_map_hdr().
      The bsg_command->sense is provided in the write/read path like before,
      and on-the-stack buffer is provided when doing SG_IO.
      
      I have also fixed a dprintk message to print rq->errors in hex because
      of the scsi bit-field use of this member. For other block devices it
      does not matter anyway.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Acked-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      c1c20120
    • Zlatko Calusic's avatar
    • Rafael J. Wysocki's avatar
      USB/PCI: Fix resume breakage of controllers behind cardbus bridges · 3494252d
      Rafael J. Wysocki authored
      If a USB PCI controller is behind a cardbus bridge, we are trying to
      restore its configuration registers too early, before the cardbus
      bridge is operational.  To fix this, call pci_restore_state() from
      usb_hcd_pci_resume() and remove usb_hcd_pci_resume_early() which is
      no longer necessary (the configuration spaces of USB controllers that
      are not behind cardbus bridges will be restored by the PCI PM core
      with interrupts disabled anyway).
      
      This patch fixes the regression from 2.6.28 tracked as
      http://bugzilla.kernel.org/show_bug.cgi?id=12659
      
      [ Side note: the proper long-term fix is probably to just force the
        unplug event at suspend time instead of doing a plug/unplug at resume
        time, but this patch is fine regardless  - Linus ]
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reported-by: default avatarMiles Lane <miles.lane@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3494252d
  2. 17 Feb, 2009 31 commits