New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/bluestore: fix NVMEDevice::open failure if serial number ends with a … #12956

Merged
merged 2 commits into from Jan 24, 2017

Conversation

Projects
None yet
5 participants
@liuhongtong

liuhongtong commented Jan 17, 2017

…number

The serial number consists of 16 hexadecimal characters.
If the serial number ends with a number, manager.try_get()
will deliver the truncated serial number.

Signed-off-by: Hongtong Liu hongtong.liu@istuary.com

@liuhongtong

This comment has been minimized.

Show comment
Hide comment
@liuhongtong

liuhongtong Jan 17, 2017

@yuyuyu101 @optimistyzy Please take a look. Thanks.

liuhongtong commented Jan 17, 2017

@yuyuyu101 @optimistyzy Please take a look. Thanks.

@yuyuyu101

This comment has been minimized.

Show comment
Hide comment
@yuyuyu101

yuyuyu101 Jan 17, 2017

Member

could you give a example?

Member

yuyuyu101 commented Jan 17, 2017

could you give a example?

@liuhongtong

This comment has been minimized.

Show comment
Hide comment
@liuhongtong

liuhongtong Jan 17, 2017

@yuyuyu101

The serial number I get:
lspci -vvv -d 8086:0953 | grep "Device Serial Number"
Capabilities: [270 v1] Device Serial Number 55-cd-2e-41-4c-93-a4-e2

If without my fix, error will occur:
bdev probe_cb device serial number (55cd2e414c93a4e) not match 55cd2e414c93a4e2
bdev() open failed to get nvme device with sn 55cd2e414c93a4e
OSD::mkfs: ObjectStore::mkfs failed with error -1
^[[0;31m ** ERROR: error creating empty object store in /var/lib/ceph/osd/osd-device-0-data: (1) Operation not permitted

liuhongtong commented Jan 17, 2017

@yuyuyu101

The serial number I get:
lspci -vvv -d 8086:0953 | grep "Device Serial Number"
Capabilities: [270 v1] Device Serial Number 55-cd-2e-41-4c-93-a4-e2

If without my fix, error will occur:
bdev probe_cb device serial number (55cd2e414c93a4e) not match 55cd2e414c93a4e2
bdev() open failed to get nvme device with sn 55cd2e414c93a4e
OSD::mkfs: ObjectStore::mkfs failed with error -1
^[[0;31m ** ERROR: error creating empty object store in /var/lib/ceph/osd/osd-device-0-data: (1) Operation not permitted

@liewegas liewegas changed the title from bluestore: fix NVMEDevice::open failure if serial number ends with a … to os/bluestore: fix NVMEDevice::open failure if serial number ends with a … Jan 17, 2017

Show outdated Hide outdated src/os/bluestore/NVMEDevice.cc Outdated
@liuhongtong

This comment has been minimized.

Show comment
Hide comment
@liuhongtong

liuhongtong Jan 19, 2017

@liupan1111 please take a look.

liuhongtong commented Jan 19, 2017

@liupan1111 please take a look.

@liupan1111

This comment has been minimized.

Show comment
Hide comment
@liupan1111

liupan1111 Jan 22, 2017

Contributor

@liuhongtong , please modify your commit as the suggestion from
ifed01

Contributor

liupan1111 commented Jan 22, 2017

@liuhongtong , please modify your commit as the suggestion from
ifed01

Hongtong Liu added some commits Jan 22, 2017

Hongtong Liu
os/bluestore: fix NVMEDevice::open failure if serial number ends with…
… a number

buf in effect is the serial number in ceph.conf and
the serial number consists of 16 hexadecimal characters.
1. In order to avoid ignoring the numbers, scan buf
with isxdigit.
2. In order to ignore all the potential garbage,
scan buf from the beginning.

Signed-off-by: Hongtong Liu <hongtong.liu@istuary.com>
Hongtong Liu
bluestore: Release segs before delete task when write fails
Fix assert failure in ~Task().

Signed-off-by: Hongtong Liu <hongtong.liu@istuary.com>
@liuhongtong

This comment has been minimized.

Show comment
Hide comment
@liuhongtong

liuhongtong commented Jan 22, 2017

@ifed01 @liupan1111 modified.

@ifed01

ifed01 approved these changes Jan 22, 2017

@liupan1111

This comment has been minimized.

Show comment
Hide comment
@liupan1111

liupan1111 Jan 23, 2017

Contributor

lgtm

Contributor

liupan1111 commented Jan 23, 2017

lgtm

@liuhongtong

This comment has been minimized.

Show comment
Hide comment
@liuhongtong

liuhongtong commented Jan 24, 2017

@yuyuyu101 please merge it.

@yuyuyu101 yuyuyu101 merged commit b2df030 into ceph:master Jan 24, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment