Lines Matching refs:resource
128 static void seq_print_resource_pending_meta_io(struct seq_file *m, struct drbd_resource *resource, … in seq_print_resource_pending_meta_io() argument
135 idr_for_each_entry(&resource->devices, device, i) { in seq_print_resource_pending_meta_io()
156 static void seq_print_waiting_for_AL(struct seq_file *m, struct drbd_resource *resource, unsigned l… in seq_print_waiting_for_AL() argument
163 idr_for_each_entry(&resource->devices, device, i) { in seq_print_waiting_for_AL()
168 spin_lock_irq(&device->resource->req_lock); in seq_print_waiting_for_AL()
177 spin_unlock_irq(&device->resource->req_lock); in seq_print_waiting_for_AL()
197 spin_lock_irq(&device->resource->req_lock); in seq_print_device_bitmap_io()
206 spin_unlock_irq(&device->resource->req_lock); in seq_print_device_bitmap_io()
216 static void seq_print_resource_pending_bitmap_io(struct seq_file *m, struct drbd_resource *resource… in seq_print_resource_pending_bitmap_io() argument
223 idr_for_each_entry(&resource->devices, device, i) { in seq_print_resource_pending_bitmap_io()
275 spin_lock_irq(&device->resource->req_lock); in seq_print_device_peer_requests()
279 spin_unlock_irq(&device->resource->req_lock); in seq_print_device_peer_requests()
288 struct drbd_resource *resource, unsigned long now) in seq_print_resource_pending_peer_requests() argument
294 idr_for_each_entry(&resource->devices, device, i) { in seq_print_resource_pending_peer_requests()
301 struct drbd_resource *resource, in seq_print_resource_transfer_log_summary() argument
310 spin_lock_irq(&resource->req_lock); in seq_print_resource_transfer_log_summary()
320 spin_unlock_irq(&resource->req_lock); in seq_print_resource_transfer_log_summary()
322 spin_lock_irq(&resource->req_lock); in seq_print_resource_transfer_log_summary()
356 spin_unlock_irq(&resource->req_lock); in seq_print_resource_transfer_log_summary()
362 struct drbd_resource *resource = m->private; in in_flight_summary_show() local
366 connection = first_connection(resource); in in_flight_summary_show()
376 seq_print_resource_pending_bitmap_io(m, resource, jif); in in_flight_summary_show()
380 seq_print_resource_pending_meta_io(m, resource, jif); in in_flight_summary_show()
399 seq_print_resource_pending_peer_requests(m, resource, jif); in in_flight_summary_show()
403 seq_print_waiting_for_AL(m, resource, jif); in in_flight_summary_show()
407 seq_print_resource_transfer_log_summary(m, resource, connection, jif); in in_flight_summary_show()
445 struct drbd_resource *resource = inode->i_private; in in_flight_summary_open() local
446 return drbd_single_open(file, in_flight_summary_show, resource, in in_flight_summary_open()
447 &resource->kref, drbd_destroy_resource); in in_flight_summary_open()
452 struct drbd_resource *resource = inode->i_private; in in_flight_summary_release() local
453 kref_put(&resource->kref, drbd_destroy_resource); in in_flight_summary_release()
465 void drbd_debugfs_resource_add(struct drbd_resource *resource) in drbd_debugfs_resource_add() argument
469 dentry = debugfs_create_dir(resource->name, drbd_debugfs_resources); in drbd_debugfs_resource_add()
470 resource->debugfs_res = dentry; in drbd_debugfs_resource_add()
472 dentry = debugfs_create_dir("volumes", resource->debugfs_res); in drbd_debugfs_resource_add()
473 resource->debugfs_res_volumes = dentry; in drbd_debugfs_resource_add()
475 dentry = debugfs_create_dir("connections", resource->debugfs_res); in drbd_debugfs_resource_add()
476 resource->debugfs_res_connections = dentry; in drbd_debugfs_resource_add()
479 resource->debugfs_res, resource, in drbd_debugfs_resource_add()
481 resource->debugfs_res_in_flight_summary = dentry; in drbd_debugfs_resource_add()
490 void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) in drbd_debugfs_resource_cleanup() argument
493 drbd_debugfs_remove(&resource->debugfs_res_in_flight_summary); in drbd_debugfs_resource_cleanup()
494 drbd_debugfs_remove(&resource->debugfs_res_connections); in drbd_debugfs_resource_cleanup()
495 drbd_debugfs_remove(&resource->debugfs_res_volumes); in drbd_debugfs_resource_cleanup()
496 drbd_debugfs_remove(&resource->debugfs_res); in drbd_debugfs_resource_cleanup()
582 spin_lock_irq(&connection->resource->req_lock); in connection_oldest_requests_show()
594 spin_unlock_irq(&connection->resource->req_lock); in connection_oldest_requests_show()
622 struct dentry *conns_dir = connection->resource->debugfs_res_connections; in drbd_debugfs_connection_add()
693 struct drbd_resource *resource = device->resource; in device_oldest_requests_show() local
702 spin_lock_irq(&resource->req_lock); in device_oldest_requests_show()
714 spin_unlock_irq(&resource->req_lock); in device_oldest_requests_show()
773 struct dentry *vols_dir = device->resource->debugfs_res_volumes; in drbd_debugfs_device_attr()
788 device->resource->name, device->vnr); in drbd_debugfs_device_attr()