Step 2 Was: more strict KPI for vm_pager_get_pages()

Konstantin Belousov kostikbel at gmail.com
Thu Jun 18 12:34:21 UTC 2015


On Tue, Jun 16, 2015 at 12:29:31AM +0300, Gleb Smirnoff wrote:
>   Hi!
> 
>   This is step 2 of the "more strict pager KPI" patch:
> 
> o Uninline vm_pager_get_pages() into vm_pager.c.
> o Keep all KASSERTs that enforce the KPI of pagers and of their
>   consumers in one place: vm_pager_get_pages().
> o Keep the code that zeroes out partially valid pages in one
>   place in vm_pager_get_pages().
> 
I added Rick to Cc:, since there is something which I do not quite
understand in the NFS client code. According to NFS v3 RFC, server may
reply with the short read for a read RPC. In case the EOF flag is not
set in the reply, this means that the data is available, and it is a
transient server condition that reply was truncated.

Do we handle the short reads ?  I see the code in nfs read path which
zeroes the absent parts of the buffer.  Similarly, there is a code to
zero the unread part of the page after VOP_GETPAGES().  But couldn't
this result in the zeros instead of real data after the short read ?

At least, I was not able to find code which would retry after reply
without EOF.


More information about the freebsd-arch mailing list