[dm-devel] Re: [PATCH] fix bug on invalid chunksize
Jonathan Brassow
jbrassow at redhat.com
Wed Oct 7 17:50:28 UTC 2009
good catch.
Reviewed-by: Jonathan Brassow <jbrassow at redhat.com>
brassow
On Oct 6, 2009, at 5:59 PM, Mikulas Patocka wrote:
>
>
> On Fri, 2 Oct 2009, Alasdair G Kergon wrote:
>
>> On Wed, Sep 30, 2009 at 10:41:10AM -0400, Mike Snitzer wrote:
>>> Maximum chunk size is 512kB,
>>
>> Can you confirm that a supplied chunk size of 4294971392, for
>> example, still
>> gets rejected?
>
> It gets rejected but there's a bug that device is left open after a
> failure. See this patch:
>
> Properly close the device if failing because of an invalid chunk size.
>
> Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
>
> ---
> drivers/md/dm-exception-store.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6.31-fast-new/drivers/md/dm-exception-store.c
> ===================================================================
> --- linux-2.6.31-fast-new.orig/drivers/md/dm-exception-store.c
> 2009-10-07 00:05:28.000000000 +0200
> +++ linux-2.6.31-fast-new/drivers/md/dm-exception-store.c 2009-10-07
> 00:05:35.000000000 +0200
> @@ -237,7 +237,7 @@ int dm_exception_store_create(struct dm_
>
> r = set_chunk_size(tmp_store, argv[2], &ti->error);
> if (r)
> - goto bad_cow;
> + goto bad_ctr;
>
> r = type->ctr(tmp_store, 0, NULL);
> if (r) {
More information about the dm-devel
mailing list