<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thank you Mr. Thornber.  This example should work for me.<br><br>My dm-validate.ko module is functional, but a bit crude for general use.  It has a few "issues":<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">1)  It is only currently tested on x86_64, although it will likely work on 32-bit intel with only a couple of KMAPs added.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">2)  It uses "load DS:" games to read and write to file space from the kernel (this is where the hashes are stored).  I suspect this is nonsensical for some arches.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">3)  There is no attempt to "sync" the hash "database" so crashes always result in out of sync tests.  My testing is mostly with SSDs and SSD arrays, so speed is an issue.<br><br>If you would like a copy, please point me at "contribution" guidelines for device mapper target contributions.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 5, 2015 at 2:21 AM, Joe Thornber <span dir="ltr"><<a href="mailto:thornber@redhat.com" target="_blank">thornber@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Dec 31, 2014 at 02:10:52PM -0800, Doug Dumitru wrote:<br>
> Hello all,<br>
><br>
> I have a test dm target module that I use to validate storage subsystems<br>
> for data accuracy.  It basically builds weak hashes for every sector of a<br>
> device when written, and validates these hashes when the sector is read<br>
> back.  Ugly memory usage, but it is just a test tool.<br>
><br>
> I can deploy this with an iterator target and it will take on the limits of<br>
> the device underneath, or I can skip the iterator target and get limits at<br>
> 2048 sectors.  What I would like to do is set the limit manually.  I know<br>
> this is "really bad program design", but again, this is a test tool and not<br>
> anything for production use.<br>
><br>
> Can anyone point me at an example of where the limits are setup explicitly.<br>
<br>
</div></div>Hi Doug,<br>
<br>
This sounds like a useful target for testing, any chance you could<br>
post it here when you finish it please?<br>
<br>
dm-thin does lots of tweaking of limits, so that's probably the best one to look at:<br>
<br>
<a href="https://github.com/jthornber/linux-2.6/blob/thin-dev/drivers/md/dm-thin.c#L3707" target="_blank">https://github.com/jthornber/linux-2.6/blob/thin-dev/drivers/md/dm-thin.c#L3707</a><br>
<span class="HOEnZb"><font color="#888888"><br>
- Joe<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Doug Dumitru<br>EasyCo LLC<br></div>
</div>