lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2] zram: check comp algorithm availability earlier
On Wed, May 27, 2015 at 08:20:12PM +0900, Sergey Senozhatsky wrote:
> Improvement idea by Marcin Jabrzyk.
>
> comp_algorithm_store() silently accepts any supplied algorithm
> name, because zram performs algorithm availability check later,
> during the device configuration phase in disksize_store() and
> emits the following error:
> "zram: Cannot initialise %s compressing backend"
>
> this error line is somewhat generic and, besides, can indicate
> a failed attempt to allocate compression backend's working
> buffers.
>
> add algorithm availability check to comp_algorithm_store():
>
> echo lzz > /sys/block/zram0/comp_algorithm
> -bash: echo: write error: Invalid argument
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Reported-by: Marcin Jabrzyk <m.jabrzyk@samsung.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Thanks.

--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2015-05-27 16:21    [W:0.040 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site