Add a pattern to recognise Non-Volatile Memory Express devices as valid
devices to work with. Devices are named by the Linux kernel device
driver like /dev/nvme0n1 [1] with partitions named like /dev/nvme0n1p1
[2].
[1] linux 3.3 drivers/block/nvme.c nvme_alloc_ns()
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/block/nvme.c?id=v3.3#n1351
[2] Contents of /proc/partitions for a partitioned NVME device
$ grep nvme /proc/partitions
259 0 390711384 nvme0n1
259 1 977 nvme0n1p1
259 2 31250000 nvme0n1p2
259 3 328209496 nvme0n1p3
259 4 31249408 nvme0n1p4
Bug 755022 - gparted doesn't recognize nvme devices
This is part of parent bug:
Bug #721455 - Obsolete info in license text on multiple modules
and GNOME Goal:
https://wiki.gnome.org/Initiatives/GnomeGoals/Proposals
* verify all source files to make sure they have a license and a
copyright, and that both are up-to-date
Bug #721565 - License text contains obsolete FSF postal address
Add regular expression to detect the device entry only (e.g., md127)
and not the partitions (e.g., md127p1).
Linux software RAID devices are listed in /proc/partitions as follows:
# cat /proc/partitions
major minor #blocks name
9 127 523968 md127
259 0 131072 md127p1
259 1 262144 md127p2
Part of Bug #678379 - Could not stat device /dev/md/0 - No such file
or directory
HP Smart Array Devices are listed in /proc/partitions as follows:
major minor #blocks name
104 0 143338560 cciss/c0d0
104 1 104391 cciss/c0d0p1
104 2 24097 cciss/c0d0p2
104 3 143203410 cciss/c0d0p3
The previous regular expression was too broad, and would match many
other forms, including Linux software RAID devices such as md127.
Linux software RAID devices are listed in /proc/partitions as follows:
major minor #blocks name
9 127 523968 md127
259 0 131072 md127p1
259 1 262144 md127p2
This problem with the regexp was discovered while investigating a
problem with Linux software RAID device detection.
The regular expression has been tightened up to match the following
hardware RAID controllers:
Compaq/HP Smartarray RAID controller
E.g., device = /dev/cciss/c0d0, partition = /dev/cciss/c0d0p1
(linux-x.y.z/Documentation/blockdev/cciss.txt)
Compaq SMART2 Intelligent Disk Array controller
E.g., device = /dev/ida/c0d0, partition = /dev/ida/c0d0p1
(linux-x.y.z/Documentation/blockdev/cpqarray.txt)
Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers
E.g., device = /dev/rd/c0d0, partition = /dev/rd/c0d0p1
(linux-x.y.z/Documentation/blockdev/README.DAC960)
Related to Bug #678379 - Could not stat device /dev/md/0 - No such
file or directory
The reason for refactoring is to simplify the large GParted_Core
class, to help minimize disk reads, and to group the logic for
processing the file /proc/partitions into a single logical class.
This reason for refactoring is to simplify the large GParted_Core
class, to help minimize disk reads, and to group the logic for
processing the file /proc/partitions into a single logical class.