netfs_read_remote_i_size(9)
π NAME π
netfs_read_remote_i_size β bestie, this one reads remote_i_size safely, no cap π«Ά
β¨ SYNOPSIS β¨
unsigned long long netfs_read_remote_i_size (const struct inode *inode);
π ARGUMENTS π
inodeβ the inode you wanna access, that's literally it π
π¦ DESCRIPTION π¦
Okay so picture this: you just want the remote_i_size, right? And this function hands it to you safely, without any of that tearing nonsense that can happen on 32-bit arches πβ¨ Like it's giving "trust me, I've got you" energy. Iconic behavior, honestly.
πΈ NOTE πΈ
Alright bestie, sit down for this one because it's a whole saga π
So on a 32-bit arch with a preemptable kernel and an UP compile, i_size_read/i_size_write must be atomic with respect to the local CPU β and that's unlike the preempt-disabled situation. 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 still be implemented as a cmpxchg8b without needing the lock prefix π₯
And for SMP compiles and 64-bit archs? It makes no difference whether preempt is enabled or not. Periodt. π
π SEE ALSO π
Kernel file ./include/linux/netfs.h β plus the whole friend group:
folio_start_private_2(9)netfs_inode(9)netfs_read_zero_point(9)netfs_read_sizes(9)netfs_inode_init(9)netfs_resize_file(9)netfs_i_cookie(9)netfs_wait_for_outstanding_io(9)
π§ okay that's the whole page, go touch some grass (after you read the source, obviously)
Kisses from ./include/linux, dated October 2026, and this lil page's name is netfs_read_remote_i_size(9) β catch you in the next manpage, bestie! π
π¦ 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