.blocks_writen file handling was missing some operations: SELinux xattr handlers, safety checks for it being a pseudo file etc. This CL generalizes pseudo file handling so that all such files work in a generic way and next time it should be easier to add all operations at once. Bug: 175823975 Test: incfs_tests pass Change-Id: Id2b1936018c81c62c8ab4cdbaa8827e2679b513f Signed-off-by: Yurii Zubrytskyi <zyy@google.com> Signed-off-by: Paul Lawrence <paullawrence@google.com>
21 lines
501 B
C
21 lines
501 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright 2020 Google LLC
|
|
*/
|
|
|
|
#ifndef _INCFS_PSEUDO_FILES_H
|
|
#define _INCFS_PSEUDO_FILES_H
|
|
|
|
#include "internal.h"
|
|
|
|
#define PSEUDO_FILE_COUNT 3
|
|
#define INCFS_START_INO_RANGE 10
|
|
|
|
extern const struct mem_range incfs_pseudo_file_names[PSEUDO_FILE_COUNT];
|
|
extern const unsigned long incfs_pseudo_file_inodes[PSEUDO_FILE_COUNT];
|
|
|
|
int dir_lookup_pseudo_files(struct super_block *sb, struct dentry *dentry);
|
|
int emit_pseudo_files(struct dir_context *ctx);
|
|
|
|
#endif
|