Re: [PATCH V3 1/5] RDMA/core: Transport-independent access flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 15, 2015 at 05:19:26AM -0700, 'Christoph Hellwig' wrote:
> On Wed, Jul 15, 2015 at 11:47:52AM +0300, Sagi Grimberg wrote:
> > >  struct ib_pd *ib_alloc_pd(struct ib_device *device)
> > >  {
> > >  	struct ib_pd *pd;
> > >+	struct ib_device_attr devattr;
> > >+	int rc;
> > >+
> > >+	rc = ib_query_device(device, &devattr);
> > >+	if (rc)
> > >+		return ERR_PTR(rc);
> > 
> > Unrelated question,
> > Can we just cache the dev_attr in ib_device already? It's pretty
> > obvious that each consumer that opens a device will automatically
> > query its attributes...
> 
> Instead of caching it I'd suggest to kill ib_device_attr and move
> the field into struct ib_device, similar to how all major kernel
> subsystems work.  Otherwise fully agreed.

Indeed, I think there are quite a few weird cases like this floating
around for someone to work on :)

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux