All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about dm target size
@ 2014-11-12  0:37 Josef Bacik
  2014-11-12  2:06 ` Mike Snitzer
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Josef Bacik @ 2014-11-12  0:37 UTC (permalink / raw)
  To: dm-devel; +Cc: snitzer

Hello,

I'm creating a dm target to better test power fail situations and I'm 
having trouble figuring out how to make the dm device appear as a 
different size.  So for example you do the normal dm table

offset size power-fail /dev/whatever args

I want to use the entire size of /dev/whatever, but I want my dm device 
to show up as size/2.  So right now I'm doing this in my ->ctr function

ti->len /= 2;

Is that acceptable, or will this have some side-effect that's going to 
bite me in the ass?  I can't see any other target that does something 
similar and there appears to be no helper function.  This seems to work 
as far as blockdev --getsz is concerned, but I'm worried I need to do 
more.  Thanks,

Josef

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

end of thread, other threads:[~2014-11-12 12:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12  0:37 Question about dm target size Josef Bacik
2014-11-12  2:06 ` Mike Snitzer
2014-11-12  2:30   ` Josef Bacik
2014-11-12  8:45     ` Zdenek Kabelac
2014-11-12 11:00       ` Josef Bacik
2014-11-12 11:48         ` Zdenek Kabelac
2014-11-12 11:15 ` Heinz Mauelshagen
2014-11-12 12:28 ` Bryn M. Reeves

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.