[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] question regarding snapshot chunk size.



On Thursday 13 May 2004 18:30, Dave Olien wrote:
> I'm using your udm1 patch set to linux 2.6.6-rc2.
> The man page for lvcreate says the chunksize parameter for a
> snapshot can be a power of two value between 4k and 1024k.
>
> When I try --chunksize 1024, I hit a BUG() in the bvec_index()
> function.
>
> Putting some checking code into snapshot_ctr(), I observe that
> when the lvcreate --chunksize 1024 parameter is used, snapshot_ctr()
> reports a chunksize of 2048.  This is the value just after the
> simple_strtoul() call.
>
> So, why is the value being doubled (by the lvcreate command?).

The value isn't being doubled. dm-snapshot expects the chunk-size value in 
sectors, whereas the user-space tools present the option in kilobytes. 
So....I guess the value *is* being doubled, but for the right reason.

> Also, why is there no range check on the value in snapshot_ctr(),
> with a error code failure, rather than a BUG() call in bvec_index?

So it seems there are some implicit limits when using the dm-io APIs. For the 
time being, we might need to add a size check in dm-snapshot to prevent 
chunk-sizes greater than 512kB. We should also review the dm-io code to see 
if these limitations are real, or if there's a way to get around them.

-- 
Kevin Corry
kevincorry sbcglobal net


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]