mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (41 commits) Revert "Seperate read and write statistics of in_flight requests" cfq-iosched: don't delay async queue if it hasn't dispatched at all block: Topology ioctls cfq-iosched: use assigned slice sync value, not default cfq-iosched: rename 'desktop' sysfs entry to 'low_latency' cfq-iosched: implement slower async initiate and queue ramp up cfq-iosched: delay async IO dispatch, if sync IO was just done cfq-iosched: add a knob for desktop interactiveness Add a tracepoint for block request remapping block: allow large discard requests block: use normal I/O path for discard requests swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL fs/bio.c: move EXPORT* macros to line after function Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs cciss: fix build when !PROC_FS block: Do not clamp max_hw_sectors for stacking devices block: Set max_sectors correctly for stacking devices cciss: cciss_host_attr_groups should be const cciss: Dynamically allocate the drive_info_struct for each logical drive. cciss: Add usage_count attribute to each logical drive in /sys ...
This commit is contained in:
commit
58e57fbd1c
26 changed files with 999 additions and 480 deletions
|
|
@ -130,7 +130,7 @@ struct mapped_device {
|
|||
/*
|
||||
* A list of ios that arrived while we were suspended.
|
||||
*/
|
||||
atomic_t pending[2];
|
||||
atomic_t pending;
|
||||
wait_queue_head_t wait;
|
||||
struct work_struct work;
|
||||
struct bio_list deferred;
|
||||
|
|
@ -453,14 +453,13 @@ static void start_io_acct(struct dm_io *io)
|
|||
{
|
||||
struct mapped_device *md = io->md;
|
||||
int cpu;
|
||||
int rw = bio_data_dir(io->bio);
|
||||
|
||||
io->start_time = jiffies;
|
||||
|
||||
cpu = part_stat_lock();
|
||||
part_round_stats(cpu, &dm_disk(md)->part0);
|
||||
part_stat_unlock();
|
||||
dm_disk(md)->part0.in_flight[rw] = atomic_inc_return(&md->pending[rw]);
|
||||
dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending);
|
||||
}
|
||||
|
||||
static void end_io_acct(struct dm_io *io)
|
||||
|
|
@ -480,9 +479,8 @@ static void end_io_acct(struct dm_io *io)
|
|||
* After this is decremented the bio must not be touched if it is
|
||||
* a barrier.
|
||||
*/
|
||||
dm_disk(md)->part0.in_flight[rw] = pending =
|
||||
atomic_dec_return(&md->pending[rw]);
|
||||
pending += atomic_read(&md->pending[rw^0x1]);
|
||||
dm_disk(md)->part0.in_flight = pending =
|
||||
atomic_dec_return(&md->pending);
|
||||
|
||||
/* nudge anyone waiting on suspend queue */
|
||||
if (!pending)
|
||||
|
|
@ -1787,8 +1785,7 @@ static struct mapped_device *alloc_dev(int minor)
|
|||
if (!md->disk)
|
||||
goto bad_disk;
|
||||
|
||||
atomic_set(&md->pending[0], 0);
|
||||
atomic_set(&md->pending[1], 0);
|
||||
atomic_set(&md->pending, 0);
|
||||
init_waitqueue_head(&md->wait);
|
||||
INIT_WORK(&md->work, dm_wq_work);
|
||||
init_waitqueue_head(&md->eventq);
|
||||
|
|
@ -2091,8 +2088,7 @@ static int dm_wait_for_completion(struct mapped_device *md, int interruptible)
|
|||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(q->queue_lock, flags);
|
||||
} else if (!atomic_read(&md->pending[0]) &&
|
||||
!atomic_read(&md->pending[1]))
|
||||
} else if (!atomic_read(&md->pending))
|
||||
break;
|
||||
|
||||
if (interruptible == TASK_INTERRUPTIBLE &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue