Lines Matching refs:buf

39 			      char *buf)  in gfs2_attr_show()  argument
43 return a->show ? a->show(sdp, buf) : 0; in gfs2_attr_show()
47 const char *buf, size_t len) in gfs2_attr_store() argument
51 return a->store ? a->store(sdp, buf, len) : len; in gfs2_attr_store()
62 static ssize_t id_show(struct gfs2_sbd *sdp, char *buf) in id_show() argument
64 return snprintf(buf, PAGE_SIZE, "%u:%u\n", in id_show()
68 static ssize_t fsname_show(struct gfs2_sbd *sdp, char *buf) in fsname_show() argument
70 return snprintf(buf, PAGE_SIZE, "%s\n", sdp->sd_fsname); in fsname_show()
84 static ssize_t uuid_show(struct gfs2_sbd *sdp, char *buf) in uuid_show() argument
88 buf[0] = '\0'; in uuid_show()
91 return snprintf(buf, PAGE_SIZE, "%pUB\n", uuid); in uuid_show()
94 static ssize_t freeze_show(struct gfs2_sbd *sdp, char *buf) in freeze_show() argument
99 return snprintf(buf, PAGE_SIZE, "%d\n", frozen); in freeze_show()
102 static ssize_t freeze_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in freeze_store() argument
105 int n = simple_strtol(buf, NULL, 0); in freeze_store()
129 static ssize_t withdraw_show(struct gfs2_sbd *sdp, char *buf) in withdraw_show() argument
132 return snprintf(buf, PAGE_SIZE, "%u\n", b); in withdraw_show()
135 static ssize_t withdraw_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in withdraw_store() argument
140 if (simple_strtol(buf, NULL, 0) != 1) in withdraw_store()
148 static ssize_t statfs_sync_store(struct gfs2_sbd *sdp, const char *buf, in statfs_sync_store() argument
154 if (simple_strtol(buf, NULL, 0) != 1) in statfs_sync_store()
161 static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf, in quota_sync_store() argument
167 if (simple_strtol(buf, NULL, 0) != 1) in quota_sync_store()
174 static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, in quota_refresh_user_store() argument
184 id = simple_strtoul(buf, NULL, 0); in quota_refresh_user_store()
194 static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, in quota_refresh_group_store() argument
204 id = simple_strtoul(buf, NULL, 0); in quota_refresh_group_store()
214 static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in demote_rq_store() argument
227 rv = sscanf(buf, "%u:%llu %15s", &gltype, &glnum, in demote_rq_store()
306 static ssize_t proto_name_show(struct gfs2_sbd *sdp, char *buf) in proto_name_show() argument
309 return sprintf(buf, "%s\n", ops->lm_proto_name); in proto_name_show()
312 static ssize_t block_show(struct gfs2_sbd *sdp, char *buf) in block_show() argument
320 ret = sprintf(buf, "%d\n", val); in block_show()
324 static ssize_t block_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in block_store() argument
330 val = simple_strtol(buf, NULL, 0); in block_store()
344 static ssize_t wdack_show(struct gfs2_sbd *sdp, char *buf) in wdack_show() argument
348 return sprintf(buf, "%d\n", val); in wdack_show()
351 static ssize_t wdack_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in wdack_store() argument
356 val = simple_strtol(buf, NULL, 0); in wdack_store()
366 static ssize_t lkfirst_show(struct gfs2_sbd *sdp, char *buf) in lkfirst_show() argument
369 return sprintf(buf, "%d\n", ls->ls_first); in lkfirst_show()
372 static ssize_t lkfirst_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in lkfirst_store() argument
377 rv = sscanf(buf, "%u", &first); in lkfirst_store()
399 static ssize_t first_done_show(struct gfs2_sbd *sdp, char *buf) in first_done_show() argument
402 return sprintf(buf, "%d\n", !!test_bit(DFL_FIRST_MOUNT_DONE, &ls->ls_recover_flags)); in first_done_show()
429 static ssize_t recover_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in recover_store() argument
434 rv = sscanf(buf, "%u", &jid); in recover_store()
448 static ssize_t recover_done_show(struct gfs2_sbd *sdp, char *buf) in recover_done_show() argument
451 return sprintf(buf, "%d\n", ls->ls_recover_jid_done); in recover_done_show()
454 static ssize_t recover_status_show(struct gfs2_sbd *sdp, char *buf) in recover_status_show() argument
457 return sprintf(buf, "%d\n", ls->ls_recover_jid_status); in recover_status_show()
460 static ssize_t jid_show(struct gfs2_sbd *sdp, char *buf) in jid_show() argument
462 return sprintf(buf, "%d\n", sdp->sd_lockstruct.ls_jid); in jid_show()
465 static ssize_t jid_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in jid_store() argument
470 rv = sscanf(buf, "%d", &jid); in jid_store()
525 static ssize_t quota_scale_show(struct gfs2_sbd *sdp, char *buf) in quota_scale_show() argument
527 return snprintf(buf, PAGE_SIZE, "%u %u\n", in quota_scale_show()
532 static ssize_t quota_scale_store(struct gfs2_sbd *sdp, const char *buf, in quota_scale_store() argument
541 if (sscanf(buf, "%u %u", &x, &y) != 2 || !y) in quota_scale_store()
552 int check_zero, const char *buf, size_t len) in tune_set() argument
560 x = simple_strtoul(buf, NULL, 0); in tune_set()
575 static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \
577 return snprintf(buf, PAGE_SIZE, "%u\n", sdp->sd_tune.gt_##name); \
582 static ssize_t name##_store(struct gfs2_sbd *sdp, const char *buf, size_t len)\
584 return tune_set(sdp, &sdp->sd_tune.gt_##name, check_zero, buf, len); \