fs/vboxsf/shfl_hostintf.h
Source file repositories/reference/linux-study-clean/fs/vboxsf/shfl_hostintf.h
File Facts
- System
- Linux kernel
- Corpus path
fs/vboxsf/shfl_hostintf.h- Extension
.h- Size
- 22543 bytes
- Lines
- 902
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/vbox_vmmdev_types.h
Detected Declarations
struct shfl_stringstruct shfl_fsobjattr_unixstruct shfl_fsobjattr_easizestruct shfl_fsobjattrstruct shfl_timespecstruct shfl_fsobjinfostruct shfl_createparmsstruct shfl_dirinfostruct shfl_fspropertiesstruct shfl_volinfostruct shfl_map_folderstruct shfl_unmap_folderstruct shfl_createstruct shfl_closestruct shfl_readstruct shfl_writestruct shfl_liststruct shfl_readLinkstruct shfl_informationstruct shfl_removestruct shfl_renamestruct shfl_symlinkenum shfl_fsobjattr_addenum shfl_create_resultfunction shfl_string_buf_size
Annotated Snippet
struct shfl_string {
/** Allocated size of the string member in bytes. */
u16 size;
/** Length of string without trailing nul in bytes. */
u16 length;
/** UTF-8 or UTF-16 string. Nul terminated. */
union {
u8 legacy_padding[2];
DECLARE_FLEX_ARRAY(u8, utf8);
DECLARE_FLEX_ARRAY(u16, utf16);
} string;
};
VMMDEV_ASSERT_SIZE(shfl_string, 6);
/* The size of shfl_string w/o the string part. */
#define SHFLSTRING_HEADER_SIZE 4
/* Calculate size of the string. */
static inline u32 shfl_string_buf_size(const struct shfl_string *string)
{
return string ? SHFLSTRING_HEADER_SIZE + string->size : 0;
}
/* Set user id on execution (S_ISUID). */
#define SHFL_UNIX_ISUID 0004000U
/* Set group id on execution (S_ISGID). */
#define SHFL_UNIX_ISGID 0002000U
/* Sticky bit (S_ISVTX / S_ISTXT). */
#define SHFL_UNIX_ISTXT 0001000U
/* Owner readable (S_IRUSR). */
#define SHFL_UNIX_IRUSR 0000400U
/* Owner writable (S_IWUSR). */
#define SHFL_UNIX_IWUSR 0000200U
/* Owner executable (S_IXUSR). */
#define SHFL_UNIX_IXUSR 0000100U
/* Group readable (S_IRGRP). */
#define SHFL_UNIX_IRGRP 0000040U
/* Group writable (S_IWGRP). */
#define SHFL_UNIX_IWGRP 0000020U
/* Group executable (S_IXGRP). */
#define SHFL_UNIX_IXGRP 0000010U
/* Other readable (S_IROTH). */
#define SHFL_UNIX_IROTH 0000004U
/* Other writable (S_IWOTH). */
#define SHFL_UNIX_IWOTH 0000002U
/* Other executable (S_IXOTH). */
#define SHFL_UNIX_IXOTH 0000001U
/* Named pipe (fifo) (S_IFIFO). */
#define SHFL_TYPE_FIFO 0010000U
/* Character device (S_IFCHR). */
#define SHFL_TYPE_DEV_CHAR 0020000U
/* Directory (S_IFDIR). */
#define SHFL_TYPE_DIRECTORY 0040000U
/* Block device (S_IFBLK). */
#define SHFL_TYPE_DEV_BLOCK 0060000U
/* Regular file (S_IFREG). */
#define SHFL_TYPE_FILE 0100000U
/* Symbolic link (S_IFLNK). */
#define SHFL_TYPE_SYMLINK 0120000U
/* Socket (S_IFSOCK). */
#define SHFL_TYPE_SOCKET 0140000U
/* Whiteout (S_IFWHT). */
#define SHFL_TYPE_WHITEOUT 0160000U
/* Type mask (S_IFMT). */
#define SHFL_TYPE_MASK 0170000U
/* Checks the mode flags indicate a directory (S_ISDIR). */
#define SHFL_IS_DIRECTORY(m) (((m) & SHFL_TYPE_MASK) == SHFL_TYPE_DIRECTORY)
/* Checks the mode flags indicate a symbolic link (S_ISLNK). */
#define SHFL_IS_SYMLINK(m) (((m) & SHFL_TYPE_MASK) == SHFL_TYPE_SYMLINK)
/** The available additional information in a shfl_fsobjattr object. */
enum shfl_fsobjattr_add {
/** No additional information is available / requested. */
SHFLFSOBJATTRADD_NOTHING = 1,
/**
* The additional unix attributes (shfl_fsobjattr::u::unix_attr) are
* available / requested.
*/
SHFLFSOBJATTRADD_UNIX,
/**
* The additional extended attribute size (shfl_fsobjattr::u::size) is
* available / requested.
*/
Annotation
- Immediate include surface: `linux/vbox_vmmdev_types.h`.
- Detected declarations: `struct shfl_string`, `struct shfl_fsobjattr_unix`, `struct shfl_fsobjattr_easize`, `struct shfl_fsobjattr`, `struct shfl_timespec`, `struct shfl_fsobjinfo`, `struct shfl_createparms`, `struct shfl_dirinfo`, `struct shfl_fsproperties`, `struct shfl_volinfo`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.