1. 27 9月, 2014 1 次提交
  2. 08 8月, 2014 1 次提交
  3. 28 6月, 2014 1 次提交
  4. 27 6月, 2014 1 次提交
    • A
      Fix 32-bit regression in block device read(2) · 0b86dbf6
      Al Viro 提交于
      blkdev_read_iter() wants to cap the iov_iter by the amount of data
      remaining to the end of device.  That's what iov_iter_truncate() is for
      (trim iter->count if it's above the given limit).  So far, so good, but
      the argument of iov_iter_truncate() is size_t, so on 32bit boxen (in
      case of a large device) we end up with that upper limit truncated down
      to 32 bits *before* comparing it with iter->count.
      
      Easily fixed by making iov_iter_truncate() take 64bit argument - it does
      the right thing after such change (we only reach the assignment in there
      when the current value of iter->count is greater than the limit, i.e.
      for anything that would get truncated we don't reach the assignment at
      all) and that argument is not the new value of iter->count - it's an
      upper limit for such.
      
      The overhead of passing u64 is not an issue - the thing is inlined, so
      callers passing size_t won't pay any penalty.
      Reported-and-tested-by: NTheodore Tso <tytso@mit.edu>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Tested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Tested-by: NBruno Wolff III <bruno@wolff.to>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b86dbf6
  5. 07 5月, 2014 10 次提交
    • A
      bio_vec-backed iov_iter · 62a8067a
      Al Viro 提交于
      New variant of iov_iter - ITER_BVEC in iter->type, backed with
      bio_vec array instead of iovec one.  Primitives taught to deal
      with such beasts, __swap_write() switched to using that kind
      of iov_iter.
      
      Note that bio_vec is just a <page, offset, length> triple - there's
      nothing block-specific about it.  I've left the definition where it
      was, but took it from under ifdef CONFIG_BLOCK.
      
      Next target: ->splice_write()...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      62a8067a
    • A
      lustre: get rid of messing with iovecs · b42b15fd
      Al Viro 提交于
      * switch to ->read_iter/->write_iter
      * keep a pointer to iov_iter instead of iov/nr_segs
      * do not modify iovecs; use iov_iter_truncate()/iov_iter_advance() and
      a new primitive - iov_iter_reexpand() (expand previously truncated
      iterator) istead.
      * (racy) check for lustre VMAs intersecting with iovecs kept for now as
      for_each_iov() loop.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b42b15fd
    • A
      new helper: copy_page_from_iter() · f0d1bec9
      Al Viro 提交于
      parallel to copy_page_to_iter().  pipe_write() switched to it (and became
      ->write_iter()).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f0d1bec9
    • A
      iov_iter_truncate() · 0c949334
      Al Viro 提交于
      Now It Can Be Done(tm) - we don't need to do iov_shorten() in
      generic_file_direct_write() anymore, now that all ->direct_IO()
      instances are converted to proper iov_iter methods and honour
      iter->count and iter->iov_offset properly.
      
      Get rid of count/ocount arguments of generic_file_direct_write(),
      while we are at it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0c949334
    • A
      new helper: iov_iter_get_pages_alloc() · 91f79c43
      Al Viro 提交于
      same as iov_iter_get_pages(), except that pages array is allocated
      (kmalloc if possible, vmalloc if that fails) and left for caller to
      free.  Lustre and NFS ->direct_IO() switched to it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      91f79c43
    • A
      new helper: iov_iter_npages() · f67da30c
      Al Viro 提交于
      counts the pages covered by iov_iter, up to given limit.
      do_block_direct_io() and fuse_iter_npages() switched to
      it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f67da30c
    • A
      new helper: iov_iter_get_pages() · 7b2c99d1
      Al Viro 提交于
      iov_iter_get_pages(iter, pages, maxsize, &start) grabs references pinning
      the pages of up to maxsize of (contiguous) data from iter.  Returns the
      amount of memory grabbed or -error.  In case of success, the requested
      area begins at offset start in pages[0] and runs through pages[1], etc.
      Less than requested amount might be returned - either because the contiguous
      area in the beginning of iterator is smaller than requested, or because
      the kernel failed to pin that many pages.
      
      direct-io.c switched to using iov_iter_get_pages()
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7b2c99d1
    • A
      start adding the tag to iov_iter · 71d8e532
      Al Viro 提交于
      For now, just use the same thing we pass to ->direct_IO() - it's all
      iovec-based at the moment.  Pass it explicitly to iov_iter_init() and
      account for kvec vs. iovec in there, by the same kludge NFS ->direct_IO()
      uses.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      71d8e532
    • A
      new primitive: iov_iter_alignment() · 886a3911
      Al Viro 提交于
      returns the value aligned as badly as the worst remaining segment
      in iov_iter is.  Use instead of open-coded equivalents.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      886a3911
    • A
      kill iov_iter_copy_from_user() · e7c24607
      Al Viro 提交于
      all callers can use copy_page_from_iter() and it actually simplifies
      them.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e7c24607
  6. 02 4月, 2014 2 次提交
  7. 20 5月, 2013 1 次提交
  8. 13 10月, 2012 1 次提交
  9. 30 7月, 2009 1 次提交
  10. 17 7月, 2007 1 次提交
  11. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4