[opensuse-kernel] zcache=deflate no longer works in kernel HEAD
Hi: With current 3.10.rcX kernels, booting with zcache=deflate no longer works, 3.9 is fine however [ 0.815330] zcache: compressor initialization failed "deflate" module isin the initrd just like it was with 3.9.x. Any input about the issue is appreciated. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Wed 19-06-13 19:20:32, Cristian Rodriguez wrote:
Hi:
With current 3.10.rcX kernels, booting with zcache=deflate no longer works, 3.9 is fine however
[ 0.815330] zcache: compressor initialization failed
"deflate" module isin the initrd just like it was with 3.9.x.
Any input about the issue is appreciated.
The code is confused a bit: static int zcache_comp_init(void) { [...] if (*zcache_comp_name != '\0') { ret = crypto_has_comp(zcache_comp_name, 0, 0); if (!ret) pr_info("zcache: %s not supported\n", zcache_comp_name); goto out; } [...] out: return ret; } static int zcache_init(void) { [...] ret = zcache_comp_init(); if (ret) { pr_err("%s: compressor initialization failed\n", namestr); goto out; } [...] } crypto_has_comp returns 1 on success so it finds out that the requested compressor is supported but zcache_comp_init inteprets that as a failure. The -mm tree has this fixed already. THe simple patch bellow should help as well: --- diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index dcceed2..0fe530b 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -1811,10 +1811,12 @@ static int zcache_comp_init(void) #else if (*zcache_comp_name != '\0') { ret = crypto_has_comp(zcache_comp_name, 0, 0); - if (!ret) + if (!ret) { pr_info("zcache: %s not supported\n", zcache_comp_name); - goto out; + goto out; + } + goto out_alloc; } if (!ret) strcpy(zcache_comp_name, "lzo"); @@ -1827,6 +1829,7 @@ static int zcache_comp_init(void) pr_info("zcache: using %s compressor\n", zcache_comp_name); /* alloc percpu transforms */ +out_alloc: ret = 0; zcache_comp_pcpu_tfms = alloc_percpu(struct crypto_comp *); if (!zcache_comp_pcpu_tfms) -- Michal Hocko SUSE Labs -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
El 20/06/13 04:03, Michal Hocko escribió:
The -mm tree has this fixed already.
Thank you , I may or not try the patch, I was just attempting to know if the issue was known already or if I would need to file a bug report. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Sun 23-06-13 21:10:13, Cristian Rodriguez wrote:
El 20/06/13 04:03, Michal Hocko escribió:
The -mm tree has this fixed already.
Thank you , I may or not try the patch, I was just attempting to know if the issue was known already or if I would need to file a bug report.
I have sent it to Linus anyway. It would be better if you could stick your Tested-by as well, though. -- Michal Hocko SUSE Labs -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (2)
-
Cristian Rodríguez
-
Michal Hocko