xen/hypfs: add getsize() and findentry() callbacks to hypfs_funcs
authorJuergen Gross <jgross@suse.com>
Fri, 4 Dec 2020 07:31:25 +0000 (08:31 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Dec 2020 07:31:25 +0000 (08:31 +0100)
commitbe3755af37263833cb3b1c6b1f2ba219bdf97ec3
tree2a16e551950a9a6ac2a1d2166cdad2fd59f9afa2
parentf1b920bb06c6fb3bdad8a483fb6ecf5c76069799
xen/hypfs: add getsize() and findentry() callbacks to hypfs_funcs

Add a getsize() function pointer to struct hypfs_funcs for being able
to have dynamically filled entries without the need to take the hypfs
lock each time the contents are being generated.

For directories add a findentry callback to the vector and modify
hypfs_get_entry_rel() to use it. For its non-directory node counterpart
introduce the so far unused and hence missing ENOTDIR error code.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/hypfs.c
xen/include/public/errno.h
xen/include/xen/hypfs.h