qemu-e2k/hw/9pfs
Greg Kurz 20b7f45b22 9pfs: Improve unreclaim loop
If a fid was actually re-opened by v9fs_reopen_fid(), we re-traverse the
fid list from the head in case some other request created a fid that
needs to be marked unreclaimable as well (i.e. the client opened a new
handle on the path that is being unlinked). This is suboptimal since
most if not all fids that require it have likely been taken care of
already.

This is mostly the result of new fids being added to the head of the
list. Since the list is now a QSIMPLEQ, add new fids at the end instead
to avoid the need to rewind. Take a reference on the fid to ensure it
doesn't go away during v9fs_reopen_fid() and that it can be safely
passed to QSIMPLEQ_NEXT() afterwards. Since the associated put_fid()
can also yield, same is done with the next fid. So the logic here is
to get a reference on a fid and only put it back during the next
iteration after we could get a reference on the next fid.

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20210121181510.1459390-1-groug@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
2021-01-22 15:17:19 +01:00
..
9p-local.c hw/9pfs : add spaces around operator 2020-11-05 15:14:03 +01:00
9p-local.h
9p-posix-acl.c
9p-proxy.c 9pfs/proxy: Check return value of proxy_marshal() 2021-01-21 17:49:45 +01:00
9p-proxy.h
9p-synth.c 9pfs: suppress performance warnings on qtest runs 2020-10-19 14:25:40 +02:00
9p-synth.h
9p-util.c
9p-util.h
9p-xattr-user.c
9p-xattr.c
9p-xattr.h
9p.c 9pfs: Improve unreclaim loop 2021-01-22 15:17:19 +01:00
9p.h 9pfs: Convert V9fsFidState::fid_list to QSIMPLEQ 2021-01-21 17:49:45 +01:00
codir.c
cofile.c
cofs.c hw/9pfs : add space before the open parenthesis '(' 2020-11-05 15:14:03 +01:00
coth.c
coth.h
coxattr.c
Kconfig hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen 2020-11-05 15:21:11 +01:00
meson.build hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen 2020-11-05 15:21:11 +01:00
trace-events
trace.h
virtio-9p-device.c 9pfs: suppress performance warnings on qtest runs 2020-10-19 14:25:40 +02:00
virtio-9p.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
xen-9p-backend.c
xen-9pfs.h