Re: [PATCH v2] btrfs: use kmalloc for lzo de/compress buffer

2013-02-22 Thread Kyungsik Lee
On Thu, Feb 21, 2013 at 02:41:53PM +0100, David Sterba wrote: > On Mon, Feb 18, 2013 at 04:56:04PM +0900, Kyungsik Lee wrote: > > @@ -55,8 +55,9 @@ static struct list_head *lzo_alloc_workspace(void) > > return ERR_PTR(-ENOMEM); > > > > workspace->mem =

Re: [PATCH v2] btrfs: use kmalloc for lzo de/compress buffer

2013-02-22 Thread Kyungsik Lee
On Thu, Feb 21, 2013 at 02:41:53PM +0100, David Sterba wrote: On Mon, Feb 18, 2013 at 04:56:04PM +0900, Kyungsik Lee wrote: @@ -55,8 +55,9 @@ static struct list_head *lzo_alloc_workspace(void) return ERR_PTR(-ENOMEM); workspace-mem = vmalloc(LZO1X_MEM_COMPRESS); -

Re: [PATCH v2] btrfs: use kmalloc for lzo de/compress buffer

2013-02-21 Thread David Sterba
On Mon, Feb 18, 2013 at 04:56:04PM +0900, Kyungsik Lee wrote: > @@ -55,8 +55,9 @@ static struct list_head *lzo_alloc_workspace(void) > return ERR_PTR(-ENOMEM); > > workspace->mem = vmalloc(LZO1X_MEM_COMPRESS); > - workspace->buf = vmalloc(PAGE_CACHE_SIZE); > -

Re: [PATCH v2] btrfs: use kmalloc for lzo de/compress buffer

2013-02-21 Thread David Sterba
On Mon, Feb 18, 2013 at 04:56:04PM +0900, Kyungsik Lee wrote: @@ -55,8 +55,9 @@ static struct list_head *lzo_alloc_workspace(void) return ERR_PTR(-ENOMEM); workspace-mem = vmalloc(LZO1X_MEM_COMPRESS); - workspace-buf = vmalloc(PAGE_CACHE_SIZE); - workspace-cbuf

[PATCH v2] btrfs: use kmalloc for lzo de/compress buffer

2013-02-17 Thread Kyungsik Lee
The size of de/compress buffer is small enough to use kmalloc. Allocating it with kmalloc rather than vmalloc is preferred. This patch depends on my previous patch, “btrfs: fix decompress buffer size”. v2: Using vmalloc for "workspace->mem" due to the size limit. Signed-off-by: Kyungsik Lee

[PATCH v2] btrfs: use kmalloc for lzo de/compress buffer

2013-02-17 Thread Kyungsik Lee
The size of de/compress buffer is small enough to use kmalloc. Allocating it with kmalloc rather than vmalloc is preferred. This patch depends on my previous patch, “btrfs: fix decompress buffer size”. v2: Using vmalloc for workspace-mem due to the size limit. Signed-off-by: Kyungsik Lee