Re: [RFC PATCH rdma-next] RDMA/srp: Don't cache device name as part of sysfs name

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

 



On Wed, May 15, 2019 at 12:50:32PM +0200, Bart Van Assche wrote:
> On 5/15/19 11:50 AM, Leon Romanovsky wrote:
> > @@ -4089,11 +4093,15 @@ static struct srp_host *srp_add_port(struct srp_device *device, u8 port)
> > 
> >  	host->dev.class = &srp_class;
> >  	host->dev.parent = device->dev->dev.parent;
> > -	dev_set_name(&host->dev, "srp-%s-%d", dev_name(&device->dev->dev),
> > -		     port);
> > +	devnum = find_first_zero_bit(dev_map, SRP_MAX_DEVICES);
> > +	if (devnum >= SRP_MAX_DEVICES)
> > +		goto free_host;
> > +	set_bit(devnum, dev_map);
> > +	host->devnum = devnum;
> > +	dev_set_name(&host->dev, "srp%d", devnum);
> > 
> >  	if (device_register(&host->dev))
> > -		goto free_host;
> > +		goto free_num;
> >  	if (device_create_file(&host->dev, &dev_attr_add_target))
> >  		goto err_class;
> >  	if (device_create_file(&host->dev, &dev_attr_ibdev))
> 
> Hi Leon,
> 
> Thank you for having root-caused this issue. However, this patch
> modifies the ABI between kernel and user space and hence breaks at least
> srp_daemon and blktests. Are you aware it is considered completely
> unacceptable in the Linux community to break user space? You may have
> noticed that the SRP sysfs ABI has been documented in
> Documentation/ABI/stable/sysfs-driver-ib_srp.

We will need dynamic renaming of these things in srp then.

Jason




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux