fs/nilfs2/alloc.h
Source file repositories/reference/linux-study-clean/fs/nilfs2/alloc.h
File Facts
- System
- Linux kernel
- Corpus path
fs/nilfs2/alloc.h- Extension
.h- Size
- 3299 bytes
- Lines
- 100
- 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/types.hlinux/buffer_head.hlinux/fs.h
Detected Declarations
struct nilfs_palloc_reqstruct nilfs_bh_assocstruct nilfs_palloc_cachefunction object
Annotated Snippet
struct nilfs_palloc_req {
__u64 pr_entry_nr;
struct buffer_head *pr_desc_bh;
struct buffer_head *pr_bitmap_bh;
struct buffer_head *pr_entry_bh;
};
int nilfs_palloc_prepare_alloc_entry(struct inode *inode,
struct nilfs_palloc_req *req, bool wrap);
void nilfs_palloc_commit_alloc_entry(struct inode *,
struct nilfs_palloc_req *);
void nilfs_palloc_abort_alloc_entry(struct inode *, struct nilfs_palloc_req *);
void nilfs_palloc_commit_free_entry(struct inode *, struct nilfs_palloc_req *);
int nilfs_palloc_prepare_free_entry(struct inode *, struct nilfs_palloc_req *);
void nilfs_palloc_abort_free_entry(struct inode *, struct nilfs_palloc_req *);
int nilfs_palloc_freev(struct inode *, __u64 *, size_t);
#define nilfs_set_bit_atomic ext2_set_bit_atomic
#define nilfs_clear_bit_atomic ext2_clear_bit_atomic
#define nilfs_find_next_zero_bit find_next_zero_bit_le
#define nilfs_find_next_bit find_next_bit_le
/**
* struct nilfs_bh_assoc - block offset and buffer head association
* @blkoff: block offset
* @bh: buffer head
*/
struct nilfs_bh_assoc {
unsigned long blkoff;
struct buffer_head *bh;
};
/**
* struct nilfs_palloc_cache - persistent object allocator cache
* @lock: cache protecting lock
* @prev_desc: blockgroup descriptors cache
* @prev_bitmap: blockgroup bitmap cache
* @prev_entry: translation entries cache
*/
struct nilfs_palloc_cache {
spinlock_t lock;
struct nilfs_bh_assoc prev_desc;
struct nilfs_bh_assoc prev_bitmap;
struct nilfs_bh_assoc prev_entry;
};
void nilfs_palloc_setup_cache(struct inode *inode,
struct nilfs_palloc_cache *cache);
void nilfs_palloc_clear_cache(struct inode *inode);
void nilfs_palloc_destroy_cache(struct inode *inode);
#endif /* _NILFS_ALLOC_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/buffer_head.h`, `linux/fs.h`.
- Detected declarations: `struct nilfs_palloc_req`, `struct nilfs_bh_assoc`, `struct nilfs_palloc_cache`, `function object`.
- 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.