Re: [PATCH] nbd: use an idr to keep track of nbd devices

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

 



On Sat, Jan 14, 2017 at 4:10 PM, Sagi Grimberg <sagi@xxxxxxxxxxx> wrote:

Hey Josef,

To prepare for dynamically adding new nbd devices to the system switch from using an array for the nbd devices and instead use an idr. This
copies what loop does for keeping track of its devices.

I think ida_simple_* is simpler and sufficient here isn't it?

I use more of the IDR stuff in later patches, I just haven't posted those yet because meetings. Thanks,

Can you elaborate on the usage? What do you intend to do
that a simple ida cannot satisfy?

I'm going to use it the same way loop does, there will be a /dev/nbd-control where you can say ADD, REMOVE, and GET_NEXT. I need the search functionality to see if we are adding something that already exists, and to see what is the next unused device that can be used for a connection. Looking at the ida api it does not appear I can do that. If I'm wrong then please point out an example I can look at, because I haven't been able to find one. Thanks,

Josef

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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux