mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Use O_NOATIME on devices if available.
This commit is contained in:
parent
19d1e7102c
commit
60bd717971
@ -1,5 +1,6 @@
|
|||||||
Version 2.00.23 -
|
Version 2.00.23 -
|
||||||
====================================
|
====================================
|
||||||
|
Use O_NOATIME on devices if available.
|
||||||
Write log message when each segtype/format gets initialised.
|
Write log message when each segtype/format gets initialised.
|
||||||
New commands 'segtypes' and 'formats'.
|
New commands 'segtypes' and 'formats'.
|
||||||
Suppress pvmove abort message in test mode.
|
Suppress pvmove abort message in test mode.
|
||||||
|
@ -300,6 +300,12 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
|
|||||||
flags |= O_DIRECT;
|
flags |= O_DIRECT;
|
||||||
#endif
|
#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) {
|
if ((dev->fd = open(name, flags, 0777)) < 0) {
|
||||||
log_sys_error("open", name);
|
log_sys_error("open", name);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user