Lines Matching +defs:compress +defs:bdev

25 #define COMP_BDEV_NAME "compress"
43 struct spdk_bdev comp_bdev; /* the compression virtual bdev */
44 struct comp_io_channel *comp_ch; /* channel associated with this bdev */
55 bool orphaned; /* base bdev claimed but comp_bdev not registered */
60 enum spdk_accel_comp_algo comp_algo; /* compression algorithm for compress bdev */
62 bool init_failed; /* compress bdev initialization failed */
81 static void vbdev_compress_examine(struct spdk_bdev *bdev);
129 int dst_iovcnt, bool compress, void *cb_arg)
136 if (compress) {
153 /* Entry point for reduce lib to issue a compress operation. */
164 SPDK_ERRLOG("with compress operation code %d (%s)\n", rc, spdk_strerror(-rc));
189 struct vbdev_compress *comp_bdev = SPDK_CONTAINEROF(bdev_io->bdev, struct vbdev_compress,
192 spdk_reduce_vol_writev(comp_bdev->vol, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
193 bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.num_blocks,
201 struct vbdev_compress *comp_bdev = SPDK_CONTAINEROF(bdev_io->bdev, struct vbdev_compress,
204 spdk_reduce_vol_readv(comp_bdev->vol, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
205 bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.num_blocks,
210 /* Callback for getting a buf from the bdev pool in the event that the caller passed
217 struct vbdev_compress *comp_bdev = SPDK_CONTAINEROF(bdev_io->bdev, struct vbdev_compress,
267 struct vbdev_compress *comp_bdev = SPDK_CONTAINEROF(bdev_io->bdev, struct vbdev_compress,
341 struct vbdev_compress *comp_bdev = SPDK_CONTAINEROF(bdev_io->bdev, struct vbdev_compress,
350 start_chunk = bdev_io->u.bdev.offset_blocks / logical_blocks_per_chunk;
351 end_chunk = (bdev_io->u.bdev.offset_blocks + bdev_io->u.bdev.num_blocks - 1) /
353 start_offset = bdev_io->u.bdev.offset_blocks % logical_blocks_per_chunk;
354 end_tail = (bdev_io->u.bdev.offset_blocks + bdev_io->u.bdev.num_blocks) %
400 bdev_io->u.bdev.num_blocks;
417 struct vbdev_compress *comp_bdev = SPDK_CONTAINEROF(bdev_io->bdev, struct vbdev_compress,
429 bdev_io->u.bdev.num_blocks * bdev_io->bdev->blocklen);
484 /* Close the underlying bdev on its same opened thread. */
638 * bdev. This is how they get a channel.
670 spdk_json_write_name(w, "compress");
689 /* Nothing to dump as compress bdev configuration is saved on physical device. */
764 /* Close the underlying bdev on its same opened thread. */
823 waitq_entry->bdev = spdk_bdev_desc_get_bdev(comp_bdev->base_desc);
827 rc = spdk_bdev_queue_io_wait(waitq_entry->bdev, comp_bdev->base_ch, waitq_entry);
940 /* Called by reduceLib after performing unload vol actions following base bdev hotremove */
967 /* Called when the underlying base bdev triggers asynchronous event such as bdev removal. */
969 vbdev_compress_base_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
974 vbdev_compress_base_bdev_hotremove_cb(bdev);
977 SPDK_NOTICELOG("Unsupported bdev event: type %d\n", type);
997 struct spdk_bdev *bdev;
1006 comp_bdev->backing_dev.compress = _comp_reduce_compress;
1010 bdev = spdk_bdev_desc_get_bdev(bdev_desc);
1011 comp_bdev->base_bdev = bdev;
1013 comp_bdev->backing_dev.blocklen = bdev->blocklen;
1014 comp_bdev->backing_dev.blockcnt = bdev->blockcnt;
1024 comp_bdev->params.logical_block_size = bdev->blocklen;
1055 SPDK_ERRLOG("could not open bdev %s, error %s\n", bdev_name, spdk_strerror(-rc));
1084 * we can communicate with the base bdev on a per channel basis. If we needed
1132 * when we created. If this bdev used its own poller, we'd unregister it here.
1203 SPDK_ERRLOG("Compress bdev doesn't support compression algo(%u) or level(%u)\n",
1210 SPDK_ERRLOG("Bass bdev %s already being used for a compress bdev\n", bdev_name);
1240 /* When we register our bdev this is how we specify our entry points. */
1251 .name = "compress",
1259 SPDK_BDEV_MODULE_REGISTER(compress, &compress_if)
1294 * be slightly less than the base bdev size)
1308 /* This is the context that is passed to us when the bdev
1315 /* Generate UUID based on namespace UUID + base bdev UUID. */
1320 SPDK_ERRLOG("Unable to generate new UUID for compress bdev, error %s\n", spdk_strerror(-rc));
1336 SPDK_ERRLOG("could not claim bdev %s, error %s\n", spdk_bdev_get_name(comp_bdev->base_bdev),
1343 SPDK_ERRLOG("trying to register bdev, error %s\n", spdk_strerror(-rc));
1349 SPDK_NOTICELOG("registered io_device and virtual bdev for: %s\n", comp_bdev->comp_bdev.name);
1460 SPDK_ERRLOG("could not claim bdev %s, error %s\n", spdk_bdev_get_name(comp_bdev->base_bdev),
1480 /* Close the underlying bdev on its same opened thread. */
1518 vbdev_compress_examine(struct spdk_bdev *bdev)
1524 if (strcmp(bdev->product_name, COMP_BDEV_NAME) == 0) {
1529 rc = spdk_bdev_open_ext(spdk_bdev_get_name(bdev), false,
1532 SPDK_ERRLOG("could not open bdev %s, error %s\n", spdk_bdev_get_name(bdev),