Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-28 20:08:00
Last Modify:2020-03-18 19:19:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mestamp_truncate - Truncate timespec to a granularity*@t: Timespec*@inode: inode being updated* Truncate a timespec to the granularity supported by the fs* containing the inode. Always rounds down. gran must

Proto:struct timespec64 timestamp_truncate(struct timespec64 t, struct inode *inode)

Type:struct timespec64

Parameter:

TypeParameterName
struct timespec64t
struct inode *inode
2190  sb = i_sb
2191  gran = s_time_gran
2193  seconds = clamp - return a value clamped to a given range with strict typechecking*@val: current value*@lo: lowest allowable value*@hi: highest allowable value* This macro does strict typechecking of @lo/@hi to make sure they are of the* same type as @val( seconds , s_time_min, s_time_max)
2194  If Value for the false possibility is greater at compile time( seconds == s_time_max || seconds == s_time_min) Then nanoseconds = 0
2198  If gran == 1 Then Else if gran == NSEC_PER_SEC Then
2201  nanoseconds = 0
2202  Else if gran > 1 && gran < NSEC_PER_SEC Then nanoseconds -= nanoseconds % gran
2204  Else WARN(1, "invalid file time granularity: %u", gran)
2206  Return t
Caller
NameDescribe
current_timerrent_time - Return FS time*@inode: inode.* Return the current time truncated to the time granularity supported by* the fs.* Note that inode and inode->sb cannot be NULL.* Otherwise, the function warns and returns time without truncation.
notify_changey_change - modify attributes of a filesytem object*@dentry: object affected*@attr: new attributes*@delegated_inode: returns inode, if the inode is delegated* The caller must hold the i_mutex on the affected object