Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 2017 14:50:36 +1030
From:      "O'Connor, Daniel" <darius@dons.net.au>
To:        Rozhuk Ivan <rozhuk.im@gmail.com>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: open(): O_EVTONLY and O_NOATIME
Message-ID:  <C49C6526-942A-44E0-9D21-BAA95C5DCDA2@dons.net.au>
In-Reply-To: <20170309031532.0079ab35@rimwks>
References:  <20170309022554.18875d07@rimwks> <20170308235016.GT30979@kib.kiev.ua> <20170309031532.0079ab35@rimwks>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 9 Mar 2017, at 10:45, Rozhuk Ivan <rozhuk.im@gmail.com> wrote:
>=20
>> consider the most often cause for atime update, read(2): VFS
>> translates the syscall through all its layers into VOP_READ() call
>> for fs-specific action, and the signature of the call is
>> 	VOP_READ(struct vnode *, struct uio *, int ioflag, struct
>> ucred *); As you see, there file is already down-casted to vnode, and
>> of course we do not want the vnode to loose atime updates just
>> because one file is opened which asked for no atime updates.  As
>> result, upper VFS layers must pass a flag to VOP_READ().
>>=20
>> You are welcome to finish the analysis and to prototype the solution.
>=20
> ????
> If file system cant be mount with NOATIME - then it already ready to =
support O_NOATIME.

Konstantin means that due to the way the file system driver gets =
requests there is no information about how they were opened in the first =
place.

This means that there is no way it could look at all the FDs which have =
this file open and see they are all noatime and then disable atime just =
for that one.

You are right in that if an FS can be mounted noatime it should be able =
to work but unfortunately there is no plumbing between the open of the =
file and the file system that supports that.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C49C6526-942A-44E0-9D21-BAA95C5DCDA2>