am-utils: Recent Linux wants the parent ctime to change as well.

This commit is contained in:
Mark Davies 2016-05-13 09:02:36 +12:00
parent b06e4b468a
commit f3b2023bb9
2 changed files with 39 additions and 0 deletions

View file

@ -5,5 +5,6 @@ RMD160 (am-utils-6.2.tar.gz) = 49444d4ca7c0131dcdb82967b9df2ff06de13830
SHA512 (am-utils-6.2.tar.gz) = 868b662b113cffabb32ae88731e877e4c9830adf454f7e23d9bd033b534745e0e7b75619c6d7fa58ae13fa67dd588f4a789f53e452d0b4ffde90f3a3ed03de34
Size (am-utils-6.2.tar.gz) = 2297161 bytes
SHA1 (patch-aa) = 51ce9ff8724a190ab4bcae8f70af2006685f7ad4
SHA1 (patch-amd_autil.c) = ee8b1908768b00790e339a32182ba0a17254155f
SHA1 (patch-fsinfo_Makefile.in) = 4d8e4642ebd9dfc2b504af2477c34a89c9cf1768
SHA1 (patch-ylwrap.amd) = e30de2720929bf70cfd1bcdd6a9e02cedf7d615b

View file

@ -0,0 +1,38 @@
$NetBSD$
Linux wants the parent ctime to change as well.
--- ./amd/autil.c.orig 2014-10-28 17:12:59.000000000 +0000
+++ ./amd/autil.c
@@ -183,6 +183,7 @@ forcibly_timeout_mp(am_node *mp)
* more.
*/
clocktime(&mp->am_parent->am_fattr.na_mtime);
+ mp->am_parent->am_fattr.na_ctime = mp->am_parent->am_fattr.na_mtime;
reschedule_timeout_mp();
}
}
@@ -312,8 +313,10 @@ am_mounted(am_node *mp)
/*
* Update mtime of parent node (copying "struct nfstime" in '=' below)
*/
- if (mp->am_parent && mp->am_parent->am_al->al_mnt)
+ if (mp->am_parent && mp->am_parent->am_al->al_mnt) {
mp->am_parent->am_fattr.na_mtime = mp->am_fattr.na_mtime;
+ mp->am_parent->am_fattr.na_ctime = mp->am_fattr.na_mtime;
+ }
/*
* This is ugly, but essentially unavoidable
@@ -711,8 +714,10 @@ am_unmounted(am_node *mp)
/*
* Update mtime of parent node
*/
- if (mp->am_parent && mp->am_parent->am_al->al_mnt)
+ if (mp->am_parent && mp->am_parent->am_al->al_mnt) {
clocktime(&mp->am_parent->am_fattr.na_mtime);
+ mp->am_parent->am_fattr.na_ctime = mp->am_parent->am_fattr.na_mtime;
+ }
if (mp->am_parent && (mp->am_flags & AMF_REMOUNT)) {
char *fname = xstrdup(mp->am_name);