Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Sergey Senozhatsky
On (10/15/15 10:07), Joonsoo Kim wrote: [..] > > > if (error) { > > > + crypto_free_ccomp(comp->tfm); > > > kfree(comp); > > > > hm... zcomp_destroy(comp) ? > > It's not possible to use zcomp_destroy() here. It tries to access > field of comp->stream which could be NULL. ah,

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:38:41AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > Creates virtual block devices called /dev/zramX (X = 0, 1, ...). > > @@ -18,9 +17,8 @@ config ZRAM > > config ZRAM_LZ4_COMPRESS > > bool "Enable LZ4 algorithm

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Sergey Senozhatsky
Hi, On (10/14/15 16:38), Joonsoo Kim wrote: [..] > Creates virtual block devices called /dev/zramX (X = 0, 1, ...). > @@ -18,9 +17,8 @@ config ZRAM > config ZRAM_LZ4_COMPRESS > bool "Enable LZ4 algorithm support" > depends on ZRAM > - select LZ4_COMPRESS > - select LZ4

[PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
Until now, zram uses compression algorithm through direct call to core algorithm function, but, it has drawback that we need to add compression algorithm manually to zram if needed. Without this work, we cannot utilize various compression algorithms in the system. Moreover, to add new compression a