In persistent_prepare(), the "enough-room-left" check only verifies that the start of the next-free chunk is within the cow device. If the cow device is not an even multiple of the chunk-size, the snapshot code will eventually try to write off the end of the cow device. Check that the entire next-free chunk is within the cow device. [Kevin Corry] --- diff/drivers/md/dm-exception-store.c 2003-02-25 14:44:36.000000000 +0000 +++ source/drivers/md/dm-exception-store.c 2003-03-27 09:40:03.000000000 +0000 @@ -449,7 +449,7 @@ sector_t size = get_dev_size(store->snap->cow->dev); /* Is there enough room ? */ - if (size <= (ps->next_free * store->snap->chunk_size)) + if (size < ((ps->next_free + 1) * store->snap->chunk_size)) return -ENOSPC; e->new_chunk = ps->next_free;