diff options
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/hurd.texi | 5 | ||||
-rw-r--r-- | ext2fs/ChangeLog | 5 | ||||
-rw-r--r-- | ext2fs/dir.c | 12 | ||||
-rw-r--r-- | fatfs/ChangeLog | 5 | ||||
-rw-r--r-- | fatfs/dir.c | 12 | ||||
-rw-r--r-- | libdiskfs/ChangeLog | 5 | ||||
-rw-r--r-- | libdiskfs/diskfs.h | 4 | ||||
-rw-r--r-- | libdiskfs/node-times.c | 9 | ||||
-rw-r--r-- | ufs/ChangeLog | 6 | ||||
-rw-r--r-- | ufs/dir.c | 15 | ||||
-rw-r--r-- | ufs/inode.c | 3 |
12 files changed, 57 insertions, 28 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 447eb581..35da1e0b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2007-08-16 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * hurd.texi: Document diskfs_set_node_atime. + 2007-03-16 Ben Asselstine <benasselstine@gmail.com> Thomas Schwinge <tschwinge@gnu.org> diff --git a/doc/hurd.texi b/doc/hurd.texi index 2d5ce5c5..db3bc43a 100644 --- a/doc/hurd.texi +++ b/doc/hurd.texi @@ -3928,6 +3928,11 @@ locked since). @var{dir} must always be provided as at least a hint for disk allocation strategies. @end deftypefun +@deftypefun void diskfs_set_node_atime (@w{struct node *@var{np}}) +If disk is not readonly and the noatime option is not enabled, set +@code{@var{np}->dn_set_atime}. +@end deftypefun + @deftypefun void diskfs_set_node_times (@w{struct node *@var{np}}) If @code{@var{np}->dn_set_ctime} is set, then modify @code{@var{np}->dn_stat.st_ctime} appropriately; do the analogous diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog index b6fe57b9..c450f92e 100644 --- a/ext2fs/ChangeLog +++ b/ext2fs/ChangeLog @@ -1,3 +1,8 @@ +2007-08-16 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call + diskfs_set_node_atime instead of setting dp->dn_set_atime. + 2005-07-12 Marcus Brinkmann <marcus@gnu.org> * pager.c (diskfs_get_filemap): Initialize upi->max_prot to PROT. diff --git a/ext2fs/dir.c b/ext2fs/dir.c index 334536d8..df306277 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -196,8 +196,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, inum = 0; - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); /* Start the lookup at DP->dn->dir_idx. */ idx = dp->dn->dir_idx; @@ -234,8 +233,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); @@ -778,8 +776,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred) mach_port_deallocate (mach_task_self (), memobj); assert (!err); - if (! diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); for (curoff = buf; !hit && curoff < buf + dp->dn_stat.st_size; @@ -795,8 +792,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred) hit = 1; } - if (! diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); diff --git a/fatfs/ChangeLog b/fatfs/ChangeLog index 5c9eeb5c..3348fdd6 100644 --- a/fatfs/ChangeLog +++ b/fatfs/ChangeLog @@ -1,3 +1,8 @@ +2007-08-16 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call + diskfs_set_node_atime instead of setting dp->dn_set_atime. + 2007-03-31 Thomas Schwinge <tschwinge@gnu.org> * Makefile (HURDLIBS): Put ``threads'' in front of ``ports''. diff --git a/fatfs/dir.c b/fatfs/dir.c index 78a44edc..87b9994d 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -231,8 +231,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, inum = 0; - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); /* Start the lookup at DP->dn->dir_idx. */ idx = dp->dn->dir_idx; @@ -269,8 +268,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); @@ -781,8 +779,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred) mach_port_deallocate (mach_task_self (), memobj); assert (!err); - if (! diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); for (curoff = buf; !hit && curoff < buf + dp->dn_stat.st_size; @@ -798,8 +795,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred) hit = 1; } - if (! diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index 197ec5ed..9743107e 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,8 @@ +2007-08-16 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * diskfs.h (diskfs_set_node_atime): New declaration. + * node-times.c (diskfs_set_node_atime): New function. + 2007-04-04 Thomas Schwinge <tschwinge@gnu.org> * opts-std-startup.c (parse_startup_opt) diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 70ce1e3f..8daade6f 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -864,6 +864,10 @@ error_t diskfs_clear_directory (struct node *dp, struct node *pdp, error_t diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred); +/* If disk is not readonly and the noatime option is not enabled, set + NP->dn_set_atime. */ +void diskfs_set_node_atime (struct node *np); + /* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctime appropriately; do the analogous operation for atime and mtime as well. */ void diskfs_set_node_times (struct node *np); diff --git a/libdiskfs/node-times.c b/libdiskfs/node-times.c index fa3a20a7..c36b0be6 100644 --- a/libdiskfs/node-times.c +++ b/libdiskfs/node-times.c @@ -22,6 +22,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "priv.h" #include <maptime.h> +/* If disk is not readonly and the noatime option is not enabled, set + NP->dn_set_atime. */ +void +diskfs_set_node_atime (struct node *np) +{ + if (!_disk_noatime && !diskfs_check_readonly ()) + np->dn_set_atime = 1; +} + /* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctime appropriately; do the analogous operation for atime and mtime as well. */ void diff --git a/ufs/ChangeLog b/ufs/ChangeLog index aa30e784..c7f01b7a 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +2007-08-16 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call + diskfs_set_node_atime instead of setting dp->dn_set_atime. + * inode.c (read_symlink_hook): Likewise. + 2006-03-15 Thomas Schwinge <tschwinge@gnu.org> * dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue. @@ -162,8 +162,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, inum = 0; - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); /* Start the lookup at DP->dn->dir_idx. */ idx = dp->dn->dir_idx; @@ -200,8 +199,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); @@ -752,8 +750,7 @@ diskfs_dirempty(struct node *dp, mach_port_deallocate (mach_task_self (), memobj); assert (!err); - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); for (curoff = buf; curoff < buf + dp->dn_stat.st_size; @@ -768,15 +765,13 @@ diskfs_dirempty(struct node *dp, && entry->d_name[1] != '\0'))) { munmap ((caddr_t) buf, dp->dn_stat.st_size); - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); return 0; } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); munmap ((caddr_t) buf, dp->dn_stat.st_size); diff --git a/ufs/inode.c b/ufs/inode.c index a8bb661f..228429b1 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -431,8 +431,7 @@ read_symlink_hook (struct node *np, bcopy ((dino (np->dn->number))->di_shortlink, buf, np->dn_stat.st_size); - if (! diskfs_check_readonly ()) - np->dn_set_atime = 1; + diskfs_set_node_atime (dp); diskfs_end_catch_exception (); return 0; |