Re: [PATCH V2 for-4.21 1/2] blk-mq: not embed .mq_kobj and ctx->kobj into queue instance

2018-11-19 Thread Ming Lei
On Mon, Nov 19, 2018 at 11:06:06AM +0100, Greg Kroah-Hartman wrote: > On Sat, Nov 17, 2018 at 10:26:38AM +0800, Ming Lei wrote: > > On Fri, Nov 16, 2018 at 06:05:21AM -0800, Greg Kroah-Hartman wrote: > > > On Fri, Nov 16, 2018 at 07:23:10PM +0800, Ming Lei wrote: > > > > @@ -456,7 +456,7 @@ struct

Re: [PATCH V2 for-4.21 1/2] blk-mq: not embed .mq_kobj and ctx->kobj into queue instance

2018-11-19 Thread Greg Kroah-Hartman
On Sat, Nov 17, 2018 at 10:26:38AM +0800, Ming Lei wrote: > On Fri, Nov 16, 2018 at 06:05:21AM -0800, Greg Kroah-Hartman wrote: > > On Fri, Nov 16, 2018 at 07:23:10PM +0800, Ming Lei wrote: > > > @@ -456,7 +456,7 @@ struct request_queue { > > > /* > > >* mq queue kobject > > >*/ > > > -

Re: [PATCH V2 for-4.21 1/2] blk-mq: not embed .mq_kobj and ctx->kobj into queue instance

2018-11-16 Thread Ming Lei
On Fri, Nov 16, 2018 at 06:05:21AM -0800, Greg Kroah-Hartman wrote: > On Fri, Nov 16, 2018 at 07:23:10PM +0800, Ming Lei wrote: > > @@ -456,7 +456,7 @@ struct request_queue { > > /* > > * mq queue kobject > > */ > > - struct kobject mq_kobj; > > + struct kobject *mq_kobj; > >

Re: [PATCH V2 for-4.21 1/2] blk-mq: not embed .mq_kobj and ctx->kobj into queue instance

2018-11-16 Thread Greg Kroah-Hartman
On Fri, Nov 16, 2018 at 07:23:10PM +0800, Ming Lei wrote: > @@ -456,7 +456,7 @@ struct request_queue { > /* >* mq queue kobject >*/ > - struct kobject mq_kobj; > + struct kobject *mq_kobj; What is this kobject even used for? It wasn't obvious at all from this patch,

[PATCH V2 for-4.21 1/2] blk-mq: not embed .mq_kobj and ctx->kobj into queue instance

2018-11-16 Thread Ming Lei
Even though .mq_kobj, ctx->kobj and q->kobj share same lifetime from block layer's view, actually they don't because userspace may grab one kobject anytime via sysfs, so each kobject's lifetime has to be independent, then the objects(mq_kobj, ctx) which hosts its own kobject have to be allocated