9p: introduce the V9fsDir type

If we are to switch back to readdir(), we need a more complex type than
DIR * to be able to serialize concurrent accesses to the directory stream.

This patch introduces a placeholder type and fixes all users.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
This commit is contained in:
Greg Kurz 2016-06-06 11:52:34 +02:00
parent 8762a46d36
commit f314ea4e30
5 changed files with 39 additions and 35 deletions

View file

@ -167,13 +167,17 @@ typedef struct V9fsXattr
int flags;
} V9fsXattr;
typedef struct V9fsDir {
DIR *stream;
} V9fsDir;
/*
* Filled by fs driver on open and other
* calls.
*/
union V9fsFidOpenState {
int fd;
DIR *dir;
V9fsDir dir;
V9fsXattr xattr;
/*
* private pointer for fs drivers, that