summaryrefslogtreecommitdiff
path: root/drivers/md/dm-vdo/vdo.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-02-10 11:05:15 -0600
committerMike Snitzer <snitzer@kernel.org>2024-03-04 15:07:56 -0500
commita9da0fb6d8c61e354611c181d505fd417aad51f5 (patch)
treea01f789d8656c1d3dfd862be78684048d4a79106 /drivers/md/dm-vdo/vdo.c
parent4e4152482b944c44a285375be072c4fb3bb50770 (diff)
dm vdo: remove all sysfs interfaces
Also update target major version number. All info is (or will be) accessible through alternative interfaces (e.g. "dmsetup message", module params, etc). Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Ken Raeburn <raeburn@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
Diffstat (limited to 'drivers/md/dm-vdo/vdo.c')
-rw-r--r--drivers/md/dm-vdo/vdo.c54
1 files changed, 1 insertions, 53 deletions
diff --git a/drivers/md/dm-vdo/vdo.c b/drivers/md/dm-vdo/vdo.c
index 11be2ab17e29..28e6352c758e 100644
--- a/drivers/md/dm-vdo/vdo.c
+++ b/drivers/md/dm-vdo/vdo.c
@@ -53,7 +53,6 @@
#include "logical-zone.h"
#include "packer.h"
#include "physical-zone.h"
-#include "pool-sysfs.h"
#include "recovery-journal.h"
#include "slab-depot.h"
#include "statistics.h"
@@ -691,13 +690,6 @@ void vdo_destroy(struct vdo *vdo)
vdo->allocations_allowed = true;
- /* Stop services that need to gather VDO statistics from the worker threads. */
- if (vdo->sysfs_added) {
- init_completion(&vdo->stats_shutdown);
- kobject_put(&vdo->stats_directory);
- wait_for_completion(&vdo->stats_shutdown);
- }
-
finish_vdo(vdo);
unregister_vdo(vdo);
free_data_vio_pool(vdo->data_vio_pool);
@@ -732,15 +724,7 @@ void vdo_destroy(struct vdo *vdo)
vdo_free(vdo_forget(vdo->compression_context));
}
-
- /*
- * The call to kobject_put on the kobj sysfs node will decrement its reference count; when
- * the count goes to zero the VDO object will be freed as a side effect.
- */
- if (!vdo->sysfs_added)
- vdo_free(vdo);
- else
- kobject_put(&vdo->vdo_directory);
+ vdo_free(vdo);
}
static int initialize_super_block(struct vdo *vdo, struct vdo_super_block *super_block)
@@ -818,42 +802,6 @@ void vdo_load_super_block(struct vdo *vdo, struct vdo_completion *parent)
}
/**
- * pool_stats_release() - Signal that sysfs stats have been shut down.
- * @directory: The vdo stats directory.
- */
-static void pool_stats_release(struct kobject *directory)
-{
- struct vdo *vdo = container_of(directory, struct vdo, stats_directory);
-
- complete(&vdo->stats_shutdown);
-}
-
-ATTRIBUTE_GROUPS(vdo_pool_stats);
-static const struct kobj_type stats_directory_type = {
- .release = pool_stats_release,
- .sysfs_ops = &vdo_pool_stats_sysfs_ops,
- .default_groups = vdo_pool_stats_groups,
-};
-
-/**
- * vdo_add_sysfs_stats_dir() - Add the stats directory to the vdo sysfs directory.
- * @vdo: The vdo.
- *
- * Return: VDO_SUCCESS or an error.
- */
-int vdo_add_sysfs_stats_dir(struct vdo *vdo)
-{
- int result;
-
- kobject_init(&vdo->stats_directory, &stats_directory_type);
- result = kobject_add(&vdo->stats_directory, &vdo->vdo_directory, "statistics");
- if (result != 0)
- return VDO_CANT_ADD_SYSFS_NODE;
-
- return VDO_SUCCESS;
-}
-
-/**
* vdo_get_backing_device() - Get the block device object underlying a vdo.
* @vdo: The vdo.
*