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

Re: [dm-devel] 2 TB wraparound on snapshots on kernels < 2.6.33




On Wed, 16 Jun 2010, Mikulas Patocka wrote:

> 
> 
> On Tue, 15 Jun 2010, Phillip Susi wrote:
> 
> > After further testing of mainline kernels, it seems that the bug was
> > fixed between 2.6.32 and 2.6.33.  Looking over the logs, I see no
> > changes that were intended to fix this issue, but there were quite a
> > number of changes to the snapshot code.  I can only conclude that these
> > inadvertently fixed the problem.
> 
> Hi
> 
> I wasn't able to reproduce this bug on any upstream kernel and I suspect 
> it is caused by incorrect patching on Ubuntu side. Ubuntu kernels 
> 2.6.31-16 and before don't have the bug, 2.6.31-17 and above have it.
> 
> Mikulas

The bug existed even in upstream, but only in 2.6.32 kernel. The reason 
was this function:
static inline chunk_t sector_to_chunk(struct dm_exception_store *store,
                                      sector_t sector)
{
        return (sector & ~store->chunk_mask) >> store->chunk_shift;
}

"store->chunk_mask" was changed to be unsigned in 2.6.32, so it was 
masking the sector with 32-bit value. In 2.6.33 that masking was removed. 
Ubuntu picked that 2.6.32 patch but didn't pick further patches.

Mikulas


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