Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-16 Thread Greg Kurz
On Fri, 16 Feb 2018 11:20:33 +0100 Antonios Motakis wrote: > > I'm not that sure that we can make the assumption that all entries in a > dir will share the st_dev, The assumption stands for any entry that is not a directory actually. But indeed a directory could be a mount point, and have a d

Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-16 Thread Antonios Motakis
On 02/09/2018 06:57 PM, Greg Kurz wrote: On Fri, 9 Feb 2018 10:06:05 -0600 Eric Blake wrote: On 02/09/2018 09:13 AM, Greg Kurz wrote: On Thu, 8 Feb 2018 19:00:18 +0100 wrote: From: Antonios Motakis To support multiple devices on the 9p share, and avoid qid path collisions we take th

Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-16 Thread Antonios Motakis
On 02/09/2018 10:58 PM, Emilio G. Cota wrote: On Fri, Feb 09, 2018 at 16:13:26 +0100, Greg Kurz wrote: On Thu, 8 Feb 2018 19:00:18 +0100 wrote: (snip) +/* creative abuse of tb_hash_func7, which is based on xxhash */ +static uint32_t qpp_hash(QppEntry e) +{ +return tb_hash_func7(e.ino_pr

Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-09 Thread Emilio G. Cota
On Fri, Feb 09, 2018 at 16:13:26 +0100, Greg Kurz wrote: > On Thu, 8 Feb 2018 19:00:18 +0100 > wrote: (snip) > > +/* creative abuse of tb_hash_func7, which is based on xxhash */ > > +static uint32_t qpp_hash(QppEntry e) > > +{ > > +return tb_hash_func7(e.ino_prefix, e.dev, 0, 0, 0); > > Hmm..

Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-09 Thread Greg Kurz
On Fri, 9 Feb 2018 10:06:05 -0600 Eric Blake wrote: > On 02/09/2018 09:13 AM, Greg Kurz wrote: > > On Thu, 8 Feb 2018 19:00:18 +0100 > > wrote: > > > >> From: Antonios Motakis > >> > >> To support multiple devices on the 9p share, and avoid > >> qid path collisions we take the device id as i

Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-09 Thread Eric Blake
On 02/09/2018 09:13 AM, Greg Kurz wrote: On Thu, 8 Feb 2018 19:00:18 +0100 wrote: From: Antonios Motakis To support multiple devices on the 9p share, and avoid qid path collisions we take the device id as input to generate a unique QID path. The lowest 48 bits of the path will be set equal t

Re: [Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-09 Thread Greg Kurz
On Thu, 8 Feb 2018 19:00:18 +0100 wrote: > From: Antonios Motakis > > To support multiple devices on the 9p share, and avoid > qid path collisions we take the device id as input > to generate a unique QID path. The lowest 48 bits of > the path will be set equal to the file inode, and the > top

[Qemu-devel] [PATCH 3/4] 9pfs: stat_to_qid: use device as input to qid.path

2018-02-08 Thread antonios.motakis
From: Antonios Motakis To support multiple devices on the 9p share, and avoid qid path collisions we take the device id as input to generate a unique QID path. The lowest 48 bits of the path will be set equal to the file inode, and the top bits will be uniquely assigned based on the top 16 bits o