[Unionfs] Possible timestamp related problem.
John Nielsen
junx_dk at hotmail.com
Sun Dec 9 16:09:07 EST 2007
Erez,
I'm sorry to report that your patch didnt work. I applied it to unionfs-2.1.10 and also tried unionfs-2.1.11. It appeared that the patch was already applied to this version however. Neither versions solved my problem.
Were you able to reproduce the issue yourself?
Kind regards,
John
> Date: Fri, 7 Dec 2007 19:39:08 -0500> From: ezk at cs.sunysb.edu> To: junx_dk at hotmail.com> Subject: Re: [Unionfs] Possible timestamp related problem. > CC: unionfs at fsl.cs.sunysb.edu> > John, can you try the following patch and let me know how it works?> > Thanks,> Erez.> > > > diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c> index 05d9914..7d27987 100644> --- a/fs/unionfs/dentry.c> +++ b/fs/unionfs/dentry.c> @@ -195,9 +195,11 @@ out:> * file system doesn't change its inode times quick enough, resulting in a> * false positive indication (which is harmless, it just makes unionfs do> * extra work in re-validating the objects). To minimize the chances of> - * these situations, we delay the detection of changed times by> - * UNIONFS_MIN_CC_TIME (which defaults to 3 seconds, as with NFS's> - * acregmin).> + * these situations, we still consider such small time changes valid, but we> + * don't print debugging messages unless the time changes are greater than> + * UNIONFS_MIN_CC_TIME (which defaults to 3 seconds, as with NFS's acregmin)> + * because significant changes are more likely due to users manually> + * touching lower files.> */> bool is_newer_lower(const struct dentry *dentry)> {> @@ -219,20 +221,26 @@ bool is_newer_lower(const struct dentry *dentry)> continue;> > /* check if mtime/ctime have changed */> - if (unlikely((lower_inode->i_mtime.tv_sec -> - inode->i_mtime.tv_sec) > UNIONFS_MIN_CC_TIME)) {> - pr_info("unionfs: new lower inode mtime "> - "(bindex=%d, name=%s)\n", bindex,> - dentry->d_name.name);> - show_dinode_times(dentry);> + if (unlikely(timespec_compare(&inode->i_mtime,> + &lower_inode->i_mtime) < 0)) {> + if ((lower_inode->i_mtime.tv_sec -> + inode->i_mtime.tv_sec) > UNIONFS_MIN_CC_TIME) {> + pr_info("unionfs: new lower inode mtime "> + "(bindex=%d, name=%s)\n", bindex,> + dentry->d_name.name);> + show_dinode_times(dentry);> + }> return true;> }> - if (unlikely((lower_inode->i_ctime.tv_sec -> - inode->i_ctime.tv_sec) > UNIONFS_MIN_CC_TIME)) {> - pr_info("unionfs: new lower inode ctime "> - "(bindex=%d, name=%s)\n", bindex,> - dentry->d_name.name);> - show_dinode_times(dentry);> + if (unlikely(timespec_compare(&inode->i_ctime,> + &lower_inode->i_ctime) < 0)) {> + if ((lower_inode->i_ctime.tv_sec -> + inode->i_ctime.tv_sec) > UNIONFS_MIN_CC_TIME) {> + pr_info("unionfs: new lower inode ctime "> + "(bindex=%d, name=%s)\n", bindex,> + dentry->d_name.name);> + show_dinode_times(dentry);> + }> return true;> }> }> _______________________________________________> unionfs mailing list: http://unionfs.filesystems.org/> unionfs at mail.fsl.cs.sunysb.edu> http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
_________________________________________________________________
Få nye spil til din Messenger
http://www.messengerplayground.dk/?cmp=hotmail_tagline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.fsl.cs.sunysb.edu/pipermail/unionfs/attachments/20071209/58812b4c/attachment.htm
More information about the unionfs
mailing list