Group discussion of what a file size is
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 122
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
This is a placeholder to discuss what file sizes are (implied and explicit). The current status looks like the following:
```
fid_logical_size() -- returns meta->global_size if laminated, else meta->local_size
- lseek(SEEK_END)
- fseek(SEEK_END)
- stream_write on stream opened with APPEND
- write() on fd opened in APPEND mode
- fid_open(O_APPEND) and file is defined locally and globally
- fd_read to check that read is not reading past end of file
invoke_client_filesize_rpc()
- get_meta_with_size, if file not laminated
- fd_logreadlist (if nread < length)
- __chmod on lamination
get_meta_with_size() -- invokes filesize_rpc if not laminated
- __stat
fid_update_file_meta() -- updates meta->global_size and meta->local_size if laminated
- fid_open, if global meta is found
- __stat, after call to get_meta_with_size
set_global_file_meta_from_fid() -- sets KV size field=meta->global_size if laminated, 0 otherwise
- fid_create_directory
- fid_open, if file not found in global meta
- __chmod ** chmod type of operations will effectively break new truncate maker
truncate_rpc sets KV size field
- fid_truncate
-- fid_unlink
-- fid_open(O_TRUNC) and file is defined locally and globally
-- truncate ** fid may not be defined yet (error)
-- ftruncate
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or concrete entry point is named. Start by reviewing the listed functions and operations, including fid_logical_size(), get_meta_with_size(), fid_update_file_meta(), and truncate_rpc. Done requires a maintainer-agreed definition of file-size semantics and consistent handling across the listed paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100