Lines Matching refs:i_version

8  * The inode->i_version field:
10 * The change attribute (i_version) is mandated by NFSv4 and is mostly for
11 * knfsd, but is also used for other purposes (e.g. IMA). The i_version must
16 * inode status change time (aka ctime). i_version must appear to change, even
19 * ctime must change due to an operation, then the i_version counter must be
22 * Making the i_version update completely atomic with the operation itself would
28 * i_version is to allow for better cache coherency, the i_version must always
33 * Observers see the i_version as a 64-bit number that never decreases. If it
39 * Not all filesystems properly implement the i_version counter. Subsystems that
40 * want to use i_version field on an inode should first check whether the
43 * Those that set SB_I_VERSION will automatically have their i_version counter
47 * i_version on namespace changes in directories (mkdir, rmdir, unlink, etc.).
48 * We consider these sorts of filesystems to have a kernel-managed i_version.
50 * It may be impractical for filesystems to keep i_version updates atomic with
52 * that i_version updates are never visible before the changes that caused
53 * them. Also, i_version updates should never be delayed longer than it takes
56 * This implementation uses the low bit in the i_version field as a flag to
61 * bump the i_version anyway. Since that has to go to stable storage in some
71 * have a self-managed i_version.
73 * Persistently storing the i_version
75 * Queries of the i_version field are not gated on them hitting the backing
90 * We borrow the lowest bit in the i_version to use as a flag to tell whether
100 * inode_set_iversion_raw - set i_version to the specified raw value
102 * @val: new i_version value to set
104 * Set @inode's i_version field to @val. This function is for use by
105 * filesystems that self-manage the i_version.
113 atomic64_set(&inode->i_version, val);
118 * @inode: inode from which i_version should be read
120 * Grab a "raw" inode->i_version value and return it. The i_version is not
122 * i_version.
124 * With those filesystems, we want to treat the i_version as an entirely
130 return atomic64_read(&inode->i_version);
134 * inode_set_max_iversion_raw - update i_version new value is larger
136 * @val: new i_version to set
138 * Some self-managed filesystems (e.g Ceph) will only update the i_version
149 } while (!atomic64_try_cmpxchg(&inode->i_version, &cur, val));
153 * inode_set_iversion - set i_version to a particular value
155 * @val: new i_version value to set
157 * Set @inode's i_version field to @val. This function is for filesystems with
158 * a kernel-managed i_version, for initializing a newly-created inode from
171 * inode_set_iversion_queried - set i_version to a particular value as quereied
173 * @val: new i_version value to set
175 * Set @inode's i_version field to @val, and flag it for increment on the next
178 * Filesystems that persistently store the i_version on disk should use this
181 * When loading in an i_version value from a backing store, we can't be certain
196 * inode_inc_iversion - forcibly increment i_version
199 * Forcbily increment the i_version field. This always results in a change to
209 * inode_iversion_need_inc - is the i_version in need of being incremented?
212 * Returns whether the inode->i_version counter needs incrementing on the next
222 * inode_inc_iversion_raw - forcibly increment raw i_version
225 * Forcbily increment the raw i_version field. This always results in a change
228 * NFS will use the i_version field to store the value from the server. It
235 atomic64_inc(&inode->i_version);
239 * inode_peek_iversion - read i_version without flagging it to be incremented
240 * @inode: inode from which i_version should be read
242 * Read the inode i_version counter for an inode without registering it as a
245 * This is typically used by local filesystems that need to store an i_version
271 * inode_eq_iversion_raw - check whether the raw i_version counter has changed
273 * @old: old value to check against its i_version
275 * Compare the current raw i_version counter with a previous one. Returns true
285 * inode_eq_iversion - check whether the i_version counter has changed
287 * @old: old value to check against its i_version
289 * Compare an i_version counter with a previous one. Returns true if they are