bcache device numbers increase by 16
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Stefan Bader |
Bug Description
On 4.10 kernel, when creating bcache devices, each device kname is now incremented by 16
/dev/bcache0
/dev/bcache16
/dev/bcache32
etc.
This was to support partitioning of bcache devices[1], however, This also will limit the number of bcache devices and doesn't match how other block devices name themselves, md for example, you get md0p1, md1p1, md2p1 etc.
Ideally we'd continue to see devices increment by 1, and ensure we allocate partition numbers as well.
I think the patch[1] below is incomplete; I think we also want to shift the minor value by the number of partitions when we set the disk_name value.
drivers/
snprintf(
to
snprintf(
This should keep the devname index based, while creating the device node with
the appropriate space for partitions, like this:
$ ls -al /dev/bcache*
brw-rw---- 1 root disk 251, 0 Feb 22 17:40 /dev/bcache0
brw-rw---- 1 root disk 251, 1 Feb 22 17:40 /dev/bcache0p1
brw-rw---- 1 root disk 251, 16 Feb 22 17:40 /dev/bcache1
brw-rw---- 1 root disk 251, 17 Feb 22 17:40 /dev/bcache1p1
1. https:/
ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.10.0-8-generic x86_64
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Feb 22 17:36 seq
crw-rw---- 1 root audio 116, 33 Feb 22 17:36 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
Date: Wed Feb 22 17:41:18 2017
Ec2AMI: ami-0000056c
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: OpenStack Foundation OpenStack Nova
PciMultimedia:
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB:
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: Ubuntu-
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.
dmi.modalias: dmi:bvnSeaBIOS:
dmi.product.name: OpenStack Nova
dmi.product.
dmi.sys.vendor: OpenStack Foundation
CVE References
Changed in linux (Ubuntu): | |
assignee: | nobody → Stefan Bader (smb) |
tags: | added: patch |
This change was made by a bot.