1. 27 Mar, 2007 5 commits
    • Mark Fasheh's avatar
      Export __splice_from_pipe() · 40bee44e
      Mark Fasheh authored
      Ocfs2 wants to implement it's own splice write actor so that it can better
      manage cluster / page locks. This lets us re-use the rest of splice write
      while only providing our own code where it's actually important.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      40bee44e
    • Nick Piggin's avatar
      2/2 splice: dont readpage · 08c72591
      Nick Piggin authored
      Splice does not need to readpage to bring the page uptodate before writing
      to it, because prepare_write will take care of that for us.
      
      Splice is also wrong to SetPageUptodate before the page is actually uptodate.
      This results in the old uninitialised memory leak. This gets fixed as a
      matter of course when removing the readpage logic.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      08c72591
    • Nick Piggin's avatar
      1/2 splice: dont steal · 485ddb4b
      Nick Piggin authored
      Stealing pages with splice is problematic because we cannot just insert
      an uptodate page into the pagecache and hope the filesystem can take care
      of it later.
      
      We also cannot just ClearPageUptodate, then hope prepare_write does not
      write anything into the page, because I don't think prepare_write gives
      that guarantee.
      
      Remove support for SPLICE_F_MOVE for now. If we really want to bring it
      back, we might be able to do so with a the new filesystem buffered write
      aops APIs I'm working on. If we really don't want to bring it back, then
      we should decide that sooner rather than later, and remove the flag and
      all the stealing infrastructure before anybody starts using it.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      485ddb4b
    • Thibaut VARENE's avatar
      make elv_register() output atomic · 1ffb96c5
      Thibaut VARENE authored
      Booting 2.6.21-rc3-g45592145 I noticed the following on one of my
      machines in the bootlog:
      
      io scheduler noop registered<6>Time: jiffies clocksource has been installed.
      
      io scheduler deadline registered (default)
      
      Looking at block/elevator.c, it appears that elv_register() uses two
      consecutive printks in a non-atomic way, leading to the above glitch. The
      attached trivial patch fixes this issue, by using a single printk.
      Signed-off-by: default avatarThibaut VARENE <varenet@parisc-linux.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      1ffb96c5
    • Vasily Tarasov's avatar
      block: blk_max_pfn is somtimes wrong · f772b3d9
      Vasily Tarasov authored
      There is a small problem in handling page bounce.
      
      At the moment blk_max_pfn equals max_pfn, which is in fact not maximum
      possible _number_ of a page frame, but the _amount_ of page frames.  For
      example for the 32bit x86 node with 4Gb RAM, max_pfn = 0x100000, but not
      0xFFFF.
      
      request_queue structure has a member q->bounce_pfn and queue needs bounce
      pages for the pages _above_ this limit.  This routine is handled by
      blk_queue_bounce(), where the following check is produced:
      
      	if (q->bounce_pfn >= blk_max_pfn)
      		return;
      
      Assume, that a driver has set q->bounce_pfn to 0xFFFF, but blk_max_pfn
      equals 0x10000.  In such situation the check above fails and for each bio
      we always fall down for iterating over pages tied to the bio.
      
      I want to notice, that for quite a big range of device drivers (ide, md,
      ...) such problem doesn't happen because they use BLK_BOUNCE_ANY for
      bounce_pfn.  BLK_BOUNCE_ANY is defined as blk_max_pfn << PAGE_SHIFT, and
      then the check above doesn't fail.  But for other drivers, which obtain
      reuired value from drivers, it fails.  For example sata_nv uses
      ATA_DMA_MASK or dev->dma_mask.
      
      I propose to use (max_pfn - 1) for blk_max_pfn.  And the same for
      blk_max_low_pfn.  The patch also cleanses some checks related with
      bounce_pfn.
      Signed-off-by: default avatarVasily Tarasov <vtaras@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      f772b3d9
  2. 26 Mar, 2007 35 commits