• Home
  • Raw
  • Download

Lines Matching refs:fl

41 static void ceph_fl_release_lock(struct file_lock *fl)  in ceph_fl_release_lock()  argument
43 struct ceph_file_info *fi = fl->fl_file->private_data; in ceph_fl_release_lock()
44 struct inode *inode = file_inode(fl->fl_file); in ceph_fl_release_lock()
64 int cmd, u8 wait, struct file_lock *fl) in ceph_lock_message() argument
79 fl->fl_ops = &ceph_fl_lock_ops; in ceph_lock_message()
80 fl->fl_ops->fl_copy_lock(fl, NULL); in ceph_lock_message()
94 if (LLONG_MAX == fl->fl_end) in ceph_lock_message()
97 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message()
99 owner = secure_addr(fl->fl_owner); in ceph_lock_message()
103 (int)operation, owner, (u64)fl->fl_pid, fl->fl_start, length, in ceph_lock_message()
104 wait, fl->fl_type); in ceph_lock_message()
109 req->r_args.filelock_change.pid = cpu_to_le64((u64)fl->fl_pid); in ceph_lock_message()
110 req->r_args.filelock_change.start = cpu_to_le64(fl->fl_start); in ceph_lock_message()
119 fl->fl_pid = -le64_to_cpu(req->r_reply_info.filelock_reply->pid); in ceph_lock_message()
121 fl->fl_type = F_RDLCK; in ceph_lock_message()
123 fl->fl_type = F_WRLCK; in ceph_lock_message()
125 fl->fl_type = F_UNLCK; in ceph_lock_message()
127 fl->fl_start = le64_to_cpu(req->r_reply_info.filelock_reply->start); in ceph_lock_message()
131 fl->fl_end = length -1; in ceph_lock_message()
133 fl->fl_end = 0; in ceph_lock_message()
139 (int)operation, (u64)fl->fl_pid, fl->fl_start, in ceph_lock_message()
140 length, wait, fl->fl_type, err); in ceph_lock_message()
217 int ceph_lock(struct file *file, int cmd, struct file_lock *fl) in ceph_lock() argument
226 if (!(fl->fl_flags & FL_POSIX)) in ceph_lock()
229 if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) in ceph_lock()
232 dout("ceph_lock, fl_owner: %p\n", fl->fl_owner); in ceph_lock()
246 if (op == CEPH_MDS_OP_SETFILELOCK && F_UNLCK == fl->fl_type) in ceph_lock()
247 posix_lock_file(file, fl, NULL); in ceph_lock()
251 if (F_RDLCK == fl->fl_type) in ceph_lock()
253 else if (F_WRLCK == fl->fl_type) in ceph_lock()
258 err = ceph_lock_message(CEPH_LOCK_FCNTL, op, inode, lock_cmd, wait, fl); in ceph_lock()
262 err = posix_lock_file(file, fl, NULL); in ceph_lock()
268 CEPH_LOCK_UNLOCK, 0, fl); in ceph_lock()
277 int ceph_flock(struct file *file, int cmd, struct file_lock *fl) in ceph_flock() argument
285 if (!(fl->fl_flags & FL_FLOCK)) in ceph_flock()
288 if (fl->fl_type & LOCK_MAND) in ceph_flock()
291 dout("ceph_flock, fl_file: %p\n", fl->fl_file); in ceph_flock()
299 if (F_UNLCK == fl->fl_type) in ceph_flock()
300 locks_lock_file_wait(file, fl); in ceph_flock()
307 if (F_RDLCK == fl->fl_type) in ceph_flock()
309 else if (F_WRLCK == fl->fl_type) in ceph_flock()
315 inode, lock_cmd, wait, fl); in ceph_flock()
317 err = locks_lock_file_wait(file, fl); in ceph_flock()
321 inode, CEPH_LOCK_UNLOCK, 0, fl); in ceph_flock()