1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Use O_NOATIME on devices if available.

This commit is contained in:
Alasdair Kergon 2004-09-14 22:23:23 +00:00
parent 798dc9948b
commit 4ed924d7c7
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.00.23 -
====================================
Use O_NOATIME on devices if available.
Write log message when each segtype/format gets initialised.
New commands 'segtypes' and 'formats'.
Suppress pvmove abort message in test mode.

View File

@ -300,6 +300,12 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
flags |= O_DIRECT;
#endif
#ifdef O_NOATIME
/* Don't update atime on device inodes */
if (!(dev->flags & DEV_REGULAR))
flags |= O_NOATIME;
#endif
if ((dev->fd = open(name, flags, 0777)) < 0) {
log_sys_error("open", name);
return 0;