Lines Matching refs:info
27 struct dlm_plock_info info; member
39 static inline void set_version(struct dlm_plock_info *info) in set_version() argument
41 info->version[0] = DLM_PLOCK_VERSION_MAJOR; in set_version()
42 info->version[1] = DLM_PLOCK_VERSION_MINOR; in set_version()
43 info->version[2] = DLM_PLOCK_VERSION_PATCH; in set_version()
46 static int check_version(struct dlm_plock_info *info) in check_version() argument
48 if ((DLM_PLOCK_VERSION_MAJOR != info->version[0]) || in check_version()
49 (DLM_PLOCK_VERSION_MINOR < info->version[1])) { in check_version()
55 info->version[0], in check_version()
56 info->version[1], in check_version()
57 info->version[2]); in check_version()
65 set_version(&op->info); in send_op()
92 op->info.optype = DLM_PLOCK_OP_LOCK; in dlm_posix_lock()
93 op->info.pid = fl->fl_pid; in dlm_posix_lock()
94 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_lock()
95 op->info.wait = IS_SETLKW(cmd); in dlm_posix_lock()
96 op->info.fsid = ls->ls_global_id; in dlm_posix_lock()
97 op->info.number = number; in dlm_posix_lock()
98 op->info.start = fl->fl_start; in dlm_posix_lock()
99 op->info.end = fl->fl_end; in dlm_posix_lock()
103 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_lock()
110 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_lock()
131 rv = op->info.rv; in dlm_posix_lock()
159 (unsigned long long)op->info.number); in dlm_plock_callback()
170 if (op->info.rv) { in dlm_plock_callback()
171 notify(fl, NULL, op->info.rv); in dlm_plock_callback()
187 (unsigned long long)op->info.number, file, fl); in dlm_plock_callback()
224 op->info.optype = DLM_PLOCK_OP_UNLOCK; in dlm_posix_unlock()
225 op->info.pid = fl->fl_pid; in dlm_posix_unlock()
226 op->info.fsid = ls->ls_global_id; in dlm_posix_unlock()
227 op->info.number = number; in dlm_posix_unlock()
228 op->info.start = fl->fl_start; in dlm_posix_unlock()
229 op->info.end = fl->fl_end; in dlm_posix_unlock()
231 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_unlock()
233 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_unlock()
246 rv = op->info.rv; in dlm_posix_unlock()
275 op->info.optype = DLM_PLOCK_OP_GET; in dlm_posix_get()
276 op->info.pid = fl->fl_pid; in dlm_posix_get()
277 op->info.ex = (fl->fl_type == F_WRLCK); in dlm_posix_get()
278 op->info.fsid = ls->ls_global_id; in dlm_posix_get()
279 op->info.number = number; in dlm_posix_get()
280 op->info.start = fl->fl_start; in dlm_posix_get()
281 op->info.end = fl->fl_end; in dlm_posix_get()
283 op->info.owner = (__u64) fl->fl_pid; in dlm_posix_get()
285 op->info.owner = (__u64)(long) fl->fl_owner; in dlm_posix_get()
301 rv = op->info.rv; in dlm_posix_get()
308 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; in dlm_posix_get()
310 fl->fl_pid = op->info.pid; in dlm_posix_get()
311 fl->fl_start = op->info.start; in dlm_posix_get()
312 fl->fl_end = op->info.end; in dlm_posix_get()
327 struct dlm_plock_info info; in dev_read() local
330 if (count < sizeof(info)) in dev_read()
337 memcpy(&info, &op->info, sizeof(info)); in dev_read()
344 if (copy_to_user(u, &info, sizeof(info))) in dev_read()
346 return sizeof(info); in dev_read()
354 struct dlm_plock_info info; in dev_write() local
358 if (count != sizeof(info)) in dev_write()
361 if (copy_from_user(&info, u, sizeof(info))) in dev_write()
364 if (check_version(&info)) in dev_write()
369 if (op->info.fsid == info.fsid && op->info.number == info.number && in dev_write()
370 op->info.owner == info.owner) { in dev_write()
374 memcpy(&op->info, &info, sizeof(info)); in dev_write()
388 log_print("dev_write no op %x %llx", info.fsid, in dev_write()
389 (unsigned long long)info.number); in dev_write()