Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cciss: Add cciss_allow_hpsa module parameter cciss: Fix multiple calls to pci_release_regions blk-settings: fix function parameter kernel-doc notation writeback: kill space in debugfs item name writeback: account IO throttling wait as iowait elv_iosched_store(): fix strstrip() misuse cfq-iosched: avoid probable slice overrun when idling cfq-iosched: apply bool value where we return 0/1 cfq-iosched: fix think time allowed for seekers cfq-iosched: fix the slice residual sign cfq-iosched: abstract out the 'may this cfqq dispatch' logic block: use proper BLK_RW_ASYNC in blk_queue_start_tag() block: Seperate read and write statistics of in_flight requests v2 block: get rid of kblock_schedule_delayed_work() cfq-iosched: fix possible problem with jiffies wraparound cfq-iosched: fix issue with rq-rq merging and fifo list ordering
This commit is contained in:
@@ -1172,11 +1172,7 @@ static inline void put_dev_sector(Sector p)
|
||||
}
|
||||
|
||||
struct work_struct;
|
||||
struct delayed_work;
|
||||
int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
|
||||
int kblockd_schedule_delayed_work(struct request_queue *q,
|
||||
struct delayed_work *work,
|
||||
unsigned long delay);
|
||||
|
||||
#define MODULE_ALIAS_BLOCKDEV(major,minor) \
|
||||
MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
|
||||
|
@@ -98,7 +98,7 @@ struct hd_struct {
|
||||
int make_it_fail;
|
||||
#endif
|
||||
unsigned long stamp;
|
||||
int in_flight;
|
||||
int in_flight[2];
|
||||
#ifdef CONFIG_SMP
|
||||
struct disk_stats *dkstats;
|
||||
#else
|
||||
@@ -322,18 +322,23 @@ static inline void free_part_stats(struct hd_struct *part)
|
||||
#define part_stat_sub(cpu, gendiskp, field, subnd) \
|
||||
part_stat_add(cpu, gendiskp, field, -subnd)
|
||||
|
||||
static inline void part_inc_in_flight(struct hd_struct *part)
|
||||
static inline void part_inc_in_flight(struct hd_struct *part, int rw)
|
||||
{
|
||||
part->in_flight++;
|
||||
part->in_flight[rw]++;
|
||||
if (part->partno)
|
||||
part_to_disk(part)->part0.in_flight++;
|
||||
part_to_disk(part)->part0.in_flight[rw]++;
|
||||
}
|
||||
|
||||
static inline void part_dec_in_flight(struct hd_struct *part)
|
||||
static inline void part_dec_in_flight(struct hd_struct *part, int rw)
|
||||
{
|
||||
part->in_flight--;
|
||||
part->in_flight[rw]--;
|
||||
if (part->partno)
|
||||
part_to_disk(part)->part0.in_flight--;
|
||||
part_to_disk(part)->part0.in_flight[rw]--;
|
||||
}
|
||||
|
||||
static inline int part_in_flight(struct hd_struct *part)
|
||||
{
|
||||
return part->in_flight[0] + part->in_flight[1];
|
||||
}
|
||||
|
||||
/* block/blk-core.c */
|
||||
@@ -546,6 +551,8 @@ extern ssize_t part_size_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
extern ssize_t part_stat_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
extern ssize_t part_inflight_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
extern ssize_t part_fail_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
|
Reference in New Issue
Block a user