Commit Graph

14 Commits

Author SHA1 Message Date
Daniel Verkamp
2b2ce628dc bdev/rbd: simplify pool_name allocation
Remove the complex list management for pool_name and just strdup() it
directly.  It is not worth the trouble to save a few bytes.

Change-Id: I8a4f7eeea619bd824ea593854423e317041c540e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-08 13:10:54 -07:00
Daniel Verkamp
9f2e5cd713 bdev/rbd: remove unused cb_fn and size fields
Change-Id: I46082e036ac2a3318fa4191a5cb4d460d41cecf8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-08 13:10:38 -07:00
Pan Liu
fa5206c416 env: add wrapper to call function without thread affinity (#60)
Make a wrapper that spdk can call a function without thread affinity, and
call this wrapper to open rbd image.

Change-Id: Iadc87a948f43632abf497f88165483a0e269ba54
2016-11-07 10:32:16 -07:00
Daniel Verkamp
7d30f5aa1e bdev/rbd: use consistent block_size name in RPC
Rename the construct_rbd_bdev "size" parameter to block_size so that it
is consistent with other bdev construct RPCs.

Change-Id: I88f8ed35444495ffce9550dc224fbcbd58231787
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-31 13:48:27 -07:00
Daniel Verkamp
0404c306cb bdev: make construct RPCs return the bdev names
When creating a bdev via the RPC interface, there was no way to know
what name it was assigned (other than predicting it based on the
numbering scheme).  Change all of the relevant RPC interfaces to return
an array of bdev names so they can be used to construct LUNs/subsystems
dynamically in scripts.

Change-Id: I8e03349bdc81afd3d69247396a20df5fcf050f40
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-31 11:17:46 -07:00
Ziye Yang
22b12b319e rbd: fix the pool_name and rbd_name wild pointer issue
Previously, we directly assigned the pointer of pool_name
and rbd_name, and this is not safe. After the rpc test,
we found the string value is not correct, so use strdup.

Change-Id: Ibadc57d3cb5b9869b7db5a22c2459769e92edebd
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-19 12:55:39 -07:00
Pawel Wodkowski
113f8e23a7 bdev: enable IO vector operations
This patch enables vector operation for bdev drivers aio, malloc and
nvme.
The rbd driver still handle only one vector.

Change-Id: Ie2c1f6853bfd54ebd8039df9a0305854ca3297b9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-14 16:21:24 +02:00
Cunyin Chang
b66913d2d4 bdev: Add rpc interface for rbd.
Change-Id: I7ae271d8c687fc438ad74760877479a3d22e70c6
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 22:07:53 -07:00
Cunyin Chang
e578cfe3d4 bdev: Add public function spdk_bdev_rbd_create().
Make sure the function reentrant, prepare for rpc method.

Change-Id: Ie5230e4ac6c9a750e8e779c5e0b67134729c07e3
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 22:07:53 -07:00
Ziye Yang
89b216a2a1 bdev, rbd: Add flush support
Change-Id: I779d52b1af868c7e614faf37a50fecba65757536
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-13 09:09:31 -07:00
Ziye Yang
9dd0f89486 bdev, rbd: Remove the lock and introduce polling strategy
This patch removes the lock in RBD module. And it requires
the librbd library supports rbd_poll_io_events function.

Change-Id: I040a7d8369ab4f69f41d1d0233115f885168f019
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-13 09:09:30 -07:00
Jim Harris
81b3d6c9fc Revert "bdev: enable IO vector operations"
This reverts commit 422eab7106.
2016-10-11 15:52:10 -07:00
Pawel Wodkowski
422eab7106 bdev: enable IO vector operations
This patch enables vector operation for bdev drivers aio, malloc and
nvme.
The rbd driver still handle only one vector.

Change-Id: I5f401527c2717011ecc21116363bbb722e804112
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-11 12:17:47 -07:00
Ziye Yang
c1341b0718 bdev: Add RBD support in lib/bdev
This patch will add a new bdev module, rbd.
It can make ceph rbd as the backend of iSCSI
target.

Change-Id: Id5eb3b159ee607052e3c33a2e59d721739fd9977
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-09-30 15:26:28 -07:00