mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c81e7219e0
With a valid file ID (FID) of an open file, it should be possible to send
a 'Tgettattr' 9p request and successfully receive a 'Rgetattr' response,
even if the file has been removed in the meantime. Currently this would
fail with ENOENT.
I.e. this fixes the following misbehaviour with a 9p Linux client:
open("/home/tst/filename", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
unlink("/home/tst/filename") = 0
fstat(3, 0x23aa1a8) = -1 ENOENT (No such file or directory)
Expected results:
open("/home/tst/filename", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
unlink("/home/tst/filename") = 0
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
This is because 9p server is always using a path name based lstat() call
which fails as soon as the file got removed. So to fix this, use fstat()
whenever we have an open file descriptor already.
Fixes:
|
6 days ago | |
---|---|---|
.. | ||
9p-local.c | 1 year ago | |
9p-local.h | ||
9p-posix-acl.c | 3 years ago | |
9p-synth.c | 1 year ago | |
9p-synth.h | 3 years ago | |
9p-util-darwin.c | 3 years ago | |
9p-util-linux.c | 3 years ago | |
9p-util.h | 1 year ago | |
9p-xattr-user.c | 2 years ago | |
9p-xattr.c | 3 years ago | |
9p-xattr.h | 7 years ago | |
9p.c | 6 days ago | |
9p.h | 6 days ago | |
Kconfig | 4 years ago | |
codir.c | 2 years ago | |
cofile.c | 1 year ago | |
cofs.c | 2 years ago | |
coth.c | 2 years ago | |
coth.h | 2 years ago | |
coxattr.c | 2 years ago | |
meson.build | 2 months ago | |
trace-events | 2 years ago | |
trace.h | 4 years ago | |
virtio-9p-device.c | 11 months ago | |
virtio-9p.h | 4 years ago | |
xen-9p-backend.c | 6 months ago | |
xen-9pfs.h | 6 years ago |