include/linux/exportfs_block.h
Source file repositories/reference/linux-study-clean/include/linux/exportfs_block.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/exportfs_block.h- Extension
.h- Size
- 2569 bytes
- Lines
- 89
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- 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/blkdev.hlinux/exportfs.hlinux/fs.h
Detected Declarations
struct inodestruct iomapstruct super_blockstruct exportfs_block_opsfunction exportfs_bdev_supports_out_of_band_idfunction exportfs_layouts_supportedfunction exportfs_layouts_supported
Annotated Snippet
struct exportfs_block_ops {
/*
* Returns the EXPFS_BLOCK_* bitmap of supported layout types.
*/
expfs_block_layouts_t (*layouts_supported)(struct super_block *sb);
/*
* Get the in-band device unique signature exposed to clients.
*/
int (*get_uuid)(struct super_block *sb, u8 *buf, u32 *len, u64 *offset);
/*
* Map blocks for direct block access.
* If @write is %true, also allocate the blocks for the range if needed.
*/
int (*map_blocks)(struct inode *inode, loff_t offset, u64 len,
struct iomap *iomap, bool write,
u32 *device_generation);
/*
* Commit blocks previously handed out by ->map_blocks and written to by
* the client.
*/
int (*commit_blocks)(struct inode *inode, struct iomap *iomaps,
int nr_iomaps, loff_t new_size);
};
static inline bool
exportfs_bdev_supports_out_of_band_id(struct block_device *bdev)
{
return bdev->bd_disk->fops->pr_ops &&
bdev->bd_disk->fops->get_unique_id;
}
#ifdef CONFIG_EXPORTFS_BLOCK_OPS
static inline expfs_block_layouts_t
exportfs_layouts_supported(struct super_block *sb)
{
const struct exportfs_block_ops *bops = sb->s_export_op->block_ops;
if (!bops ||
!bops->layouts_supported ||
WARN_ON_ONCE(!bops->map_blocks) ||
WARN_ON_ONCE(!bops->commit_blocks))
return 0;
return bops->layouts_supported(sb);
}
#else
static inline expfs_block_layouts_t
exportfs_layouts_supported(struct super_block *sb)
{
return 0;
}
#endif /* CONFIG_EXPORTFS_BLOCK_OPS */
#endif /* LINUX_EXPORTFS_BLOCK_H */
Annotation
- Immediate include surface: `linux/blkdev.h`, `linux/exportfs.h`, `linux/fs.h`.
- Detected declarations: `struct inode`, `struct iomap`, `struct super_block`, `struct exportfs_block_ops`, `function exportfs_bdev_supports_out_of_band_id`, `function exportfs_layouts_supported`, `function exportfs_layouts_supported`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.