![]() And the debugging messages may also be an annoying it'd be also in linux-next for a while before sending out May I ask for some extra free slots to review this patch plus > Fixes: 431339ba9042 ("staging: erofs: add inode operations") ![]() > needed for specific scenarios as well, we can also use xattrs > leaving it empty, and if mtime/atime for each file are really > Let's also derive access time from ondisk timestamp rather than > own on-disk timestamp, and squashfs only records mtime instead. > keep all timestamps on disk especially for Android scenarios > since EROFS isn't mainly for archival purposes so no need to > with a new compat feature if needed) for each extended inode > documented and recorded, we might also record mtime instead > EROFS has _only one_ ondisk timestamp (ctime is currently To: Chao Yu, Chao Yu +Cc: linux-erofs, LKML, nl6720, stable 0:57 ` Chao Yu 1 sibling, 1 reply 5+ messages in thread 19:51 ` erofs: derive atime instead of leaving it empty Gao 2:50 ` Gao Xiang * Re: erofs: derive atime instead of leaving it empty Inode->i_blocks = roundup(inode->i_size, EROFS_BLKSIZ) > 9 * measure inode.i_blocks as generic filesystems */ If -167,6 +163,11 static struct page *erofs_read_inode(struct inode *inode, Inode->i_size = le32_to_cpu(dic->i_size) + /* use build time for compact inodes */ * use build time to derive all file time */ Set_nlink(inode, le16_to_cpu(dic->i_nlink)) I_gid_write(inode, le16_to_cpu(dic->i_gid)) Inode->i_size = -149,11 +147,9 static struct page *erofs_read_inode(struct inode *inode, + inode->i_nsec = le32_to_cpu(die->i_ctime_nsec) + /* extended inode has its own timestamp */ Set_nlink(inode, le32_to_cpu(die->i_nlink)) I_gid_write(inode, le32_to_cpu(die->i_gid)) +++ -107,11 +107,9 static struct page *erofs_read_inode(struct inode *inode, Needed for specific scenarios as well, we can also use xattrsįixes: 431339ba9042 ("staging: erofs: add inode operations")įs/erofs/inode.c | 21 +++++++++++-ġ file changed, 11 insertions(+), 10 deletions(-)ĭiff -git a/fs/erofs/inode.c b/fs/erofs/inode.c Leaving it empty, and if mtime/atime for each file are really Let's also derive access time from ondisk timestamp rather than Own on-disk timestamp, and squashfs only records mtime instead. Keep all timestamps on disk especially for Android scenariosĭue to security concerns. Since EROFS isn't mainly for archival purposes so no need to With a new compat feature if needed) for each extended inode To: linux-erofs, Chao Yu, Chao Yu +Cc: LKML, Gao Xiang, nl6720, stableĮROFS has _only one_ ondisk timestamp (ctime is currentlyĭocumented and recorded, we might also record mtime instead ![]() 0:57 ` Chao Yu 0 siblings, 2 replies 5+ messages in thread I will demonstrate this by the following example.Erofs: derive atime instead of leaving it empty LKML Archive on help / color / mirror / Atom feed * erofs: derive atime instead of leaving it empty The ctime gets updated when the file attributes are changed, like changing the owner, changing the permission or moving the file to another filesystem but will also be updated when you modify a file. Whenever anything about a file changes (except its access time), it’s ctime changes. Now, the modification can be in terms of its content or in terms of its attributes. The file may have been opened by you, or may have been accessed by some other program such as issuing commands or a remote machine.Īnytime a file has been accessed, file access time changes.Ĭtime (change time) is the timestamp of a file that indicates the time that it was changed. In that case only the ctime gets updated.Ītime (access time) is the timestamp that indicates the time that a file has been accessed. Most of the times ctime and mtime will be the same, unless only the file attributes are updated. If you change a file’s attribute (like read-write permissions, metadata), it’s mtime doesn’t change, but ctime will be updated. Mtime (modification time) indicates the timestamp that the contents of the file has been changed.įor instance, if you open a file and change some (or all) of its content, its mtime gets updated. The below mentioned 3 times is all we have in unix. ctime means inode/file change time.įile created time is not tracked anywhere in unix, so you can’t really determine it. A common misunderstanding is ‘ctime is file creation time’, but this is not true. Mtime, atime, and ctime are timestamps associated with the modification, access and change of any file in unix.
0 Comments
Leave a Reply. |