Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Tejun Heo
On Thu, Mar 09, 2017 at 11:16:21AM +0100, Jan Kara wrote: > SCSI can call device_add_disk() several times for one request queue when > a device in unbound and bound, creating new gendisk each time. This will > lead to bdi being repeatedly registered and unregistered. This was not a > big problem

[PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Jan Kara
SCSI can call device_add_disk() several times for one request queue when a device in unbound and bound, creating new gendisk each time. This will lead to bdi being repeatedly registered and unregistered. This was not a big problem until commit 165a5e22fafb "block: Move bdi_unregister() to

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-09 Thread Jan Kara
On Wed 08-03-17 17:55:42, Tejun Heo wrote: > Hello, > > On Wed, Mar 08, 2017 at 05:48:31PM +0100, Jan Kara wrote: > > @@ -710,6 +710,11 @@ static void cgwb_bdi_destroy(struct backing_dev_info > > *bdi) > > */ > > atomic_dec(>usage_cnt); > > wait_event(cgwb_release_wait,

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-08 Thread James Bottomley
On Wed, 2017-03-08 at 17:55 -0500, Tejun Heo wrote: > Hello, > > On Wed, Mar 08, 2017 at 05:48:31PM +0100, Jan Kara wrote: > > @@ -710,6 +710,11 @@ static void cgwb_bdi_destroy(struct > > backing_dev_info *bdi) > > */ > > atomic_dec(>usage_cnt); > > wait_event(cgwb_release_wait,

Re: [PATCH 1/4] block: Allow bdi re-registration

2017-03-08 Thread Tejun Heo
Hello, On Wed, Mar 08, 2017 at 05:48:31PM +0100, Jan Kara wrote: > @@ -710,6 +710,11 @@ static void cgwb_bdi_destroy(struct backing_dev_info > *bdi) >*/ > atomic_dec(>usage_cnt); > wait_event(cgwb_release_wait, !atomic_read(>usage_cnt)); > + /* > + * Grab back our

[PATCH 1/4] block: Allow bdi re-registration

2017-03-08 Thread Jan Kara
SCSI can call device_add_disk() several times for one request queue when a device in unbound and bound, creating new gendisk each time. This will lead to bdi being repeatedly registered and unregistered. This was not a big problem until commit 165a5e22fafb "block: Move bdi_unregister() to