fs/adfs/adfs.h
Source file repositories/reference/linux-study-clean/fs/adfs/adfs.h
File Facts
- System
- Linux kernel
- Corpus path
fs/adfs/adfs.h- Extension
.h- Size
- 6652 bytes
- Lines
- 231
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/buffer_head.hlinux/fs.hlinux/adfs_fs.h
Detected Declarations
struct adfs_inode_infostruct adfs_discmapstruct adfs_dir_opsstruct adfs_sb_infostruct adfs_dirstruct object_infostruct adfs_dir_opsstruct adfs_discmapfunction adfs_filetypefunction adfs_inode_is_stampedfunction signed_aslfunction __adfs_block_mapfunction adfs_disc_size
Annotated Snippet
extern const struct file_operations adfs_dir_operations;
extern const struct dentry_operations adfs_dentry_operations;
extern const struct adfs_dir_ops adfs_f_dir_ops;
extern const struct adfs_dir_ops adfs_fplus_dir_ops;
int adfs_dir_copyfrom(void *dst, struct adfs_dir *dir, unsigned int offset,
size_t len);
int adfs_dir_copyto(struct adfs_dir *dir, unsigned int offset, const void *src,
size_t len);
void adfs_dir_relse(struct adfs_dir *dir);
int adfs_dir_read_buffers(struct super_block *sb, u32 indaddr,
unsigned int size, struct adfs_dir *dir);
void adfs_object_fixup(struct adfs_dir *dir, struct object_info *obj);
extern int adfs_dir_update(struct super_block *sb, struct object_info *obj,
int wait);
/* file.c */
extern const struct inode_operations adfs_file_inode_operations;
extern const struct file_operations adfs_file_operations;
static inline __u32 signed_asl(__u32 val, signed int shift)
{
if (shift >= 0)
val <<= shift;
else
val >>= -shift;
return val;
}
/*
* Calculate the address of a block in an object given the block offset
* and the object identity.
*
* The root directory ID should always be looked up in the map [3.4]
*/
static inline int __adfs_block_map(struct super_block *sb, u32 indaddr,
unsigned int block)
{
if (indaddr & 255) {
unsigned int off;
off = (indaddr & 255) - 1;
block += off << ADFS_SB(sb)->s_log2sharesize;
}
return adfs_map_lookup(sb, indaddr >> 8, block);
}
/* Return the disc record from the map */
static inline
struct adfs_discrecord *adfs_map_discrecord(struct adfs_discmap *dm)
{
return (void *)(dm[0].dm_bh->b_data + 4);
}
static inline u64 adfs_disc_size(const struct adfs_discrecord *dr)
{
return (u64)le32_to_cpu(dr->disc_size_high) << 32 |
le32_to_cpu(dr->disc_size);
}
Annotation
- Immediate include surface: `linux/buffer_head.h`, `linux/fs.h`, `linux/adfs_fs.h`.
- Detected declarations: `struct adfs_inode_info`, `struct adfs_discmap`, `struct adfs_dir_ops`, `struct adfs_sb_info`, `struct adfs_dir`, `struct object_info`, `struct adfs_dir_ops`, `struct adfs_discmap`, `function adfs_filetype`, `function adfs_inode_is_stamped`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: pattern 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.