netfs_read_zero_point(9)
π netfs_read_zero_point(9) π
okay so bestie, we're deep in the Kernel API Manual today and this one is a lil function called netfs_read_zero_point β think of it as the safe little gremlin that reads a value without letting anything tear mid-read π«Ά
β¨ NAME β¨
netfs_read_zero_point β read zero_point safely. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
unsigned long long netfs_read_zero_point (const struct inode *inode );
like yes, it returns an unsigned long long and it takes one const struct inode * and honestly? iconic of it π
β¨ ARGUMENTS β¨
inodeβ the inode you wanna access, bestie. the thing you're reaching into. the main character of this whole call π«
β¨ DESCRIPTION β¨
so what it actually does is read zero_point safely, without the potential for tearing on 32-bit arches π no cap, that's the entire job. no tearing, no drama, just a clean read π₯
π NOTE π
okay this is the part where we get real technical, so buckle up bestie π
in a 32bit arch with a preemptable kernel and an UP compile, the i_size_read/write must be atomic with respect to the local cpu (unlike with preempt disabled), but they don't need to be atomic with respect to other cpus like in true SMP (so they need either to locally disable irq around the read or for example on x86 they can be still implemented as a cmpxchg8b without the need of the lock prefix). for SMP compiles and 64bit archs it makes no difference if preempt is enabled or not π§β¨
ngl this paragraph is a whole mood and also a whole warning about atomicity, so don't skip it just because it's a wall of text, iykyk π«Ά
π₯ SEE ALSO π₯
all the sibling functions and that one header file, linked together like a little found family π
- kernel file
./include/linux/netfs.h folio_start_private_2(9)netfs_inode(9)netfs_read_remote_i_size(9)netfs_read_sizes(9)netfs_inode_init(9)netfs_resize_file(9)netfs_i_cookie(9)netfs_wait_for_outstanding_io(9)
and that's a wrap, bestie π this lil page lives under ./include/linux, dated October 2026 β slay, go forth and read your zero_point safely π
πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms