s3: Fix a winbind race leading to 100% CPU
[Samba.git] / source3 / include / oplock_onefs.h
bloba20becdf2c091e5af4c2e3c6981cbc8fbdd99a55
1 /*
2 * Unix SMB/CIFS implementation.
3 * Support for OneFS kernel oplocks
5 * Copyright (C) Tim Prouty, 2009
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef _OPLOCK_ONEFS_H
22 #define _OPLOCK_ONEFS_H
24 #if HAVE_ONEFS
26 #include <sys/isi_oplock.h>
28 struct deferred_open_record {
29 bool delayed_for_oplocks;
30 bool failed; /* added for onefs_oplocks */
31 struct file_id id;
35 * OneFS oplock utility functions
37 const char *onefs_oplock_str(enum oplock_type onefs_oplock_type);
38 int onefs_oplock_to_samba_oplock(enum oplock_type onefs_oplock);
39 enum oplock_type onefs_samba_oplock_to_oplock(int samba_oplock_type);
42 * OneFS oplock callback tracking
44 void destroy_onefs_callback_record(uint64 id);
45 uint64 onefs_oplock_wait_record(uint16 mid);
46 void onefs_set_oplock_callback(uint64 id, files_struct *fsp);
48 #endif /* HAVE_ONEFS */
50 #endif /* _OPLOCK_ONEFS_H */