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

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

 



Hey Josef,

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,

Nope, ida doesn't have search functionality. Having said that, will it
suffice to have the idr tree without a separate data structure? because
the tree mutation under idr_for_each is not allowed. For example,
I'd expect that nbd module unload will iterate over the existing
devices and destroy them which requires a separate tracking of
them, also, I think that the idr user needs to take care of locking
(unlike ida).
--
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