Search squid archive

Re: Linux EXT3 optimizations for Squid

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

 



On 08.08.2010, Marcus Kool wrote: 

> Hmmm. maybe it is.  some messages on the internet indicate that.

Here's the relevant code of the Linux kernel (fs/inode.c), as you can see, NODIRATIME
isn't even getting checked if NOATIME is specified, the function returns
immediately.

/**
*touch_atime-update the access time
*@mnt: mount the inode is accessed on
*@dentry: dentry accessed
*
*Update the accessed time on an inode and mark it for writeback.
*This function automatically handles read only file systems and media,
*as well as the "noatime" flag and inode specific "noatime" markers.
*/

void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
  {
  struct inode *inode = dentry->d_inode;
  struct timespec now;
  
  if (inode->i_flags & S_NOATIME)
  return;
  if (IS_NOATIME(inode))
  return;
  if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
  return;
  
  if (mnt->mnt_flags & MNT_NOATIME)
  return;
  if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
  return;
  
  now = current_fs_time(inode->i_sb);
  
  if (!relatime_need_update(mnt, inode, now))
  return;
  
  if (timespec_equal(&inode->i_atime, &now))
  return;
  
  if (mnt_want_write(mnt))
  return;
  
  inode->i_atime = now;
  mark_inode_dirty_sync(inode);
  mnt_drop_write(mnt);
}


> The man page does not indicate anything but since directories are also files
> it is not unlogical that atime is a superset of nodiratime.

Yes.




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux