lio rbd support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 18 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 18 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/18] lio rbd support
The following patches implement a LIO RBD backend. Instead of having LIO send bios/requests through the block layer and having rbd translate them to ceph/rados requests, this implements a LIO RBD backend module that translates LIO se_cmds directly to ceph/rados requests.
This patchset also implements native ceph/rados support for WRITE_SAME and COMPARE_AND_WRITE commands. We execute them on the OSD similar to how we execute UNMAP/TRIM/DISCARD requests.
This patchset just only implements single node support. The cluster support will be posted soon. I am currently redoing my patches against Doug's locking API and redoing my PR hooks.
The patches were made over linus's tree pulled today
(last commit 956325bd55bb020e574129c443a2c2c66a8316e7), plus Nick's target-pending tree (last commit 7a14e3c1cfcbdf377098542ba440e1ebb0eeafa4), and Doug's wip-djf-watch-notify2 branch in the ceph client tree which can be found here https://github.com/ceph/ceph-client.
Attached at the patches for rtslib and targetlci to be able to use the rbd module. It was made over Andy's fb branch.
targetcli/ui_backstore.py +51 -0
@@ -109,6 +109,7 @@ class UIBackstores(UINode): UIRDMCPBackstore(self) UIFileIOBackstore(self) UIBlockBackstore(self) + UIRBDBackstore(self) UIUserBackedBackstore(self)
@@ -402,6 +403,41 @@ class UIBlockBackstore(UIBackstore): completions = [completions[0] + ' '] return completions +class UIRBDBackstore(UIBackstore): + ''' + RBD backstore UI. + ''' + def __init__(self, parent): + self.so_cls = UIRBDStorageObject + UIBackstore.__init__(self, 'rbd', parent) + + def ui_command_create(self, name, dev, readonly=None): + ''' + Creates an RBD Storage object. I{dev} is the path to the RBD + block device to use. + ''' + self.assert_root() + + readonly = self.ui_eval_param(readonly, 'bool', False) + + so = RBDStorageObject(name, dev, readonly=readonly) + ui_so = UIRBDStorageObject(so, self) + self.setup_model_alias(so) + self.shell.log.info("Created RBD storage object %s using %s." + % (name, dev)) + return self.new_node(ui_so) + + def ui_complete_create(self, parameters, text, current_param): + ''' + Auto-completes the device name + ''' + if current_param != 'dev': + return [] + completions = complete_path(text, stat.S_ISBLK) + if len(completions) == 1 and not completions[0].endswith('/'): + completions = [completions[0] + ' '] + return completions + class UIUserBackedBackstore(UIBackstore): '''
@@ -543,6 +579,21 @@ class UIBlockStorageObject(UIStorageObje return ("%s (%s) %s%s %s" % (so.udev_path, bytes_to_human(so.size), ro_str, wb_str, so.status), True) +class UIRBDStorageObject(UIStorageObject): + def summary(self): + so = self.rtsnode + + if so.write_back: + wb_str = "write-back" + else: + wb_str = "write-thru" + + ro_str = "" + if so.readonly: + ro_str = "ro " + + return ("%s (%s) %s%s %s" % (so.udev_path, bytes_to_human(so.size), + ro_str, wb_str, so.status), True) class UIUserBackedStorageObject(UIStorageObject): def summary(self):
rtslib/tcm.py +103 -0
121 lines not on this page · raw message