1. 08 Jan, 2003 5 commits
    • Andrew Morton's avatar
      [PATCH] bio dirtying infrastructure · 511d2652
      Andrew Morton authored
      In two cases (AIO-for-direct-IO and some CDROM DMA stuff which Jens
      did), we need to run set_page_dirty() in interrupt context.  After DMA
      hardware has altered userspace pages for direct-IO reads.
      
      But mapping->page_lock, mapping->private_lock and inode_lock are not
      irq-safe.  And really, we don't want to convert those locks just for this
      problem.
      
      So what we do is to dirty the pages *before* starting I/O.  Then, in
      interrupt completion context, check to see that they are still dirty.
      If so then there is nothing to do.  But if the pages were cleaned while
      the direct-IO is in progress we need to redirty them.  The code uses
      schedule_work() for that.
      
      Of course, we could use schedule_work() for all BIOs and pages.  The
      speculative dirty-before-starting-IO is just an optimisation.  It's
      quite unlikely that any of the pages will be cleaned during the direct
      IO.
      
      
      This code is basically untestable under normal circumstances, because the
      relevant pages are pinned via get_user_pages().  This makes
      is_page_cache_freeable() evaluate false and the VM doesn't try to write them
      out anyway.  But if the pages happen to be MAP_SHARED file pages, pdflush
      could clean them.  The way I tested this code was to disable the call to
      bio_set_pages_dirty() in fs/direct-io.c.
      511d2652
    • Andrew Morton's avatar
      [PATCH] AIO support for raw/O_DIRECT · 08e6749e
      Andrew Morton authored
      Patch from Badari Pulavarty <pbadari@us.ibm.com> and myself
      
      This patch adds the infrastructure for performing asynchronous (AIO) blockdev
      direct-IO.
      
      - Adds generic_file_aio_write_nolock() and make other
        generic_file_*_write() to use it.
      
      - Modify generic_file_direct_IO() and ->direct_IO() functions to take
        "kiocb *" instead of "file *".
      
      - Renames generic_direct_IO() to blockdev_direct_IO().
      
      - Move generic_file_direct_IO() to mm/filemap.c (it is not
        blockdev-specific, whereas the rest of fs/direct-io.c is).
      
      - Add AIO read/write support to the raw driver.
      08e6749e
    • Andrew Morton's avatar
      [PATCH] return the correct thing from direct-io · a6d61b6b
      Andrew Morton authored
      If direct-io encounters an error, it currently returns that error even if it
      performed some I/O.
      
      Change it so that if there is an error and we read or wrote something, return
      the number of bytes written/read.  Only return the error code if zero bytes
      were written/read.
      a6d61b6b
    • Andrew Morton's avatar
      [PATCH] AIO exit fix · 90c4bb05
      Andrew Morton authored
      We need to run exit_aio() when the final user of the mm goes away, else lots
      of things leak.
      
      Also remove a printk which comes out when this change is made.
      
      This patch was acked by bcrl.
      90c4bb05
    • Adrian Bunk's avatar
      [PATCH] remove code for 2.0 kernels from drivers/char/ftape/* · bebaf4f0
      Adrian Bunk authored
      The patch below is large but trivial:
      
      It removes old #if'd compatiblity code for 2.0 kernels from
      drivers/char/ftape/* (this includes the removal of two header files
      including only compatibility code and the #include's of these files).
      bebaf4f0
  2. 07 Jan, 2003 34 commits
  3. 06 Jan, 2003 1 commit