git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm thin: fix discard corruption
[pandora-kernel.git]
/
drivers
/
md
/
dm-region-hash.c
diff --git
a/drivers/md/dm-region-hash.c
b/drivers/md/dm-region-hash.c
index
7771ed2
..
69732e0
100644
(file)
--- a/
drivers/md/dm-region-hash.c
+++ b/
drivers/md/dm-region-hash.c
@@
-404,6
+404,9
@@
void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio)
return;
}
return;
}
+ if (bio->bi_rw & REQ_DISCARD)
+ return;
+
/* We must inform the log that the sync count has changed. */
log->type->set_region_sync(log, region, 0);
/* We must inform the log that the sync count has changed. */
log->type->set_region_sync(log, region, 0);
@@
-524,7
+527,7
@@
void dm_rh_inc_pending(struct dm_region_hash *rh, struct bio_list *bios)
struct bio *bio;
for (bio = bios->head; bio; bio = bio->bi_next) {
struct bio *bio;
for (bio = bios->head; bio; bio = bio->bi_next) {
- if (bio->bi_rw &
REQ_FLUSH
)
+ if (bio->bi_rw &
(REQ_FLUSH | REQ_DISCARD)
)
continue;
rh_inc(rh, dm_rh_bio_to_region(rh, bio));
}
continue;
rh_inc(rh, dm_rh_bio_to_region(rh, bio));
}