<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From: Alasdair G Kergon &lt;agk@redhat.com&gt;

Use dm_target_offset wrapper instead of referencing the awkward ti-&gt;begin
explicitly.

Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
---
 drivers/md/dm-thin.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-3.3/drivers/md/dm-thin.c
===================================================================
--- linux-3.3.orig/drivers/md/dm-thin.c
+++ linux-3.3/drivers/md/dm-thin.c
@@ -2389,7 +2389,7 @@ out_unlock:
 static int thin_map(struct dm_target *ti, struct bio *bio,
 		    union map_info *map_context)
 {
-	bio-&gt;bi_sector -= ti-&gt;begin;
+	bio-&gt;bi_sector = dm_target_offset(ti, bio-&gt;bi_sector);
 
 	return thin_bio_map(ti, bio, map_context);
 }
</pre></body></html>