]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'v3.1-rc10' into for-3.2/core
authorJens Axboe <axboe@kernel.dk>
Wed, 19 Oct 2011 12:30:42 +0000 (14:30 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Oct 2011 12:30:42 +0000 (14:30 +0200)
Conflicts:
block/blk-core.c
include/linux/blkdev.h

Signed-off-by: Jens Axboe <axboe@kernel.dk>
1  2 
block/blk-core.c
block/blk-sysfs.c
drivers/block/loop.c
drivers/md/md.c
drivers/md/md.h
drivers/md/multipath.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
include/linux/blkdev.h

index 97e9e5405b837d911cbe3c6d916c968587a652ea,d34433ae791781b5799edfa838f058922443e78d..79e41a76d96a7a9f2b475ba80de85628f6bd5f13
@@@ -1235,8 -1240,8 +1238,8 @@@ void blk_queue_bio(struct request_queu
         * Check if we can merge with the plugged list before grabbing
         * any locks.
         */
-       if (attempt_plug_merge(current, q, bio))
+       if (attempt_plug_merge(current, q, bio, &request_count))
 -              goto out;
 +              return;
  
        spin_lock_irq(q->queue_lock);
  
Simple merge
Simple merge
diff --cc drivers/md/md.c
Simple merge
diff --cc drivers/md/md.h
Simple merge
Simple merge
index 97f2a5f977b16c241b6cd5c1f6d7874c8bef5b42,d9587dffe533e69c81b6adf5221ee1da745cfa4b..d4ddfa62730147d7276d85fdf1e5e61441cdf1b9
@@@ -1117,8 -1116,15 +1116,13 @@@ read_again
                goto retry_write;
        }
  
+       r1_bio_write_done(r1_bio);
+       /* In case raid1d snuck in to freeze_array */
+       wake_up(&conf->wait_barrier);
        if (do_sync || !bitmap || !plugged)
                md_wakeup_thread(mddev->thread);
 -
 -      return 0;
  }
  
  static void status(struct seq_file *seq, mddev_t *mddev)
Simple merge
Simple merge
index 1978655faa3b7c2961a9001bc030d3b294fda1b8,7fbaa9103344a261082afd872127f736abdcd56f..0b68044e7abbb2e0a4f7c963cf76020a9968eb19
@@@ -860,23 -863,16 +865,22 @@@ struct request_queue *blk_alloc_queue_n
  extern void blk_put_queue(struct request_queue *);
  
  /*
 - * Note: Code in between changing the blk_plug list/cb_list or element of such
 - * lists is preemptable, but such code can't do sleep (or be very careful),
 - * otherwise data is corrupted. For details, please check schedule() where
 - * blk_schedule_flush_plug() is called.
 + * blk_plug permits building a queue of related requests by holding the I/O
 + * fragments for a short period. This allows merging of sequential requests
 + * into single larger request. As the requests are moved from a per-task list to
 + * the device's request_queue in a batch, this results in improved scalability
 + * as the lock contention for request_queue lock is reduced.
 + *
 + * It is ok not to disable preemption when adding the request to the plug list
 + * or when attempting a merge, because blk_schedule_flush_list() will only flush
 + * the plug list when the task sleeps by itself. For details, please see
 + * schedule() where blk_schedule_flush_plug() is called.
   */
  struct blk_plug {
 -      unsigned long magic;
 -      struct list_head list;
 -      struct list_head cb_list;
 -      unsigned int should_sort;
 +      unsigned long magic; /* detect uninitialized use-cases */
 +      struct list_head list; /* requests */
 +      struct list_head cb_list; /* md requires an unplug callback */
 +      unsigned int should_sort; /* list to be sorted before flushing? */
-       unsigned int count; /* number of queued requests */
  };
  #define BLK_MAX_REQUEST_COUNT 16