Project

General

Profile

Actions

Bug #4796

closed

Bug #4774: krbd: don't create /dev entries for backing devices

krbd: don't create sysfs entries for snapshots of mapped images

Added by Alex Elder almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When an rbd image gets mapped a device entry gets created
for it under /sys/bus/rbd/devices/<id>/. Inside that
directory there are sysfs files that contain information
about the image: its size, feature bits, major device
number, and so on.

Additionally, if that image has any snapshots, a device
entry gets created for each of those as a "child" of
the mapped device. Each of these becomes a subdirectory
of the mapped device, and each contains a few files with
information about the snapshot (its snapshot id, size,
and feature mask).

There is no clear benefit to having those device entries
for the snapshots. The information provided via sysfs of
of little real value--and all of it is available via rbd
CLI commands. It would be possible to provide all of this
information much more simply by including it in a single
sysfs file for the mapped image if necessary.

But there is a clear cost to supporting them. Every time
a snapshot context changes, these entries need to be updated
(deleted snapshots removed, new snapshots created). The rbd
driver is notified of changes to the snapshot context via
callbacks from an osd, and so care must be taken to coordinate
removal of snapshot data structures with the possibility of
one these notifications occurring.

Things would be considerably simpler if we just didn't have
to maintain device entries for the snapshots. So get rid
of them. The ability to map a snapshot of an rbd image will
remain; the only thing lost will be the ability to query
these sysfs directories for information about snapshots
of mapped images.

Actions #1

Updated by Alex Elder almost 11 years ago

  • Status changed from In Progress to Fix Under Review

The following has been posted for review:

[PATCH] rbd: don't create sysfs entries for non-mapped snapshots

It is available (along with some others) in the branch
"review/wip-rbd-cleanup" of the ceph-client git repository.

Actions #2

Updated by Alex Elder almost 11 years ago

  • Status changed from Fix Under Review to Resolved

The following has been committed to the ceph-client
"testing" branch:

f03a167 rbd: don't create sysfs entries for non-mapped snapshots

Actions

Also available in: Atom PDF