1. 06 Jul, 2010 3 commits
    • Christoph Hellwig's avatar
      writeback: simplify the write back thread queue · 83ba7b07
      Christoph Hellwig authored
      First remove items from work_list as soon as we start working on them.  This
      means we don't have to track any pending or visited state and can get
      rid of all the RCU magic freeing the work items - we can simply free
      them once the operation has finished.  Second use a real completion for
      tracking synchronous requests - if the caller sets the completion pointer
      we complete it, otherwise use it as a boolean indicator that we can free
      the work item directly.  Third unify struct wb_writeback_args and struct
      bdi_work into a single data structure, wb_writeback_work.  Previous we
      set all parameters into a struct wb_writeback_args, copied it into
      struct bdi_work, copied it again on the stack to use it there.  Instead
      of just allocate one structure dynamically or on the stack and use it
      all the way through the stack.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      83ba7b07
    • Christoph Hellwig's avatar
      writeback: split writeback_inodes_wb · edadfb10
      Christoph Hellwig authored
      The case where we have a superblock doesn't require a loop here as we scan
      over all inodes in writeback_sb_inodes. Split it out into a separate helper
      to make the code simpler.  This also allows to get rid of the sb member in
      struct writeback_control, which was rather out of place there.
      
      Also update the comments in writeback_sb_inodes that explain the handling
      of inodes from wrong superblocks.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      edadfb10
    • Christoph Hellwig's avatar
      writeback: remove writeback_inodes_wbc · 9c3a8ee8
      Christoph Hellwig authored
      This was just an odd wrapper around writeback_inodes_wb.  Removing this
      also allows to get rid of the bdi member of struct writeback_control
      which was rather out of place there.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      9c3a8ee8
  2. 01 Jul, 2010 1 commit
  3. 30 Jun, 2010 2 commits
  4. 29 Jun, 2010 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 984bc960
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        block: Don't count_vm_events for discard bio in submit_bio.
        cfq: fix recursive call in cfq_blkiocg_update_completion_stats()
        cfq-iosched: Fixed boot warning with BLK_CGROUP=y and CFQ_GROUP_IOSCHED=n
        cfq: Don't allow queue merges for queues that have no process references
        block: fix DISCARD_BARRIER requests
        cciss: set SCSI max cmd len to 16, as default is wrong
        cpqarray: fix two more wrong section type
        cpqarray: fix wrong __init type on pci probe function
        drbd: Fixed a race between disk-attach and unexpected state changes
        writeback: fix pin_sb_for_writeback
        writeback: add missing requeue_io in writeback_inodes_wb
        writeback: simplify and split bdi_start_writeback
        writeback: simplify wakeup_flusher_threads
        writeback: fix writeback_inodes_wb from writeback_inodes_sb
        writeback: enforce s_umount locking in writeback_inodes_sb
        writeback: queue work on stack in writeback_inodes_sb
        writeback: fix writeback completion notifications
      984bc960
    • npiggin@suse.de's avatar
      fs: fix superblock iteration race · 57439f87
      npiggin@suse.de authored
      list_for_each_entry_safe is not suitable to protect against concurrent
      modification of the list. 6754af64 introduced a race in sb walking.
      
      list_for_each_entry can use the trick of pinning the current entry in
      the list before we drop and retake the lock because it subsequently
      follows cur->next. However list_for_each_entry_safe saves n=cur->next
      for following before entering the loop body, so when the lock is
      dropped, n may be deleted.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Frank Mayhar <fmayhar@google.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57439f87
  5. 28 Jun, 2010 13 commits
  6. 27 Jun, 2010 19 commits