Release 4.7 drivers/block/zram/zcomp_lzo.c
  
  
/*
 * Copyright (C) 2014 Sergey Senozhatsky.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/lzo.h>
#include <linux/vmalloc.h>
#include <linux/mm.h>
#include "zcomp_lzo.h"
static void *lzo_create(gfp_t flags)
{
	void *ret;
	ret = kmalloc(LZO1X_MEM_COMPRESS, flags);
	if (!ret)
		ret = __vmalloc(LZO1X_MEM_COMPRESS,
				flags | __GFP_HIGHMEM,
				PAGE_KERNEL);
	return ret;
}
Contributors
 | Person | Tokens | Prop | Commits | CommitProp | 
| kyeongdon kim | kyeongdon kim | 26 | 59.09% | 1 | 25.00% | 
| sergey senozhatsky | sergey senozhatsky | 14 | 31.82% | 2 | 50.00% | 
| minchan kim | minchan kim | 4 | 9.09% | 1 | 25.00% | 
 | Total | 44 | 100.00% | 4 | 100.00% | 
static void lzo_destroy(void *private)
{
	kvfree(private);
}
Contributors
 | Person | Tokens | Prop | Commits | CommitProp | 
| sergey senozhatsky | sergey senozhatsky | 14 | 93.33% | 1 | 50.00% | 
| kyeongdon kim | kyeongdon kim | 1 | 6.67% | 1 | 50.00% | 
 | Total | 15 | 100.00% | 2 | 100.00% | 
static int lzo_compress(const unsigned char *src, unsigned char *dst,
		size_t *dst_len, void *private)
{
	int ret = lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
	return ret == LZO_E_OK ? 0 : ret;
}
Contributors
 | Person | Tokens | Prop | Commits | CommitProp | 
| sergey senozhatsky | sergey senozhatsky | 50 | 100.00% | 1 | 100.00% | 
 | Total | 50 | 100.00% | 1 | 100.00% | 
static int lzo_decompress(const unsigned char *src, size_t src_len,
		unsigned char *dst)
{
	size_t dst_len = PAGE_SIZE;
	int ret = lzo1x_decompress_safe(src, src_len, dst, &dst_len);
	return ret == LZO_E_OK ? 0 : ret;
}
Contributors
 | Person | Tokens | Prop | Commits | CommitProp | 
| sergey senozhatsky | sergey senozhatsky | 49 | 100.00% | 1 | 100.00% | 
 | Total | 49 | 100.00% | 1 | 100.00% | 
struct zcomp_backend zcomp_lzo = {
	.compress = lzo_compress,
	.decompress = lzo_decompress,
	.create = lzo_create,
	.destroy = lzo_destroy,
	.name = "lzo",
};
Overall Contributors
 | Person | Tokens | Prop | Commits | CommitProp | 
| sergey senozhatsky | sergey senozhatsky | 171 | 82.21% | 2 | 50.00% | 
| kyeongdon kim | kyeongdon kim | 33 | 15.87% | 1 | 25.00% | 
| minchan kim | minchan kim | 4 | 1.92% | 1 | 25.00% | 
 | Total | 208 | 100.00% | 4 | 100.00% | 
  
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.