Re: [Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-19 Thread Greg Kurz
On Tue, 19 Sep 2017 16:28:58 +0200 Jan Dakinevich wrote: > -- >8 -- > Greg, > > Usually, I use 9p as rootfs and run qemu in one of these way. First, > using initrd with built-in 9p modules: > > $ sudo /path/to/qemu-system-x86_64 \ > -machine accel=kvm -m 1G -nographic -vga none -serial mo

[Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-19 Thread Jan Dakinevich
-- >8 -- Greg, Usually, I use 9p as rootfs and run qemu in one of these way. First, using initrd with built-in 9p modules: $ sudo /path/to/qemu-system-x86_64 \ -machine accel=kvm -m 1G -nographic -vga none -serial mon:stdio \ -kernel $PWD/rootfs/boot/vmlinuz-3.16.0-4-amd64 \ -initrd $

Re: [Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-18 Thread Greg Kurz
On Mon, 18 Sep 2017 23:43:17 +0300 Jan Dakinevich wrote: > --- > Greg, > > What do you think about this way? I couldn't reproduce the issue with the symbolic link... can you provide your QEMU command line and the mount options of the 9p filesystem ? Anyway, I had the very same patch in mind be

Re: [Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-18 Thread Jan Dakinevich
Hi Greg, I am also thinking about this... :-( As I see, stat_to_v9stat() is also used for symbolic links resolving and requires full path, not only d_name. With your patch I have the following: $ ln -s /usr usr $ ls -l ls: reading directory .: Invalid argument total 0 On 09/18/2017 06:46 PM, G

[Qemu-devel] [PATCH] 9pfs: fix readdir() for 9p2000.u

2017-09-18 Thread Greg Kurz
If the client is using 9p2000.u, the following occurs: $ cd ${virtfs_shared_dir} $ mkdir -p a/b/c $ ls a/b ls: cannot access 'a/b/a': No such file or directory ls: cannot access 'a/b/b': No such file or directory a b c instead of the expected: $ ls a/b c This is a regression introduced by com