fs/ceph/file.c
Source file repositories/reference/linux-study-clean/fs/ceph/file.c
File Facts
- System
- Linux kernel
- Corpus path
fs/ceph/file.c- Extension
.c- Size
- 87797 bytes
- Lines
- 3259
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ceph/ceph_debug.hlinux/ceph/striper.hlinux/module.hlinux/sched.hlinux/slab.hlinux/file.hlinux/mount.hlinux/namei.hlinux/writeback.hlinux/falloc.hlinux/iversion.hlinux/ktime.hlinux/splice.hsuper.hmds_client.hcache.hio.hmetric.hsubvolume_metrics.h
Detected Declarations
struct ceph_aio_requeststruct ceph_aio_workfunction ceph_record_subvolume_iofunction ceph_flags_sys2wirefunction fsyncfunction iov_iter_get_pagesfunction put_bvecsfunction prepare_open_requestfunction ceph_init_file_infofunction ceph_init_filefunction ceph_renew_capsfunction locallyfunction cache_file_layoutfunction try_prep_async_createfunction READ_ONCEfunction restore_deleg_inofunction wake_async_create_waitersfunction ceph_async_create_cbfunction ceph_finish_async_createfunction ceph_atomic_openfunction ceph_releasefunction __ceph_sync_readfunction ceph_sync_readfunction ceph_aio_completefunction ceph_aio_complete_reqfunction ceph_aio_retry_workfunction ceph_direct_read_writefunction ceph_sync_writefunction ceph_sparse_ext_map_endfunction ceph_sparse_ext_map_endfunction ceph_read_iterfunction ceph_splice_readfunction ceph_write_iterfunction ceph_llseekfunction ceph_zero_partial_pagefunction ceph_zero_pagecache_rangefunction ceph_zero_partial_objectfunction ceph_zero_objectsfunction ceph_fallocatefunction get_rd_wr_capsfunction put_rd_wr_capsfunction is_file_size_okfunction tofunction ceph_alloc_copyfrom_requestfunction ceph_do_objects_copyfunction __ceph_copy_file_rangefunction copiesfunction ceph_copy_file_range
Annotated Snippet
const struct file_operations ceph_file_fops = {
.open = ceph_open,
.release = ceph_release,
.llseek = ceph_llseek,
.read_iter = ceph_read_iter,
.write_iter = ceph_write_iter,
.mmap_prepare = ceph_mmap_prepare,
.fsync = ceph_fsync,
.lock = ceph_lock,
.flock = ceph_flock,
.splice_read = ceph_splice_read,
.splice_write = iter_file_splice_write,
.unlocked_ioctl = ceph_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.fallocate = ceph_fallocate,
.copy_file_range = ceph_copy_file_range,
};
Annotation
- Immediate include surface: `linux/ceph/ceph_debug.h`, `linux/ceph/striper.h`, `linux/module.h`, `linux/sched.h`, `linux/slab.h`, `linux/file.h`, `linux/mount.h`, `linux/namei.h`.
- Detected declarations: `struct ceph_aio_request`, `struct ceph_aio_work`, `function ceph_record_subvolume_io`, `function ceph_flags_sys2wire`, `function fsync`, `function iov_iter_get_pages`, `function put_bvecs`, `function prepare_open_request`, `function ceph_init_file_info`, `function ceph_init_file`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.