projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm: switch to using blk_queue_write_cache()
[cascardo/linux.git]
/
drivers
/
md
/
dm-table.c
diff --git
a/drivers/md/dm-table.c
b/drivers/md/dm-table.c
index
f9e8f0b
..
4b1ffc0
100644
(file)
--- a/
drivers/md/dm-table.c
+++ b/
drivers/md/dm-table.c
@@
-1506,7
+1506,7
@@
static bool dm_table_supports_discards(struct dm_table *t)
void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
struct queue_limits *limits)
{
void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
struct queue_limits *limits)
{
-
unsigned flush = 0
;
+
bool wc = false, fua = false
;
/*
* Copy table's limits to the DM device's request_queue
/*
* Copy table's limits to the DM device's request_queue
@@
-1519,11
+1519,11
@@
void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
if (dm_table_supports_flush(t, REQ_FLUSH)) {
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
if (dm_table_supports_flush(t, REQ_FLUSH)) {
-
flush |= REQ_FLUSH
;
+
wc = true
;
if (dm_table_supports_flush(t, REQ_FUA))
if (dm_table_supports_flush(t, REQ_FUA))
- f
lush |= REQ_FUA
;
+ f
ua = true
;
}
}
- blk_queue_
flush(q, flush
);
+ blk_queue_
write_cache(q, wc, fua
);
if (!dm_table_discard_zeroes_data(t))
q->limits.discard_zeroes_data = 0;
if (!dm_table_discard_zeroes_data(t))
q->limits.discard_zeroes_data = 0;