Revert "ANDROID: Incremental fs: Separate pseudo-file code"

This reverts commit 9577751233.

Set incfs back to rvc shipping incfs

Bug: 178509184
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I64ded1a7dff46658e1cefe9738327e8db75f2abc
This commit is contained in:
Paul Lawrence 2021-01-26 13:31:11 -08:00
parent e0ec295d60
commit 3e485e3161
6 changed files with 1095 additions and 1152 deletions

View File

@ -6,5 +6,4 @@ incrementalfs-y := \
format.o \
integrity.o \
main.o \
pseudo_files.o \
vfs.o

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2020 Google LLC
*/
#ifndef _INCFS_PSEUDO_FILES_H
#define _INCFS_PSEUDO_FILES_H
#define PSEUDO_FILE_COUNT 2
#define INCFS_START_INO_RANGE 10
int dir_lookup_pseudo_files(struct super_block *sb, struct dentry *dentry);
int emit_pseudo_files(struct dir_context *ctx);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -6,33 +6,8 @@
#ifndef _INCFS_VFS_H
#define _INCFS_VFS_H
enum FILL_PERMISSION {
CANT_FILL = 0,
CAN_FILL = 1,
};
extern const struct file_operations incfs_file_ops;
extern const struct inode_operations incfs_file_inode_ops;
void incfs_kill_sb(struct super_block *sb);
struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
const char *dev_name, void *data);
int incfs_link(struct dentry *what, struct dentry *where);
int incfs_unlink(struct dentry *dentry);
static inline struct mount_info *get_mount_info(struct super_block *sb)
{
struct mount_info *result = sb->s_fs_info;
WARN_ON(!result);
return result;
}
static inline struct super_block *file_superblock(struct file *f)
{
struct inode *inode = file_inode(f);
return inode->i_sb;
}
#endif

View File

@ -227,7 +227,8 @@ int open_file_by_id(const char *mnt_dir, incfs_uuid_t id, bool use_ioctl)
goto out;
}
if (ioctl(fd, INCFS_IOC_PERMIT_FILL, &permit_fill) != -1) {
if (ioctl(fd, INCFS_IOC_PERMIT_FILL, &permit_fill) != -1 ||
errno != EPERM) {
print_error(
"Successfully called PERMIT_FILL on non pending_read file");
return -errno;