dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* questions about dm-thin and discard
@ 2012-07-16 17:14 Mikulas Patocka
  2012-07-16 18:01 ` Mike Snitzer
  0 siblings, 1 reply; 4+ messages in thread
From: Mikulas Patocka @ 2012-07-16 17:14 UTC (permalink / raw)
  To: Edward Thornber; +Cc: dm-devel, Mike Snitzer

Hi Joe

I would like to ask you about this code path: In process_discard, there is 
a branch with a comment "This path is hit if people are ignoring 
limits->discard_granularity." It trims the discard request so that it 
doesn't span a block boundary and submits it.

The question is: what if the block is shared? In this case, we can't 
submit discard to the block, because it would damage the other snapshot 
that is sharing this block. Shouldn't there be shomething like this?
if ((!lookup_result.shared) & pool->pf.discard_passdown) {
	remap_and_issue(tc, bio, lookup_result.block);
} else {
	bio_endio(bio, 0) 
} 
... or is it tested elsewhere and am I missing something?


Another question is about setting "ti->discards_supported = 1" in 
pool_ctr. ti->discards_supported means that the target supports discards 
even if the underlying disk doesn't. Since the pool device is passing 
anyth I/O unchanged to the underlying disk, ti->discards_supported 
shouldn't be set. Or is there any other reason why is it set?


Mikulas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-16 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16 17:14 questions about dm-thin and discard Mikulas Patocka
2012-07-16 18:01 ` Mike Snitzer
2012-07-16 18:32   ` Mikulas Patocka
2012-07-16 19:51     ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).