提交 aceb91cd 编写于 作者: L Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  cdrom: support devices that have check_events but not media_changed
  cfq-iosched: Don't wait if queue already has requests.
  blkio-throttle: Avoid calling blkiocg_lookup_group() for root group
  cfq: rename a function to give it more appropriate name
  cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily.
  drivers/block/aoe/Makefile: replace the use of <module>-objs with <module>-y
  loop: queue_lock NULL pointer derefence in blk_throtl_exit
  drivers/block/Makefile: replace the use of <module>-objs with <module>-y
  blktrace: Don't output messages if NOTIFY isn't set.
...@@ -168,6 +168,14 @@ static struct throtl_grp * throtl_find_alloc_tg(struct throtl_data *td, ...@@ -168,6 +168,14 @@ static struct throtl_grp * throtl_find_alloc_tg(struct throtl_data *td,
* tree of blkg (instead of traversing through hash list all * tree of blkg (instead of traversing through hash list all
* the time. * the time.
*/ */
/*
* This is the common case when there are no blkio cgroups.
* Avoid lookup in this case
*/
if (blkcg == &blkio_root_cgroup)
tg = &td->root_tg;
else
tg = tg_of_blkg(blkiocg_lookup_group(blkcg, key)); tg = tg_of_blkg(blkiocg_lookup_group(blkcg, key));
/* Fill in device details for root group */ /* Fill in device details for root group */
......
...@@ -599,7 +599,7 @@ cfq_group_slice(struct cfq_data *cfqd, struct cfq_group *cfqg) ...@@ -599,7 +599,7 @@ cfq_group_slice(struct cfq_data *cfqd, struct cfq_group *cfqg)
} }
static inline unsigned static inline unsigned
cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) cfq_scaled_cfqq_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{ {
unsigned slice = cfq_prio_to_slice(cfqd, cfqq); unsigned slice = cfq_prio_to_slice(cfqd, cfqq);
if (cfqd->cfq_latency) { if (cfqd->cfq_latency) {
...@@ -631,7 +631,7 @@ cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) ...@@ -631,7 +631,7 @@ cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
static inline void static inline void
cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{ {
unsigned slice = cfq_scaled_group_slice(cfqd, cfqq); unsigned slice = cfq_scaled_cfqq_slice(cfqd, cfqq);
cfqq->slice_start = jiffies; cfqq->slice_start = jiffies;
cfqq->slice_end = jiffies + slice; cfqq->slice_end = jiffies + slice;
...@@ -1671,7 +1671,7 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq, ...@@ -1671,7 +1671,7 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
*/ */
if (timed_out) { if (timed_out) {
if (cfq_cfqq_slice_new(cfqq)) if (cfq_cfqq_slice_new(cfqq))
cfqq->slice_resid = cfq_scaled_group_slice(cfqd, cfqq); cfqq->slice_resid = cfq_scaled_cfqq_slice(cfqd, cfqq);
else else
cfqq->slice_resid = cfqq->slice_end - jiffies; cfqq->slice_resid = cfqq->slice_end - jiffies;
cfq_log_cfqq(cfqd, cfqq, "resid=%ld", cfqq->slice_resid); cfq_log_cfqq(cfqd, cfqq, "resid=%ld", cfqq->slice_resid);
...@@ -3432,6 +3432,10 @@ static bool cfq_should_wait_busy(struct cfq_data *cfqd, struct cfq_queue *cfqq) ...@@ -3432,6 +3432,10 @@ static bool cfq_should_wait_busy(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{ {
struct cfq_io_context *cic = cfqd->active_cic; struct cfq_io_context *cic = cfqd->active_cic;
/* If the queue already has requests, don't wait */
if (!RB_EMPTY_ROOT(&cfqq->sort_list))
return false;
/* If there are other queues in the group, don't wait */ /* If there are other queues in the group, don't wait */
if (cfqq->cfqg->nr_cfqq > 1) if (cfqq->cfqg->nr_cfqq > 1)
return false; return false;
......
...@@ -39,4 +39,4 @@ obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o ...@@ -39,4 +39,4 @@ obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o
obj-$(CONFIG_BLK_DEV_DRBD) += drbd/ obj-$(CONFIG_BLK_DEV_DRBD) += drbd/
obj-$(CONFIG_BLK_DEV_RBD) += rbd.o obj-$(CONFIG_BLK_DEV_RBD) += rbd.o
swim_mod-objs := swim.o swim_asm.o swim_mod-y := swim.o swim_asm.o
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
# #
obj-$(CONFIG_ATA_OVER_ETH) += aoe.o obj-$(CONFIG_ATA_OVER_ETH) += aoe.o
aoe-objs := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o aoe-y := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o
...@@ -2833,7 +2833,7 @@ static int cciss_revalidate(struct gendisk *disk) ...@@ -2833,7 +2833,7 @@ static int cciss_revalidate(struct gendisk *disk)
sector_t total_size; sector_t total_size;
InquiryData_struct *inq_buff = NULL; InquiryData_struct *inq_buff = NULL;
for (logvol = 0; logvol < CISS_MAX_LUN; logvol++) { for (logvol = 0; logvol <= h->highest_lun; logvol++) {
if (!h->drv[logvol]) if (!h->drv[logvol])
continue; continue;
if (memcmp(h->drv[logvol]->LunID, drv->LunID, if (memcmp(h->drv[logvol]->LunID, drv->LunID,
......
...@@ -1641,6 +1641,9 @@ static struct loop_device *loop_alloc(int i) ...@@ -1641,6 +1641,9 @@ static struct loop_device *loop_alloc(int i)
static void loop_free(struct loop_device *lo) static void loop_free(struct loop_device *lo)
{ {
if (!lo->lo_queue->queue_lock)
lo->lo_queue->queue_lock = &lo->lo_queue->__queue_lock;
blk_cleanup_queue(lo->lo_queue); blk_cleanup_queue(lo->lo_queue);
put_disk(lo->lo_disk); put_disk(lo->lo_disk);
list_del(&lo->lo_list); list_del(&lo->lo_list);
......
...@@ -409,7 +409,8 @@ int register_cdrom(struct cdrom_device_info *cdi) ...@@ -409,7 +409,8 @@ int register_cdrom(struct cdrom_device_info *cdi)
} }
ENSURE(drive_status, CDC_DRIVE_STATUS ); ENSURE(drive_status, CDC_DRIVE_STATUS );
ENSURE(media_changed, CDC_MEDIA_CHANGED); if (cdo->check_events == NULL && cdo->media_changed == NULL)
*change_capability = ~(CDC_MEDIA_CHANGED | CDC_SELECT_DISC);
ENSURE(tray_move, CDC_CLOSE_TRAY | CDC_OPEN_TRAY); ENSURE(tray_move, CDC_CLOSE_TRAY | CDC_OPEN_TRAY);
ENSURE(lock_door, CDC_LOCK); ENSURE(lock_door, CDC_LOCK);
ENSURE(select_speed, CDC_SELECT_SPEED); ENSURE(select_speed, CDC_SELECT_SPEED);
......
...@@ -138,6 +138,13 @@ void __trace_note_message(struct blk_trace *bt, const char *fmt, ...) ...@@ -138,6 +138,13 @@ void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
!blk_tracer_enabled)) !blk_tracer_enabled))
return; return;
/*
* If the BLK_TC_NOTIFY action mask isn't set, don't send any note
* message to the trace.
*/
if (!(bt->act_mask & BLK_TC_NOTIFY))
return;
local_irq_save(flags); local_irq_save(flags);
buf = per_cpu_ptr(bt->msg_data, smp_processor_id()); buf = per_cpu_ptr(bt->msg_data, smp_processor_id());
va_start(args, fmt); va_start(args, fmt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册