1. 11 4月, 2006 29 次提交
  2. 08 4月, 2006 6 次提交
  3. 03 4月, 2006 5 次提交
    • J
      [PATCH] splice: fix page stealing LRU handling. · 3e7ee3e7
      Jens Axboe 提交于
      Originally from Nick Piggin, just adapted to the newer branch.
      
      You can't check PageLRU without holding zone->lru_lock.  The page
      release code can get away with it only because the page refcount is 0 at
      that point. Also, you can't reliably remove pages from the LRU unless
      the refcount is 0. Ever.
      Signed-off-by: NNick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NJens Axboe <axboe@suse.de>
      3e7ee3e7
    • J
      [PATCH] splice: page stealing needs to wait_on_page_writeback() · ad8d6f0a
      Jens Axboe 提交于
      Thanks to Andrew for the good explanation of why this is so. akpm writes:
      
      If a page is under writeback and we remove it from pagecache, it's still
      going to get written to disk.  But the VFS no longer knows about that page,
      nor that this page is about to modify disk blocks.
      
      So there might be scenarios in which those
      blocks-which-are-about-to-be-written-to get reused for something else.
      When writeback completes, it'll scribble on those blocks.
      
      This won't happen in ext2/ext3-style filesystems in normal mode because the
      page has buffers and try_to_release_page() will fail.
      
      But ext2 in nobh mode doesn't attach buffers at all - it just sticks the
      page in a BIO, finds some new blocks, points the BIO at those blocks and
      lets it rip.
      
      While that write IO's in flight, someone could truncate the file.  Truncate
      won't block on the writeout because the page isn't in pagecache any more.
      So truncate will the free the blocks from the file under the page's feet.
      Then something else can reallocate those blocks.  Then write data to them.
      
      Now, the original write completes, corrupting the filesystem.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      ad8d6f0a
    • J
      [PATCH] splice: export generic_splice_sendpage · 059a8f37
      Jens Axboe 提交于
      Forgot that one, thanks Jeff. Also move the other EXPORT_SYMBOL
      to right below the functions.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      059a8f37
    • J
      [PATCH] splice: add a SPLICE_F_MORE flag · b2b39fa4
      Jens Axboe 提交于
      This lets userspace indicate whether more data will be coming in a
      subsequent splice call.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      b2b39fa4
    • J
      [PATCH] splice: add comments documenting more of the code · 83f9135b
      Jens Axboe 提交于
      Hopefully this will make Andrew a little more happy.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      83f9135b