30.07.2014 23:29, Bastian Blank wrote:
> On Wed, Jul 30, 2014 at 05:39:41PM +0400, Michael Tokarev wrote:
>> 23.07.2014 01:11, Bastian Blank wrote:

>> I'm not sure what do you mean by "translate".  It passes d_type from host.
>> And it works in guest as is.  Including ldconfig and other stuff.  In
>> particular, d_type is 8 for regular files in guest, 10 for symlinks and
>> 4 for directories.
> 
> The 9p host code uses extended attributes to save the type:
> 
> | $ stat ld-linux-x86-64.so.2 
> |   File: ‘ld-linux-x86-64.so.2’
> |   Size: 32              Blocks: 8          IO Block: 4096   regular file
> | Device: 33h/51d Inode: 84315       Links: 1
> | Access: (0600/-rw-------)  Uid: ( 1000/ bastian)   Gid: ( 1000/ bastian)
> [...]
> | $ getfattr -d -e hex ld-linux-x86-64.so.2
> | # file: ld-linux-x86-64.so.2
> | user.virtfs.gid=0x00000000
> | user.virtfs.mode=0xffa10000
> | user.virtfs.uid=0x00000000
> | $ hexdump -C ld-linux-x86-64.so.2 
> | 00000000  2f 6c 69 62 2f 78 38 36  5f 36 34 2d 6c 69 6e 75  
> |/lib/x86_64-linu|
> | 00000010  78 2d 67 6e 75 2f 6c 64  2d 32 2e 31 39 2e 73 6f  
> |x-gnu/ld-2.19.so|
> 
> There is nothing in the host readdir implementation that handles this
> extra type information.

Um.

So are you having probs with these files on host or in guest?
Can you maybe provide steps to reproduce a problem?

What I did is this: I exported a /tmp like this:

 -fsdev local,security_model=passthrough,id=fsdev0,path=/tmp \
 -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare

and mounted this share in guest using -o trans=virtio.  In that mountpoint
in guest, I ran some tests to see how various file types are represented.
And found out that it all works correctly, at least with symlinks (which
are represented as symlinks on both host and guest) and block special
files.  I haven't created files in guest, all files where created on
host.  This all works correctly, at least seemingly.

Thanks,

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to