Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 2015 12:54:59 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Julian Elischer <julian@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, alc@FreeBSD.org, arch@FreeBSD.org
Subject:   Re: more strict KPI for vm_pager_get_pages()
Message-ID:  <20150504095459.GI34544@glebius.int.ru>
In-Reply-To: <554740EF.7030808@freebsd.org>
References:  <20150430142408.GS546@nginx.com> <20150504082426.GC2390@kib.kiev.ua> <554740EF.7030808@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 04, 2015 at 05:50:39PM +0800, Julian Elischer wrote:
J> > IMO, the response from vm_pager_haspages() is only advisory, since
J> > filesystem might not control the external entities which are the source
J> > of the required data.
J> 
J> Also since the backing object is not locked, a truncate() may be performed
J> between the operations making the prior return information invalid.
J> Certainly in remote filesystems, possibly on local ones too.

Of course, the object shouldn't be unlocked between vm_pager_haspage()
and vm_pager_get_pages(). All current consumers do not unlock.

-- 
Totus tuus, Glebius.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150504095459.GI34544>