fs/afs/yfsclient.c
Source file repositories/reference/linux-study-clean/fs/afs/yfsclient.c
File Facts
- System
- Linux kernel
- Corpus path
fs/afs/yfsclient.c- Extension
.c- Size
- 57153 bytes
- Lines
- 2233
- 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.
- 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/init.hlinux/slab.hlinux/sched.hlinux/circ_buf.hlinux/iversion.hinternal.hafs_fs.hxdr_fs.hprotocol_yfs.h
Detected Declarations
function Copyrightfunction xdr_strlenfunction linux_to_yfs_timefunction yfs_time_to_linuxfunction xdr_to_timefunction yfs_check_reqfunction xdr_dump_badfunction xdr_decode_YFSFetchStatusfunction xdr_decode_YFSCallBackfunction xdr_decode_YFSVolSyncfunction xdr_decode_YFSFetchVolumeStatusfunction yfs_deliver_status_and_volsyncfunction yfs_deliver_fs_fetch_data64function yfs_fs_fetch_datafunction yfs_deliver_fs_create_vnodefunction yfs_fs_create_filefunction yfs_fs_make_dirfunction yfs_deliver_fs_remove_file2function yfs_done_fs_remove_file2function yfs_fs_remove_file2function yfs_deliver_fs_removefunction yfs_fs_remove_filefunction yfs_fs_remove_dirfunction yfs_deliver_fs_linkfunction yfs_fs_linkfunction yfs_deliver_fs_symlinkfunction yfs_fs_symlinkfunction yfs_deliver_fs_renamefunction yfs_fs_renamefunction yfs_deliver_fs_rename_1function yfs_deliver_fs_rename_2function yfs_done_fs_rename_replacefunction yfs_fs_rename_replacefunction yfs_fs_rename_noreplacefunction yfs_fs_rename_exchangefunction yfs_fs_store_datafunction yfs_fs_setattr_sizefunction yfs_fs_setattrfunction yfs_deliver_fs_get_volume_statusfunction yfs_fs_get_volume_statusfunction yfs_fs_set_lockfunction yfs_fs_extend_lockfunction yfs_fs_release_lockfunction yfs_deliver_fs_fetch_statusfunction yfs_fs_fetch_statusfunction yfs_deliver_fs_inline_bulk_statusfunction yfs_fs_inline_bulk_statusfunction yfs_deliver_fs_fetch_opaque_acl
Annotated Snippet
switch (call->count) {
case 0:
scb = &op->file[0].scb;
break;
case 1:
scb = &op->file[1].scb;
break;
default:
scb = &op->more_files[call->count - 2].scb;
break;
}
bp = call->buffer;
xdr_decode_YFSFetchStatus(&bp, call, scb);
call->count++;
if (call->count < op->nr_files)
goto more_counts;
call->count = 0;
call->unmarshall++;
afs_extract_to_tmp(call);
fallthrough;
/* Extract the callback count and array in two steps */
case 3:
_debug("extract CB count");
ret = afs_extract_data(call, true);
if (ret < 0)
return ret;
tmp = ntohl(call->tmp);
_debug("CB count: %u", tmp);
if (tmp != op->nr_files)
return afs_protocol_error(call, afs_eproto_ibulkst_cb_count);
call->count = 0;
call->unmarshall++;
more_cbs:
afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSCallBack));
fallthrough;
case 4:
_debug("extract CB array");
ret = afs_extract_data(call, true);
if (ret < 0)
return ret;
_debug("unmarshall CB array");
switch (call->count) {
case 0:
scb = &op->file[0].scb;
break;
case 1:
scb = &op->file[1].scb;
break;
default:
scb = &op->more_files[call->count - 2].scb;
break;
}
bp = call->buffer;
xdr_decode_YFSCallBack(&bp, call, scb);
call->count++;
if (call->count < op->nr_files)
goto more_cbs;
afs_extract_to_buf(call, sizeof(struct yfs_xdr_YFSVolSync));
call->unmarshall++;
fallthrough;
case 5:
ret = afs_extract_data(call, false);
if (ret < 0)
return ret;
bp = call->buffer;
xdr_decode_YFSVolSync(&bp, &op->volsync);
call->unmarshall++;
fallthrough;
case 6:
break;
}
_leave(" = 0 [done]");
return 0;
}
/*
Annotation
- Immediate include surface: `linux/init.h`, `linux/slab.h`, `linux/sched.h`, `linux/circ_buf.h`, `linux/iversion.h`, `internal.h`, `afs_fs.h`, `xdr_fs.h`.
- Detected declarations: `function Copyright`, `function xdr_strlen`, `function linux_to_yfs_time`, `function yfs_time_to_linux`, `function xdr_to_time`, `function yfs_check_req`, `function xdr_dump_bad`, `function xdr_decode_YFSFetchStatus`, `function xdr_decode_YFSCallBack`, `function xdr_decode_YFSVolSync`.
- 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.