1 #include <linux/spinlock_types.h>
2 #include <linux/types.h>
3 #include <linux/slab.h>
4 #include <linux/ioctl.h>
6 extern struct client_debug_mask
*cdm_array
;
7 extern char *debug_help_string
;
8 extern int help_string_initialized
;
9 extern struct dentry
*debug_dir
;
10 extern struct dentry
*help_file_dentry
;
11 extern struct dentry
*client_debug_dentry
;
12 extern const struct file_operations debug_help_fops
;
13 extern int client_all_index
;
14 extern int client_verbose_index
;
15 extern int cdm_element_count
;
16 #define DEBUG_HELP_STRING_SIZE 4096
17 #define HELP_STRING_UNINITIALIZED \
18 "Client Debug Keywords are unknown until the first time\n" \
19 "the client is started after boot.\n"
20 #define ORANGEFS_KMOD_DEBUG_HELP_FILE "debug-help"
21 #define ORANGEFS_KMOD_DEBUG_FILE "kernel-debug"
22 #define ORANGEFS_CLIENT_DEBUG_FILE "client-debug"
23 #define PVFS2_VERBOSE "verbose"
24 #define PVFS2_ALL "all"
26 /* pvfs2-config.h ***********************************************************/
27 #define PVFS2_VERSION_MAJOR 2
28 #define PVFS2_VERSION_MINOR 9
29 #define PVFS2_VERSION_SUB 0
31 /* khandle stuff ***********************************************************/
34 * The 2.9 core will put 64 bit handles in here like this:
36 * The 3.0 and beyond cores will put 128 bit handles in here like this:
38 * The kernel module will always use the first four bytes and
39 * the last four bytes as an inum.
41 struct pvfs2_khandle
{
46 * kernel version of an object ref.
48 struct pvfs2_object_kref
{
49 struct pvfs2_khandle khandle
;
55 * compare 2 khandles assumes little endian thus from large address to
58 static inline int PVFS_khandle_cmp(const struct pvfs2_khandle
*kh1
,
59 const struct pvfs2_khandle
*kh2
)
63 for (i
= 15; i
>= 0; i
--) {
64 if (kh1
->u
[i
] > kh2
->u
[i
])
66 if (kh1
->u
[i
] < kh2
->u
[i
])
73 /* copy a khandle to a field of arbitrary size */
74 static inline void PVFS_khandle_to(const struct pvfs2_khandle
*kh
,
82 for (i
= 0; i
< 16 && i
< size
; i
++)
86 /* copy a khandle from a field of arbitrary size */
87 static inline void PVFS_khandle_from(struct pvfs2_khandle
*kh
,
95 for (i
= 0; i
< 16 && i
< size
; i
++)
99 /* pvfs2-types.h ************************************************************/
100 typedef __u32 PVFS_uid
;
101 typedef __u32 PVFS_gid
;
102 typedef __s32 PVFS_fs_id
;
103 typedef __u32 PVFS_permissions
;
104 typedef __u64 PVFS_time
;
105 typedef __s64 PVFS_size
;
106 typedef __u64 PVFS_flags
;
107 typedef __u64 PVFS_ds_position
;
108 typedef __s32 PVFS_error
;
109 typedef __s64 PVFS_offset
;
111 #define PVFS2_SUPER_MAGIC 0x20030528
112 #define PVFS_ERROR_BIT (1 << 30)
113 #define PVFS_NON_ERRNO_ERROR_BIT (1 << 29)
114 #define IS_PVFS_ERROR(__error) ((__error)&(PVFS_ERROR_BIT))
115 #define IS_PVFS_NON_ERRNO_ERROR(__error) \
116 (((__error)&(PVFS_NON_ERRNO_ERROR_BIT)) && IS_PVFS_ERROR(__error))
117 #define PVFS_ERROR_TO_ERRNO(__error) PVFS_get_errno_mapping(__error)
119 /* 7 bits are used for the errno mapped error codes */
120 #define PVFS_ERROR_CODE(__error) \
121 ((__error) & (__s32)(0x7f|PVFS_ERROR_BIT))
122 #define PVFS_ERROR_CLASS(__error) \
123 ((__error) & ~((__s32)(0x7f|PVFS_ERROR_BIT|PVFS_NON_ERRNO_ERROR_BIT)))
124 #define PVFS_NON_ERRNO_ERROR_CODE(__error) \
125 ((__error) & (__s32)(127|PVFS_ERROR_BIT|PVFS_NON_ERRNO_ERROR_BIT))
127 /* PVFS2 error codes, compliments of asm/errno.h */
128 #define PVFS_EPERM E(1) /* Operation not permitted */
129 #define PVFS_ENOENT E(2) /* No such file or directory */
130 #define PVFS_EINTR E(3) /* Interrupted system call */
131 #define PVFS_EIO E(4) /* I/O error */
132 #define PVFS_ENXIO E(5) /* No such device or address */
133 #define PVFS_EBADF E(6) /* Bad file number */
134 #define PVFS_EAGAIN E(7) /* Try again */
135 #define PVFS_ENOMEM E(8) /* Out of memory */
136 #define PVFS_EFAULT E(9) /* Bad address */
137 #define PVFS_EBUSY E(10) /* Device or resource busy */
138 #define PVFS_EEXIST E(11) /* File exists */
139 #define PVFS_ENODEV E(12) /* No such device */
140 #define PVFS_ENOTDIR E(13) /* Not a directory */
141 #define PVFS_EISDIR E(14) /* Is a directory */
142 #define PVFS_EINVAL E(15) /* Invalid argument */
143 #define PVFS_EMFILE E(16) /* Too many open files */
144 #define PVFS_EFBIG E(17) /* File too large */
145 #define PVFS_ENOSPC E(18) /* No space left on device */
146 #define PVFS_EROFS E(19) /* Read-only file system */
147 #define PVFS_EMLINK E(20) /* Too many links */
148 #define PVFS_EPIPE E(21) /* Broken pipe */
149 #define PVFS_EDEADLK E(22) /* Resource deadlock would occur */
150 #define PVFS_ENAMETOOLONG E(23) /* File name too long */
151 #define PVFS_ENOLCK E(24) /* No record locks available */
152 #define PVFS_ENOSYS E(25) /* Function not implemented */
153 #define PVFS_ENOTEMPTY E(26) /* Directory not empty */
155 #define PVFS_ELOOP E(27) * Too many symbolic links encountered
157 #define PVFS_EWOULDBLOCK E(28) /* Operation would block */
158 #define PVFS_ENOMSG E(29) /* No message of desired type */
159 #define PVFS_EUNATCH E(30) /* Protocol driver not attached */
160 #define PVFS_EBADR E(31) /* Invalid request descriptor */
161 #define PVFS_EDEADLOCK E(32)
162 #define PVFS_ENODATA E(33) /* No data available */
163 #define PVFS_ETIME E(34) /* Timer expired */
164 #define PVFS_ENONET E(35) /* Machine is not on the network */
165 #define PVFS_EREMOTE E(36) /* Object is remote */
166 #define PVFS_ECOMM E(37) /* Communication error on send */
167 #define PVFS_EPROTO E(38) /* Protocol error */
168 #define PVFS_EBADMSG E(39) /* Not a data message */
170 #define PVFS_EOVERFLOW E(40) * Value too large for defined data
174 #define PVFS_ERESTART E(41) * Interrupted system call should be
177 #define PVFS_EMSGSIZE E(42) /* Message too long */
178 #define PVFS_EPROTOTYPE E(43) /* Protocol wrong type for socket */
179 #define PVFS_ENOPROTOOPT E(44) /* Protocol not available */
180 #define PVFS_EPROTONOSUPPORT E(45) /* Protocol not supported */
182 #define PVFS_EOPNOTSUPP E(46) * Operation not supported on transport
185 #define PVFS_EADDRINUSE E(47) /* Address already in use */
186 #define PVFS_EADDRNOTAVAIL E(48) /* Cannot assign requested address */
187 #define PVFS_ENETDOWN E(49) /* Network is down */
188 #define PVFS_ENETUNREACH E(50) /* Network is unreachable */
190 #define PVFS_ENETRESET E(51) * Network dropped connection because
193 #define PVFS_ENOBUFS E(52) /* No buffer space available */
194 #define PVFS_ETIMEDOUT E(53) /* Connection timed out */
195 #define PVFS_ECONNREFUSED E(54) /* Connection refused */
196 #define PVFS_EHOSTDOWN E(55) /* Host is down */
197 #define PVFS_EHOSTUNREACH E(56) /* No route to host */
198 #define PVFS_EALREADY E(57) /* Operation already in progress */
199 #define PVFS_EACCES E(58) /* Access not allowed */
200 #define PVFS_ECONNRESET E(59) /* Connection reset by peer */
201 #define PVFS_ERANGE E(60) /* Math out of range or buf too small */
203 /***************** non-errno/pvfs2 specific error codes *****************/
204 #define PVFS_ECANCEL (1|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
205 #define PVFS_EDEVINIT (2|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
206 #define PVFS_EDETAIL (3|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
207 #define PVFS_EHOSTNTFD (4|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
208 #define PVFS_EADDRNTFD (5|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
209 #define PVFS_ENORECVR (6|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
210 #define PVFS_ETRYAGAIN (7|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
211 #define PVFS_ENOTPVFS (8|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
212 #define PVFS_ESECURITY (9|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT))
215 * NOTE: PLEASE DO NOT ARBITRARILY ADD NEW ERRNO ERROR CODES!
217 * IF YOU CHOOSE TO ADD A NEW ERROR CODE (DESPITE OUR PLEA), YOU ALSO
218 * NEED TO INCREMENT PVFS_ERRNO MAX (BELOW) AND ADD A MAPPING TO A
219 * UNIX ERRNO VALUE IN THE MACROS BELOW (USED IN
220 * src/common/misc/errno-mapping.c and the kernel module)
222 #define PVFS_ERRNO_MAX 61
224 #define PVFS_ERROR_BMI (1 << 7) /* BMI-specific error */
225 #define PVFS_ERROR_TROVE (2 << 7) /* Trove-specific error */
226 #define PVFS_ERROR_FLOW (3 << 7)
227 #define PVFS_ERROR_SM (4 << 7) /* state machine specific error */
228 #define PVFS_ERROR_SCHED (5 << 7)
229 #define PVFS_ERROR_CLIENT (6 << 7)
230 #define PVFS_ERROR_DEV (7 << 7) /* device file interaction */
232 #define PVFS_ERROR_CLASS_BITS \
238 PVFS_ERROR_CLIENT | \
241 #define DECLARE_ERRNO_MAPPING() \
242 __s32 PINT_errno_mapping[PVFS_ERRNO_MAX + 1] = { \
243 0, /* leave this one empty */ \
283 EOVERFLOW, /* 40 */ \
293 ENETUNREACH, /* 50 */ \
302 ECONNRESET, /* 59 */ \
304 0 /* PVFS_ERRNO_MAX */ \
306 const char *PINT_non_errno_strerror_mapping[] = { \
308 "Operation cancelled (possibly due to timeout)", \
309 "Device initialization failed", \
310 "Detailed per-server errors are available", \
312 "No address associated with name", \
313 "Unknown server error", \
314 "Host name lookup failure", \
315 "Path contains non-PVFS elements", \
318 __s32 PINT_non_errno_mapping[] = { \
319 0, /* leave this one empty */ \
320 PVFS_ECANCEL, /* 1 */ \
321 PVFS_EDEVINIT, /* 2 */ \
322 PVFS_EDETAIL, /* 3 */ \
323 PVFS_EHOSTNTFD, /* 4 */ \
324 PVFS_EADDRNTFD, /* 5 */ \
325 PVFS_ENORECVR, /* 6 */ \
326 PVFS_ETRYAGAIN, /* 7 */ \
327 PVFS_ENOTPVFS, /* 8 */ \
328 PVFS_ESECURITY, /* 9 */ \
332 * NOTE: PVFS_get_errno_mapping will convert a PVFS_ERROR_CODE to an
333 * errno value. If the error code is a pvfs2 specific error code
334 * (i.e. a PVFS_NON_ERRNO_ERROR_CODE), PVFS_get_errno_mapping will
335 * return an index into the PINT_non_errno_strerror_mapping array which
336 * can be used for getting the pvfs2 specific strerror message given
337 * the error code. if the value is not a recognized error code, the
338 * passed in value will be returned unchanged.
340 #define DECLARE_ERRNO_MAPPING_AND_FN() \
341 extern __s32 PINT_errno_mapping[]; \
342 extern __s32 PINT_non_errno_mapping[]; \
343 extern const char *PINT_non_errno_strerror_mapping[]; \
344 static __s32 PVFS_get_errno_mapping(__s32 error) \
346 __s32 ret = error, mask = 0; \
347 __s32 positive = ((error > -1) ? 1 : 0); \
348 if (IS_PVFS_NON_ERRNO_ERROR((positive ? error : -error))) { \
349 mask = (PVFS_NON_ERRNO_ERROR_BIT | \
351 PVFS_ERROR_CLASS_BITS); \
352 ret = PVFS_NON_ERRNO_ERROR_CODE(((positive ? \
357 else if (IS_PVFS_ERROR((positive ? error : -error))) { \
358 mask = (PVFS_ERROR_BIT | \
359 PVFS_ERROR_CLASS_BITS); \
360 ret = PINT_errno_mapping[PVFS_ERROR_CODE(((positive ? \
367 DECLARE_ERRNO_MAPPING()
369 /* permission bits */
370 #define PVFS_O_EXECUTE (1 << 0)
371 #define PVFS_O_WRITE (1 << 1)
372 #define PVFS_O_READ (1 << 2)
373 #define PVFS_G_EXECUTE (1 << 3)
374 #define PVFS_G_WRITE (1 << 4)
375 #define PVFS_G_READ (1 << 5)
376 #define PVFS_U_EXECUTE (1 << 6)
377 #define PVFS_U_WRITE (1 << 7)
378 #define PVFS_U_READ (1 << 8)
379 /* no PVFS_U_VTX (sticky bit) */
380 #define PVFS_G_SGID (1 << 10)
381 #define PVFS_U_SUID (1 << 11)
383 /* definition taken from stdint.h */
384 #define INT32_MAX (2147483647)
385 #define PVFS_ITERATE_START (INT32_MAX - 1)
386 #define PVFS_ITERATE_END (INT32_MAX - 2)
387 #define PVFS_READDIR_START PVFS_ITERATE_START
388 #define PVFS_READDIR_END PVFS_ITERATE_END
389 #define PVFS_IMMUTABLE_FL FS_IMMUTABLE_FL
390 #define PVFS_APPEND_FL FS_APPEND_FL
391 #define PVFS_NOATIME_FL FS_NOATIME_FL
392 #define PVFS_MIRROR_FL 0x01000000ULL
393 #define PVFS_O_EXECUTE (1 << 0)
394 #define PVFS_FS_ID_NULL ((__s32)0)
395 #define PVFS_ATTR_SYS_UID (1 << 0)
396 #define PVFS_ATTR_SYS_GID (1 << 1)
397 #define PVFS_ATTR_SYS_PERM (1 << 2)
398 #define PVFS_ATTR_SYS_ATIME (1 << 3)
399 #define PVFS_ATTR_SYS_CTIME (1 << 4)
400 #define PVFS_ATTR_SYS_MTIME (1 << 5)
401 #define PVFS_ATTR_SYS_TYPE (1 << 6)
402 #define PVFS_ATTR_SYS_ATIME_SET (1 << 7)
403 #define PVFS_ATTR_SYS_MTIME_SET (1 << 8)
404 #define PVFS_ATTR_SYS_SIZE (1 << 20)
405 #define PVFS_ATTR_SYS_LNK_TARGET (1 << 24)
406 #define PVFS_ATTR_SYS_DFILE_COUNT (1 << 25)
407 #define PVFS_ATTR_SYS_DIRENT_COUNT (1 << 26)
408 #define PVFS_ATTR_SYS_BLKSIZE (1 << 28)
409 #define PVFS_ATTR_SYS_MIRROR_COPIES_COUNT (1 << 29)
410 #define PVFS_ATTR_SYS_COMMON_ALL \
411 (PVFS_ATTR_SYS_UID | \
412 PVFS_ATTR_SYS_GID | \
413 PVFS_ATTR_SYS_PERM | \
414 PVFS_ATTR_SYS_ATIME | \
415 PVFS_ATTR_SYS_CTIME | \
416 PVFS_ATTR_SYS_MTIME | \
419 #define PVFS_ATTR_SYS_ALL_SETABLE \
420 (PVFS_ATTR_SYS_COMMON_ALL-PVFS_ATTR_SYS_TYPE)
422 #define PVFS_ATTR_SYS_ALL_NOHINT \
423 (PVFS_ATTR_SYS_COMMON_ALL | \
424 PVFS_ATTR_SYS_SIZE | \
425 PVFS_ATTR_SYS_LNK_TARGET | \
426 PVFS_ATTR_SYS_DFILE_COUNT | \
427 PVFS_ATTR_SYS_MIRROR_COPIES_COUNT | \
428 PVFS_ATTR_SYS_DIRENT_COUNT | \
429 PVFS_ATTR_SYS_BLKSIZE)
430 #define PVFS_XATTR_REPLACE 0x2
431 #define PVFS_XATTR_CREATE 0x1
432 #define PVFS_MAX_SERVER_ADDR_LEN 256
433 #define PVFS_NAME_MAX 256
435 * max extended attribute name len as imposed by the VFS and exploited for the
436 * upcall request types.
437 * NOTE: Please retain them as multiples of 8 even if you wish to change them
438 * This is *NECESSARY* for supporting 32 bit user-space binaries on a 64-bit
439 * kernel. Due to implementation within DBPF, this really needs to be
440 * PVFS_NAME_MAX, which it was the same value as, but no reason to let it
441 * break if that changes in the future.
443 #define PVFS_MAX_XATTR_NAMELEN PVFS_NAME_MAX /* Not the same as
444 * XATTR_NAME_MAX defined
447 #define PVFS_MAX_XATTR_VALUELEN 8192 /* Not the same as XATTR_SIZE_MAX
448 * defined by <linux/xattr.h>
450 #define PVFS_MAX_XATTR_LISTLEN 16 /* Not the same as XATTR_LIST_MAX
451 * defined by <linux/xattr.h>
454 * PVFS I/O operation types, used in both system and server interfaces.
462 * If this enum is modified the server parameters related to the precreate pool
463 * batch and low threshold sizes may need to be modified to reflect this
468 PVFS_TYPE_METAFILE
= (1 << 0),
469 PVFS_TYPE_DATAFILE
= (1 << 1),
470 PVFS_TYPE_DIRECTORY
= (1 << 2),
471 PVFS_TYPE_SYMLINK
= (1 << 3),
472 PVFS_TYPE_DIRDATA
= (1 << 4),
473 PVFS_TYPE_INTERNAL
= (1 << 5) /* for the server's private use */
477 * PVFS_certificate simply stores a buffer with the buffer size.
478 * The buffer can be converted to an OpenSSL X509 struct for use.
480 struct PVFS_certificate
{
486 * A credential identifies a user and is signed by the client/user
489 struct PVFS_credential
{
490 __u32 userid
; /* user id */
491 __u32 num_groups
; /* length of group_array */
492 __u32
*group_array
; /* groups for which the user is a member */
493 char *issuer
; /* alias of the issuing server */
494 __u64 timeout
; /* seconds after epoch to time out */
495 __u32 sig_size
; /* length of the signature in bytes */
496 unsigned char *signature
; /* digital signature */
497 struct PVFS_certificate certificate
; /* user certificate buffer */
499 #define extra_size_PVFS_credential (PVFS_REQ_LIMIT_GROUPS * \
501 PVFS_REQ_LIMIT_ISSUER + \
502 PVFS_REQ_LIMIT_SIGNATURE + \
503 extra_size_PVFS_certificate)
505 /* This structure is used by the VFS-client interaction alone */
506 struct PVFS_keyval_pair
{
507 char key
[PVFS_MAX_XATTR_NAMELEN
];
508 __s32 key_sz
; /* __s32 for portable, fixed-size structures */
510 char val
[PVFS_MAX_XATTR_VALUELEN
];
513 /* pvfs2-sysint.h ***********************************************************/
514 /* Describes attributes for a file, directory, or symlink. */
515 struct PVFS_sys_attr_s
{
524 /* NOTE: caller must free if valid */
527 /* Changed to __s32 so that size of structure does not change */
530 /* Changed to __s32 so that size of structure does not change */
531 __s32 distr_dir_servers_initial
;
533 /* Changed to __s32 so that size of structure does not change */
534 __s32 distr_dir_servers_max
;
536 /* Changed to __s32 so that size of structure does not change */
537 __s32 distr_dir_split_size
;
539 __u32 mirror_copies_count
;
541 /* NOTE: caller must free if valid */
544 /* NOTE: caller must free if valid */
548 enum pvfs2_ds_type objtype
;
554 #define PVFS2_LOOKUP_LINK_NO_FOLLOW 0
555 #define PVFS2_LOOKUP_LINK_FOLLOW 1
557 /* pint-dev.h ***************************************************************/
559 /* parameter structure used in PVFS_DEV_DEBUG ioctl command */
560 struct dev_mask_info_s
{
568 struct dev_mask2_info_s
{
573 /* pvfs2-util.h *************************************************************/
574 #define PVFS_util_min(x1, x2) (((x1) > (x2)) ? (x2) : (x1))
575 __s32
PVFS_util_translate_mode(int mode
);
577 /* pvfs2-debug.h ************************************************************/
578 #include "pvfs2-debug.h"
580 /* pvfs2-internal.h *********************************************************/
581 #define llu(x) (unsigned long long)(x)
582 #define lld(x) (long long)(x)
584 /* pint-dev-shared.h ********************************************************/
585 #define PVFS_DEV_MAGIC 'k'
587 #define PVFS2_READDIR_DEFAULT_DESC_COUNT 5
589 #define DEV_GET_MAGIC 0x1
590 #define DEV_GET_MAX_UPSIZE 0x2
591 #define DEV_GET_MAX_DOWNSIZE 0x3
593 #define DEV_REMOUNT_ALL 0x5
594 #define DEV_DEBUG 0x6
595 #define DEV_UPSTREAM 0x7
596 #define DEV_CLIENT_MASK 0x8
597 #define DEV_CLIENT_STRING 0x9
598 #define DEV_MAX_NR 0xa
600 /* supported ioctls, codes are with respect to user-space */
602 PVFS_DEV_GET_MAGIC
= _IOW(PVFS_DEV_MAGIC
, DEV_GET_MAGIC
, __s32
),
603 PVFS_DEV_GET_MAX_UPSIZE
=
604 _IOW(PVFS_DEV_MAGIC
, DEV_GET_MAX_UPSIZE
, __s32
),
605 PVFS_DEV_GET_MAX_DOWNSIZE
=
606 _IOW(PVFS_DEV_MAGIC
, DEV_GET_MAX_DOWNSIZE
, __s32
),
607 PVFS_DEV_MAP
= _IO(PVFS_DEV_MAGIC
, DEV_MAP
),
608 PVFS_DEV_REMOUNT_ALL
= _IO(PVFS_DEV_MAGIC
, DEV_REMOUNT_ALL
),
609 PVFS_DEV_DEBUG
= _IOR(PVFS_DEV_MAGIC
, DEV_DEBUG
, __s32
),
610 PVFS_DEV_UPSTREAM
= _IOW(PVFS_DEV_MAGIC
, DEV_UPSTREAM
, int),
611 PVFS_DEV_CLIENT_MASK
= _IOW(PVFS_DEV_MAGIC
,
613 struct dev_mask2_info_s
),
614 PVFS_DEV_CLIENT_STRING
= _IOW(PVFS_DEV_MAGIC
,
617 PVFS_DEV_MAXNR
= DEV_MAX_NR
,
621 * version number for use in communicating between kernel space and user
625 #define PVFS_KERNEL_PROTO_VERSION \
626 ((PVFS2_VERSION_MAJOR * 10000) + \
627 (PVFS2_VERSION_MINOR * 100) + \
630 #define PVFS_KERNEL_PROTO_VERSION 0
633 * describes memory regions to map in the PVFS_DEV_MAP ioctl.
634 * NOTE: See devpvfs2-req.c for 32 bit compat structure.
635 * Since this structure has a variable-sized layout that is different
636 * on 32 and 64 bit platforms, we need to normalize to a 64 bit layout
637 * on such systems before servicing ioctl calls from user-space binaries
638 * that may be 32 bit!
640 struct PVFS_dev_map_desc
{
647 /* gossip.h *****************************************************************/
649 #ifdef GOSSIP_DISABLE_DEBUG
650 #define gossip_debug(mask, format, f...) do {} while (0)
652 extern __u64 gossip_debug_mask
;
653 extern struct client_debug_mask client_debug_mask
;
655 /* try to avoid function call overhead by checking masks in macro */
656 #define gossip_debug(mask, format, f...) \
658 if (gossip_debug_mask & mask) \
659 printk(format, ##f); \
661 #endif /* GOSSIP_DISABLE_DEBUG */
663 /* do file and line number printouts w/ the GNU preprocessor */
664 #define gossip_ldebug(mask, format, f...) \
665 gossip_debug(mask, "%s: " format, __func__, ##f)
667 #define gossip_err printk
668 #define gossip_lerr(format, f...) \
669 gossip_err("%s line %d: " format, \