Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251138
b: refs/heads/master
c: f387693
h: refs/heads/master
v: v3
  • Loading branch information
shaohua.li@intel.com authored and Jens Axboe committed May 6, 2011
1 parent c8208b2 commit 878cf09
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 490b94be0282c3b67f56453628ff0aaae827a670
refs/heads/master: f3876930952390a31c3a7fd68dd621464a36eb80
6 changes: 6 additions & 0 deletions trunk/block/blk-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,12 @@ void blk_queue_flush(struct request_queue *q, unsigned int flush)
}
EXPORT_SYMBOL_GPL(blk_queue_flush);

void blk_queue_flush_queueable(struct request_queue *q, bool queueable)
{
q->flush_not_queueable = !queueable;
}
EXPORT_SYMBOL_GPL(blk_queue_flush_queueable);

static int __init blk_settings_init(void)
{
blk_max_low_pfn = max_low_pfn - 1;
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ struct request_queue
* for flush operations
*/
unsigned int flush_flags;
unsigned int flush_not_queueable:1;
unsigned int flush_pending_idx:1;
unsigned int flush_running_idx:1;
unsigned long flush_pending_since;
Expand Down Expand Up @@ -843,6 +844,7 @@ extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *);
extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *);
extern void blk_queue_rq_timeout(struct request_queue *, unsigned int);
extern void blk_queue_flush(struct request_queue *q, unsigned int flush);
extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable);
extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);

extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *);
Expand Down Expand Up @@ -1111,6 +1113,11 @@ static inline unsigned int block_size(struct block_device *bdev)
return bdev->bd_block_size;
}

static inline bool queue_flush_queueable(struct request_queue *q)
{
return !q->flush_not_queueable;
}

typedef struct {struct page *v;} Sector;

unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *);
Expand Down

0 comments on commit 878cf09

Please sign in to comment.