Lines Matching refs:kobj
188 static ssize_t sbi_cmd_show(struct kobject *kobj, struct sbi_attribute *attr, in sbi_cmd_show() argument
193 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_cmd_show()
221 static ssize_t sbi_cmd_store(struct kobject *kobj, struct sbi_attribute *attr, in sbi_cmd_store() argument
225 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_cmd_store()
251 static ssize_t sbi_status_show(struct kobject *kobj, struct sbi_attribute *attr, in sbi_status_show() argument
260 sbi = to_sbi(kobj); in sbi_status_show()
284 static ssize_t sbi_status_store(struct kobject *kobj, in sbi_status_store() argument
294 static ssize_t sbi_stat_show(struct kobject *kobj, struct sbi_attribute *attr, in sbi_stat_show() argument
303 sbi = to_sbi(kobj); in sbi_stat_show()
326 static ssize_t sbi_stat_store(struct kobject *kobj, struct sbi_attribute *attr, in sbi_stat_store() argument
333 sbi = to_sbi(kobj); in sbi_stat_store()
353 static ssize_t sbi_dcache_precision_show(struct kobject *kobj, in sbi_dcache_precision_show() argument
356 return snprintf(buf, PAGE_SIZE, "%u\n", to_sbi(kobj)->dcache_precision); in sbi_dcache_precision_show()
361 static ssize_t sbi_dcache_precision_store(struct kobject *kobj, in sbi_dcache_precision_store() argument
367 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dcache_precision_store()
384 static ssize_t sbi_dcache_threshold_show(struct kobject *kobj, in sbi_dcache_threshold_show() argument
388 to_sbi(kobj)->dcache_threshold); in sbi_dcache_threshold_show()
391 static ssize_t sbi_dcache_threshold_store(struct kobject *kobj, in sbi_dcache_threshold_store() argument
397 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dcache_threshold_store()
410 static ssize_t server_statistic_show(struct kobject *kobj, in server_statistic_show() argument
416 struct server_statistic *stat = to_sbi(kobj)->s_server_statis; in server_statistic_show()
440 static ssize_t client_statistic_show(struct kobject *kobj, in client_statistic_show() argument
446 struct client_statistic *stat = to_sbi(kobj)->s_client_statis; in client_statistic_show()
479 static ssize_t dirty_writeback_stats_show(struct kobject *kobj, in dirty_writeback_stats_show() argument
483 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in dirty_writeback_stats_show()
510 static ssize_t sbi_wb_timeout_ms_show(struct kobject *kobj, in sbi_wb_timeout_ms_show() argument
514 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_wb_timeout_ms_show()
519 static ssize_t sbi_wb_timeout_ms_store(struct kobject *kobj, in sbi_wb_timeout_ms_store() argument
523 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_wb_timeout_ms_store()
543 static ssize_t sbi_dirty_writeback_centisecs_show(struct kobject *kobj, in sbi_dirty_writeback_centisecs_show() argument
547 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_centisecs_show()
553 static ssize_t sbi_dirty_writeback_centisecs_store(struct kobject *kobj, in sbi_dirty_writeback_centisecs_store() argument
557 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_centisecs_store()
571 static ssize_t sbi_dirty_file_background_bytes_show(struct kobject *kobj, in sbi_dirty_file_background_bytes_show() argument
575 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_file_background_bytes_show()
581 static ssize_t sbi_dirty_file_background_bytes_store(struct kobject *kobj, in sbi_dirty_file_background_bytes_store() argument
586 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_file_background_bytes_store()
609 static ssize_t sbi_dirty_fs_background_bytes_show(struct kobject *kobj, in sbi_dirty_fs_background_bytes_show() argument
613 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_fs_background_bytes_show()
618 static ssize_t sbi_dirty_fs_background_bytes_store(struct kobject *kobj, in sbi_dirty_fs_background_bytes_store() argument
622 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_fs_background_bytes_store()
652 static ssize_t sbi_dirty_file_bytes_show(struct kobject *kobj, in sbi_dirty_file_bytes_show() argument
655 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_file_bytes_show()
660 static ssize_t sbi_dirty_file_bytes_store(struct kobject *kobj, in sbi_dirty_file_bytes_store() argument
664 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_file_bytes_store()
684 static ssize_t sbi_dirty_fs_bytes_show(struct kobject *kobj, in sbi_dirty_fs_bytes_show() argument
687 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_fs_bytes_show()
692 static ssize_t sbi_dirty_fs_bytes_store(struct kobject *kobj, in sbi_dirty_fs_bytes_store() argument
696 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_fs_bytes_store()
726 static ssize_t sbi_dirty_writeback_timelimit_show(struct kobject *kobj, in sbi_dirty_writeback_timelimit_show() argument
730 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_timelimit_show()
736 static ssize_t sbi_dirty_writeback_timelimit_store(struct kobject *kobj, in sbi_dirty_writeback_timelimit_store() argument
741 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_timelimit_store()
759 static ssize_t sbi_dirty_thresh_lowerlimit_show(struct kobject *kobj, in sbi_dirty_thresh_lowerlimit_show() argument
763 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_thresh_lowerlimit_show()
769 static ssize_t sbi_dirty_thresh_lowerlimit_store(struct kobject *kobj, in sbi_dirty_thresh_lowerlimit_store() argument
774 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_thresh_lowerlimit_store()
796 static ssize_t sbi_dirty_writeback_autothresh_show(struct kobject *kobj, in sbi_dirty_writeback_autothresh_show() argument
800 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_autothresh_show()
806 static ssize_t sbi_dirty_writeback_autothresh_store(struct kobject *kobj, in sbi_dirty_writeback_autothresh_store() argument
811 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_autothresh_store()
827 static ssize_t sbi_dirty_writeback_control_show(struct kobject *kobj, in sbi_dirty_writeback_control_show() argument
831 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_control_show()
837 static ssize_t sbi_dirty_writeback_control_store(struct kobject *kobj, in sbi_dirty_writeback_control_store() argument
841 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dirty_writeback_control_store()
857 static ssize_t sbi_srv_dirty_thresh_show(struct kobject *kobj, in sbi_srv_dirty_thresh_show() argument
861 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_srv_dirty_thresh_show()
867 static ssize_t sbi_srv_dirty_thresh_store(struct kobject *kobj, in sbi_srv_dirty_thresh_store() argument
872 struct hmdfs_server_writeback *hswb = to_sbi(kobj)->h_swb; in sbi_srv_dirty_thresh_store()
901 static ssize_t sbi_srv_dirty_wb_control_show(struct kobject *kobj, in sbi_srv_dirty_wb_control_show() argument
905 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_srv_dirty_wb_control_show()
911 static ssize_t sbi_srv_dirty_wb_conctrol_store(struct kobject *kobj, in sbi_srv_dirty_wb_conctrol_store() argument
916 struct hmdfs_server_writeback *hswb = to_sbi(kobj)->h_swb; in sbi_srv_dirty_wb_conctrol_store()
933 static ssize_t sbi_dcache_timeout_show(struct kobject *kobj, in sbi_dcache_timeout_show() argument
936 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dcache_timeout_show()
941 static ssize_t sbi_dcache_timeout_store(struct kobject *kobj, in sbi_dcache_timeout_store() argument
945 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_dcache_timeout_store()
966 static ssize_t sbi_write_cache_timeout_sec_show(struct kobject *kobj, in sbi_write_cache_timeout_sec_show() argument
970 to_sbi(kobj)->write_cache_timeout); in sbi_write_cache_timeout_sec_show()
973 static ssize_t sbi_write_cache_timeout_sec_store(struct kobject *kobj, in sbi_write_cache_timeout_sec_store() argument
978 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_write_cache_timeout_sec_store()
994 static ssize_t sbi_node_evt_cb_delay_show(struct kobject *kobj, in sbi_node_evt_cb_delay_show() argument
998 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_node_evt_cb_delay_show()
1003 static ssize_t sbi_node_evt_cb_delay_store(struct kobject *kobj, in sbi_node_evt_cb_delay_store() argument
1008 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_node_evt_cb_delay_store()
1040 static ssize_t sbi_show_idr_stats(struct kobject *kobj, in sbi_show_idr_stats() argument
1050 sbi = to_sbi(kobj); in sbi_show_idr_stats()
1069 static ssize_t pending_message_show(struct kobject *kobj, in pending_message_show() argument
1073 return sbi_show_idr_stats(kobj, attr, buf, true); in pending_message_show()
1079 static ssize_t peer_opened_fd_show(struct kobject *kobj, in peer_opened_fd_show() argument
1082 return sbi_show_idr_stats(kobj, attr, buf, false); in peer_opened_fd_show()
1087 static ssize_t sbi_srv_req_max_active_attr_show(struct kobject *kobj, in sbi_srv_req_max_active_attr_show() argument
1091 const struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_srv_req_max_active_attr_show()
1096 static ssize_t sbi_srv_req_max_active_attr_store(struct kobject *kobj, in sbi_srv_req_max_active_attr_store() argument
1101 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_srv_req_max_active_attr_store()
1138 static ssize_t client_cache_file_show(struct kobject *kobj, in client_cache_file_show() argument
1141 return cache_file_show(to_sbi(kobj), &to_sbi(kobj)->client_cache, buf); in client_cache_file_show()
1143 static ssize_t server_cache_file_show(struct kobject *kobj, in server_cache_file_show() argument
1146 return cache_file_show(to_sbi(kobj), &to_sbi(kobj)->server_cache, buf); in server_cache_file_show()
1154 static ssize_t sb_seq_show(struct kobject *kobj, struct sbi_attribute *attr, in sb_seq_show() argument
1157 return snprintf(buf, PAGE_SIZE, "%u\n", to_sbi(kobj)->seq); in sb_seq_show()
1162 static ssize_t peers_sum_attr_show(struct kobject *kobj, in peers_sum_attr_show() argument
1165 struct hmdfs_sb_info *sbi = to_sbi(kobj); in peers_sum_attr_show()
1250 static ssize_t sbi_features_show(struct kobject *kobj, in sbi_features_show() argument
1253 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_features_show()
1296 static ssize_t sbi_attr_show(struct kobject *kobj, struct attribute *attr, in sbi_attr_show() argument
1303 return sbi_attr->show(kobj, sbi_attr, buf); in sbi_attr_show()
1306 static ssize_t sbi_attr_store(struct kobject *kobj, struct attribute *attr, in sbi_attr_store() argument
1313 return sbi_attr->store(kobj, sbi_attr, buf, len); in sbi_attr_store()
1321 static void sbi_release(struct kobject *kobj) in sbi_release() argument
1323 struct hmdfs_sb_info *sbi = to_sbi(kobj); in sbi_release()
1344 static ssize_t cmd_timeout_show(struct kobject *kobj, struct attribute *attr, in cmd_timeout_show() argument
1348 struct hmdfs_sb_info *sbi = cmd_kobj_to_sbi(kobj); in cmd_timeout_show()
1356 static ssize_t cmd_timeout_store(struct kobject *kobj, struct attribute *attr, in cmd_timeout_store() argument
1362 struct hmdfs_sb_info *sbi = cmd_kobj_to_sbi(kobj); in cmd_timeout_store()
1417 static void sbi_timeout_release(struct kobject *kobj) in sbi_timeout_release() argument
1419 struct hmdfs_sb_info *sbi = container_of(kobj, struct hmdfs_sb_info, in sbi_timeout_release()
1435 kobject_put(&sbi->kobj); in hmdfs_release_sysfs()
1442 struct kobject *kobj = NULL; in hmdfs_register_sysfs() local
1445 kobj = kset_find_obj(hmdfs_kset, name); in hmdfs_register_sysfs()
1446 if (kobj) { in hmdfs_register_sysfs()
1448 kobject_put(kobj); in hmdfs_register_sysfs()
1453 sbi->kobj.kset = hmdfs_kset; in hmdfs_register_sysfs()
1455 ret = kobject_init_and_add(&sbi->kobj, &sbi_ktype, in hmdfs_register_sysfs()
1456 &hmdfs_kset->kobj, "%s", name); in hmdfs_register_sysfs()
1457 sysfs_change_owner(&sbi->kobj, KUIDT_INIT(1000), KGIDT_INIT(1000)); in hmdfs_register_sysfs()
1461 kobject_put(&sbi->kobj); in hmdfs_register_sysfs()
1468 &sbi->kobj, "cmd_timeout"); in hmdfs_register_sysfs()
1474 kobject_uevent(&sbi->kobj, KOBJ_ADD); in hmdfs_register_sysfs()
1481 kobject_del(&sbi->kobj); in hmdfs_unregister_sysfs()
1489 static ssize_t features_show(struct kobject *kobj, struct peer_attribute *attr, in features_show() argument
1492 struct hmdfs_peer *peer = to_peer(kobj); in features_show()
1497 static ssize_t event_show(struct kobject *kobj, struct peer_attribute *attr, in event_show() argument
1500 struct hmdfs_peer *peer = to_peer(kobj); in event_show()
1529 static ssize_t stash_show(struct kobject *kobj, struct peer_attribute *attr, in stash_show() argument
1532 struct hmdfs_peer *peer = to_peer(kobj); in stash_show()
1553 static ssize_t restore_show(struct kobject *kobj, struct peer_attribute *attr, in restore_show() argument
1556 struct hmdfs_peer *peer = to_peer(kobj); in restore_show()
1577 static ssize_t rebuild_show(struct kobject *kobj, struct peer_attribute *attr, in rebuild_show() argument
1580 struct hmdfs_peer *peer = to_peer(kobj); in rebuild_show()
1614 static ssize_t peer_attr_show(struct kobject *kobj, struct attribute *attr, in peer_attr_show() argument
1621 return peer_attr->show(kobj, peer_attr, buf); in peer_attr_show()
1624 static ssize_t peer_attr_store(struct kobject *kobj, struct attribute *attr, in peer_attr_store() argument
1631 return peer_attr->store(kobj, peer_attr, buf, len); in peer_attr_store()
1639 static void peer_sysfs_release(struct kobject *kobj) in peer_sysfs_release() argument
1641 struct hmdfs_peer *peer = to_peer(kobj); in peer_sysfs_release()
1658 err = kobject_init_and_add(&peer->kobj, &peer_ktype, &sbi->kobj, in hmdfs_register_peer_sysfs()
1665 kobject_del(&peer->kobj); in hmdfs_release_peer_sysfs()
1666 kobject_put(&peer->kobj); in hmdfs_release_peer_sysfs()
1683 sysfs_notify(&sbi->kobj, NULL, "cmd"); in notify()