netfs_read_remote_i_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:


🧚 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