Commit | Line | Data |
---|---|---|
1aaa6ba3 NR |
1 | 0[$] IDA: simplifying the complex task of allocating integers null/LWN/0000764057 70\r |
2 | i [Kernel] Sep 4, 2018 0:15 UTC (Tue) (corbet)\r | |
3 | i\r | |
4 | i It is common for kernel code to generate unique integers for\r | |
5 | i identifiers. When one plugs in a flash drive, it will show up\r | |
e818d449 | 6 | i as /dev/sdN ; that N (a letter derived from a number) must be\r |
1aaa6ba3 NR |
7 | i generated in the kernel, and it should not already be in use\r |
8 | i for another drive or unpleasant things will happen. One might\r | |
9 | i think that generating such numbers would not be a difficult\r | |
10 | i task, but that turns out not to be the case, especially in\r | |
11 | i situations where many numbers must be tracked. The IDA (for\r | |
12 | i "ID allocator", perhaps) API exists to handle this specialized\r | |
13 | i task. In past kernels, it has managed to make the process of\r | |
14 | i getting an unused number surprisingly complex; the 4.19 kernel\r | |
15 | i has a new IDA API that simplifies things considerably.\r | |
16 | i\r |