RE: [PATCH v1 10/11] exfat: do not sync parent dir if just update timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Namjae Jeon <linkinjeon@xxxxxxxxxx>
> Sent: Friday, December 22, 2023 1:09 PM
> > From: Yuezhang Mo <mailto:Yuezhang.Mo@xxxxxxxx>
> >
> > When sync or dir_sync is enabled, there is no need to sync the parent
> > directory's inode if only for updating its timestamp.
> >
> > 1. If an unexpected power failure occurs, the timestamp of the
> >    parent directory is not updated to the storage, which has no
> >    impact on the user.
> Well, Why do you think timestamp sync of parent dir is not important ?

If the size of the parent directory does not change (only the timestamp of
the parent directory needs to be synchronized), synchronizing the dentry
set of the parent directory is not as important as synchronizing the dentry
set of the target file.

In the case of a large number of file operations, skipping the synchronization
of the parent directory timestamp can allow the file operations to be
completed faster and shorten the file operation completion time. The risk of
user data loss is greater if there is a possibility of unexpected power outage
and the process is not completed for a long time.

By skipping the synchronization of the parent directory timestamp, even if
the parent directory timestamp is not updated due to an unexpected power
outage, the file operation will still be successful.

> >
> > 2. The number of writes will be greatly reduced, which can not
> >    only improve performance, but also prolong device life.
> How much does this have on your measurement results?

I did not measure the improvements brought by this patch alone,
the improvements brought by this patch set are listed in [0/11].

If without this patch, 2 dentry sets(the target file dentry set and the parent
dir dentry set) will be sync in a file operation.

If with this patch, 1 dentry set(the target file dentry set) will be sync in a
file operation, the parent dir dentry set will not be sync in most case.

So this patch reduces metadata synchronization by nearly half.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux