Lines Matching refs:dentry
19 static struct dentry *drbd_debugfs_root;
20 static struct dentry *drbd_debugfs_version;
21 static struct dentry *drbd_debugfs_resources;
22 static struct dentry *drbd_debugfs_minors;
425 static inline int debugfs_positive(struct dentry *dentry) in debugfs_positive() argument
427 return d_really_is_positive(dentry) && !d_unhashed(dentry); in debugfs_positive()
435 struct dentry *parent; in drbd_single_open()
440 parent = file->f_path.dentry->d_parent; in drbd_single_open()
447 if (debugfs_positive(file->f_path.dentry) in drbd_single_open()
484 struct dentry *dentry; in drbd_debugfs_resource_add() local
488 dentry = debugfs_create_dir(resource->name, drbd_debugfs_resources); in drbd_debugfs_resource_add()
489 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_resource_add()
491 resource->debugfs_res = dentry; in drbd_debugfs_resource_add()
493 dentry = debugfs_create_dir("volumes", resource->debugfs_res); in drbd_debugfs_resource_add()
494 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_resource_add()
496 resource->debugfs_res_volumes = dentry; in drbd_debugfs_resource_add()
498 dentry = debugfs_create_dir("connections", resource->debugfs_res); in drbd_debugfs_resource_add()
499 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_resource_add()
501 resource->debugfs_res_connections = dentry; in drbd_debugfs_resource_add()
503 dentry = debugfs_create_file("in_flight_summary", S_IRUSR|S_IRGRP, in drbd_debugfs_resource_add()
506 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_resource_add()
508 resource->debugfs_res_in_flight_summary = dentry; in drbd_debugfs_resource_add()
516 static void drbd_debugfs_remove(struct dentry **dp) in drbd_debugfs_remove()
654 struct dentry *conns_dir = connection->resource->debugfs_res_connections; in drbd_debugfs_connection_add()
655 struct dentry *dentry; in drbd_debugfs_connection_add() local
662 dentry = debugfs_create_dir("peer", conns_dir); in drbd_debugfs_connection_add()
663 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_connection_add()
665 connection->debugfs_conn = dentry; in drbd_debugfs_connection_add()
667 dentry = debugfs_create_file("callback_history", S_IRUSR|S_IRGRP, in drbd_debugfs_connection_add()
670 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_connection_add()
672 connection->debugfs_conn_callback_history = dentry; in drbd_debugfs_connection_add()
674 dentry = debugfs_create_file("oldest_requests", S_IRUSR|S_IRGRP, in drbd_debugfs_connection_add()
677 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_connection_add()
679 connection->debugfs_conn_oldest_requests = dentry; in drbd_debugfs_connection_add()
810 struct dentry *vols_dir = device->resource->debugfs_res_volumes; in drbd_debugfs_device_attr()
815 struct dentry *dentry; in drbd_debugfs_device_attr() local
820 dentry = debugfs_create_dir(vnr_buf, vols_dir); in drbd_debugfs_device_attr()
821 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_device_attr()
823 device->debugfs_vol = dentry; in drbd_debugfs_device_attr()
830 dentry = debugfs_create_symlink(minor_buf, drbd_debugfs_minors, slink_name); in drbd_debugfs_device_attr()
833 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_device_attr()
835 device->debugfs_minor = dentry; in drbd_debugfs_device_attr()
838 dentry = debugfs_create_file(#name, S_IRUSR|S_IRGRP, \ in drbd_debugfs_device_attr()
841 if (IS_ERR_OR_NULL(dentry)) \ in drbd_debugfs_device_attr()
843 device->debugfs_vol_ ## name = dentry; \ in drbd_debugfs_device_attr()
870 struct dentry *conn_dir = peer_device->connection->debugfs_conn; in drbd_debugfs_peer_device_add()
871 struct dentry *dentry; in drbd_debugfs_peer_device_add() local
878 dentry = debugfs_create_dir(vnr_buf, conn_dir); in drbd_debugfs_peer_device_add()
879 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_peer_device_add()
881 peer_device->debugfs_peer_dev = dentry; in drbd_debugfs_peer_device_add()
929 struct dentry *dentry; in drbd_debugfs_init() local
931 dentry = debugfs_create_dir("drbd", NULL); in drbd_debugfs_init()
932 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_init()
934 drbd_debugfs_root = dentry; in drbd_debugfs_init()
936 dentry = debugfs_create_file("version", 0444, drbd_debugfs_root, NULL, &drbd_version_fops); in drbd_debugfs_init()
937 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_init()
939 drbd_debugfs_version = dentry; in drbd_debugfs_init()
941 dentry = debugfs_create_dir("resources", drbd_debugfs_root); in drbd_debugfs_init()
942 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_init()
944 drbd_debugfs_resources = dentry; in drbd_debugfs_init()
946 dentry = debugfs_create_dir("minors", drbd_debugfs_root); in drbd_debugfs_init()
947 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_init()
949 drbd_debugfs_minors = dentry; in drbd_debugfs_init()
954 if (dentry) in drbd_debugfs_init()
955 return PTR_ERR(dentry); in drbd_debugfs_init()