1. 11 Jun, 2010 3 commits
    • Christoph Hellwig's avatar
      writeback: enforce s_umount locking in writeback_inodes_sb · cf37e972
      Christoph Hellwig authored
      Make sure that not only sync_filesystem but all callers of writeback_inodes_sb
      have the superblock protected against remount.  As-is this disables all
      functionality for these callers, but the next patch relies on this locking to
      fix writeback_inodes_sb for sync_filesystem.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      cf37e972
    • Christoph Hellwig's avatar
      writeback: queue work on stack in writeback_inodes_sb · 3c4d7165
      Christoph Hellwig authored
      If we want to rely on s_umount in the caller we need to wait for completion
      of the I/O submission before returning to the caller.  Refactor
      bdi_sync_writeback into a bdi_queue_work_onstack helper and use it for this
      case.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      3c4d7165
    • Christoph Hellwig's avatar
      writeback: fix writeback completion notifications · 7f0e7bed
      Christoph Hellwig authored
      The code dealing with bdi_work->state and completion of a bdi_work is a
      major mess currently.  This patch makes sure we directly use one set of
      flags to deal with it, and use it consistently, which means:
      
       - always notify about completion from the rcu callback.  We only ever
         wait for it from on-stack callers, so this simplification does not
         even cause a theoretical slowdown currently.  It also makes sure we
         don't miss out on the notification if we ever add other callers to
         wait for it.
       - make earlier completion notification depending on the on-stack
         allocation, not the sync mode.  If we introduce new callers that
         want to do WB_SYNC_NONE writeback from on-stack callers this will
         be nessecary.
      
      Also rename bdi_wait_on_work_clear to bdi_wait_on_work_done and inline
      a few small functions into their only caller to make the code
      understandable.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      7f0e7bed
  2. 10 Jun, 2010 12 commits
  3. 09 Jun, 2010 25 commits