Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 040942fc authored by Eugene Zemtsov's avatar Eugene Zemtsov Committed by Paul Lawrence
Browse files

ANDROID: Initial commit of Incremental FS



Fully working incremental fs filesystem

Signed-off-by: default avatarEugene Zemtsov <ezemtsov@google.com>
Signed-off-by: default avatarPaul Lawrence <paullawrence@google.com>

Bug: 133435829
Change-Id: I14741a61ce7891a0f9054e70f026917712cbef78
parent c98264c0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ source "fs/quota/Kconfig"
source "fs/autofs/Kconfig"
source "fs/fuse/Kconfig"
source "fs/overlayfs/Kconfig"
source "fs/incfs/Kconfig"

menu "Caches"

+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ obj-$(CONFIG_ADFS_FS) += adfs/
obj-$(CONFIG_FUSE_FS)		+= fuse/
obj-$(CONFIG_OVERLAY_FS)	+= overlayfs/
obj-$(CONFIG_ORANGEFS_FS)       += orangefs/
obj-$(CONFIG_INCREMENTAL_FS)	+= incfs/
obj-$(CONFIG_UDF_FS)		+= udf/
obj-$(CONFIG_SUN_OPENPROMFS)	+= openpromfs/
obj-$(CONFIG_OMFS_FS)		+= omfs/

fs/incfs/Kconfig

0 → 100644
+18 −0
Original line number Diff line number Diff line
config INCREMENTAL_FS
	tristate "Incremental file system support"
	depends on BLOCK
	select DECOMPRESS_LZ4
	select CRC32
	select CRYPTO
	select CRYPTO_SHA256
	select X509_CERTIFICATE_PARSER
	select ASYMMETRIC_KEY_TYPE
	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
	select PKCS7_MESSAGE_PARSER
	help
	  Incremental FS is a read-only virtual file system that facilitates execution
	  of programs while their binaries are still being lazily downloaded over the
	  network, USB or pigeon post.

	  To compile this file system support as a module, choose M here: the
	  module will be called incrementalfs.

fs/incfs/Makefile

0 → 100644
+9 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_INCREMENTAL_FS)	+= incrementalfs.o

incrementalfs-y := \
	data_mgmt.o \
	format.o \
	integrity.o \
	main.o \
	vfs.o

fs/incfs/compat.h

0 → 100644
+33 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright 2019 Google LLC
 */
#ifndef _INCFS_COMPAT_H
#define _INCFS_COMPAT_H

#include <linux/lz4.h>
#include <linux/version.h>

typedef unsigned int __poll_t;

#ifndef u64_to_user_ptr
#define u64_to_user_ptr(x) (		\
{					\
	typecheck(u64, x);		\
	(void __user *)(uintptr_t)x;	\
}					\
)
#endif

#ifndef lru_to_page
#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
#endif

#define readahead_gfp_mask(x)	\
	(mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN)

#ifndef SB_ACTIVE
#define SB_ACTIVE MS_ACTIVE
#endif

#endif /* _INCFS_COMPAT_H */
Loading