]> git.baikalelectronics.ru Git - kernel.git/commit
staging: erofs: introduce workstation for decompression
authorGao Xiang <gaoxiang25@huawei.com>
Thu, 26 Jul 2018 12:22:05 +0000 (20:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jul 2018 15:24:10 +0000 (17:24 +0200)
commit18c442aa52dc12552abcea11bd806a7ccfb047dd
treea640d916a61f5945c0f1f204fbdeafbd6471d330
parentd38222cd4e77caf53c047806688e51fea9ee7f10
staging: erofs: introduce workstation for decompression

This patch introduces another concept used by the unzip
subsystem called 'workstation'. It can be seen as a sparse
array that stores pointers pointed to data structures
related to the corresponding physical blocks.

All lookup cases are protected by RCU read lock. Besides,
reference count and spin_lock are also introduced to
manage its lifetime and serialize all update operations.

'workstation' is currently implemented on the in-kernel
radix tree approach for backward compatibility.
With the evolution of linux kernel, it could be migrated
into XArray implementation in the future.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/internal.h
drivers/staging/erofs/super.c
drivers/staging/erofs/utils.c