Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-09-04 Thread Hannes Reinecke
On 9/3/20 10:01 AM, Christoph Hellwig wrote: None of the complicated overlapping regions bits of the kobj_map are required for the character device lookup, so just a trivial xarray instead. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman --- fs/char_dev.c | 94 ++

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-30 Thread Greg Kroah-Hartman
On Sun, Aug 30, 2020 at 08:24:27AM +0200, Christoph Hellwig wrote: > None of the complicated overlapping regions bits of the kobj_map are > required for the character device lookup, so just a trivial xarray > instead. > > Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-27 Thread Christoph Hellwig
On Thu, Aug 27, 2020 at 11:18:59AM +0200, Greg Kroah-Hartman wrote: > > I looked at it, but it does get registered and shows up in sysfs. > > It does? Where does that happen? I see a bunch of kobject_init() > calls, but nothing that registers it in sysfs that I can see. Hmm, true. > > Note, t

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-27 Thread Greg Kroah-Hartman
On Thu, Aug 27, 2020 at 10:53:53AM +0200, Christoph Hellwig wrote: > On Wed, Aug 26, 2020 at 10:19:05AM +0200, Greg Kroah-Hartman wrote: > > On Wed, Aug 26, 2020 at 08:24:28AM +0200, Christoph Hellwig wrote: > > > None of the complicated overlapping regions bits of the kobj_map are > > > required f

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-27 Thread Christoph Hellwig
On Thu, Aug 27, 2020 at 09:25:07AM +0200, Hannes Reinecke wrote: > Do you really need the mutex? > Wouldn't xa_store_range() be better and avoid the mutex? We need the mutex as we need to grab the kobject reference under it. xa_store_range is only available with a separate config option, and has

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-27 Thread Christoph Hellwig
On Wed, Aug 26, 2020 at 10:19:05AM +0200, Greg Kroah-Hartman wrote: > On Wed, Aug 26, 2020 at 08:24:28AM +0200, Christoph Hellwig wrote: > > None of the complicated overlapping regions bits of the kobj_map are > > required for the character device lookup, so just a trivial xarray > > instead. > >

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-27 Thread Hannes Reinecke
On 8/26/20 8:24 AM, Christoph Hellwig wrote: > None of the complicated overlapping regions bits of the kobj_map are > required for the character device lookup, so just a trivial xarray > instead. > > Signed-off-by: Christoph Hellwig > --- > fs/char_dev.c | 94 +---

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-26 Thread Greg Kroah-Hartman
On Wed, Aug 26, 2020 at 08:24:28AM +0200, Christoph Hellwig wrote: > None of the complicated overlapping regions bits of the kobj_map are > required for the character device lookup, so just a trivial xarray > instead. > > Signed-off-by: Christoph Hellwig Really? This is ok to use and just as fa