fs/btrfs/defrag.h
Source file repositories/reference/linux-study-clean/fs/btrfs/defrag.h
File Facts
- System
- Linux kernel
- Corpus path
fs/btrfs/defrag.h- Extension
.h- Size
- 927 bytes
- Lines
- 32
- 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/compiler_types.h
Detected Declarations
struct file_ra_statestruct btrfs_inodestruct btrfs_fs_infostruct btrfs_rootstruct btrfs_trans_handlestruct btrfs_ioctl_defrag_range_argsfunction btrfs_defrag_cancelled
Annotated Snippet
#ifndef BTRFS_DEFRAG_H
#define BTRFS_DEFRAG_H
#include <linux/types.h>
#include <linux/compiler_types.h>
struct file_ra_state;
struct btrfs_inode;
struct btrfs_fs_info;
struct btrfs_root;
struct btrfs_trans_handle;
struct btrfs_ioctl_defrag_range_args;
int btrfs_defrag_file(struct btrfs_inode *inode, struct file_ra_state *ra,
struct btrfs_ioctl_defrag_range_args *range,
u64 newer_than, unsigned long max_to_defrag);
int __init btrfs_auto_defrag_init(void);
void __cold btrfs_auto_defrag_exit(void);
void btrfs_add_inode_defrag(struct btrfs_inode *inode, u32 extent_thresh);
int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info);
void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info);
int btrfs_defrag_root(struct btrfs_root *root);
static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info)
{
return signal_pending(current);
}
#endif
Annotation
- Immediate include surface: `linux/types.h`, `linux/compiler_types.h`.
- Detected declarations: `struct file_ra_state`, `struct btrfs_inode`, `struct btrfs_fs_info`, `struct btrfs_root`, `struct btrfs_trans_handle`, `struct btrfs_ioctl_defrag_range_args`, `function btrfs_defrag_cancelled`.
- 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.