diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-03-15 16:54:07 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-03-15 16:54:07 +0000 |
commit | 7f8251fb6ee5c780d0183db3ade7e0bd1c0d3909 (patch) | |
tree | 92229260e683dcbf2c6ab07d247bccb882d7c4f6 | |
parent | 307c966086fcf2b65ac168d1cf3ef335a2ed5310 (diff) |
(ioserver_fetch_shared_data): Implement diskfs_synchronous.
-rw-r--r-- | libdiskfs/conch-fetch.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libdiskfs/conch-fetch.c b/libdiskfs/conch-fetch.c index 164b32ea..79960efc 100644 --- a/libdiskfs/conch-fetch.c +++ b/libdiskfs/conch-fetch.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994 Free Software Foundation + Copyright (C) 1994, 1995 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -26,6 +26,7 @@ void ioserver_fetch_shared_data (void *arg) { struct protid *cred = arg; + int mod = 0; /* Don't allow the user to grow the file past the alloc size. */ if (cred->mapped->file_size > cred->po->np->allocsize) @@ -44,6 +45,7 @@ ioserver_fetch_shared_data (void *arg) { cred->po->np->dn_stat.st_size = cred->mapped->file_size; cred->po->np->dn_set_ctime = 1; + mod = 1; } } @@ -52,10 +54,19 @@ ioserver_fetch_shared_data (void *arg) if (!diskfs_readonly) { if (cred->mapped->written) - cred->po->np->dn_set_mtime = 1; + { + cred->po->np->dn_set_mtime = 1; + mod = 1; + } if (cred->mapped->accessed) - cred->po->np->dn_set_atime = 1; + { + cred->po->np->dn_set_atime = 1; + mod = 1; + } } cred->mapped->written = 0; cred->mapped->accessed = 0; + if (diskfs_synchronous && mod) + diskfs_node_update (cred->po->np, 1); } + |