~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to include/xfs_fs.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2009-05-06 11:29:18 UTC
  • mfrom: (8.1.1 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090506112918-uzoyzcp90rtr8td7
Tags: 3.0.2
New bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 * SGI's XFS filesystem's major stuff (constants, structures)
23
23
 */
24
24
 
25
 
#define XFS_NAME        "xfs"
26
 
 
27
25
/*
28
26
 * Direct I/O attribute record used with XFS_IOC_DIOINFO
29
27
 * d_miniosz is the min xfer size, xfer size multiple and file seek offset
67
65
#define XFS_XFLAG_NOSYMLINKS    0x00000400      /* disallow symlink creation */
68
66
#define XFS_XFLAG_EXTSIZE       0x00000800      /* extent size allocator hint */
69
67
#define XFS_XFLAG_EXTSZINHERIT  0x00001000      /* inherit inode extent size */
70
 
#define XFS_XFLAG_NODEFRAG      0x00002000      /* do not defragment */
 
68
#define XFS_XFLAG_NODEFRAG      0x00002000      /* do not defragment */
71
69
#define XFS_XFLAG_FILESTREAM    0x00004000      /* use filestream allocator */
72
70
#define XFS_XFLAG_HASATTR       0x80000000      /* no DIFLAG for this   */
73
71
 
74
72
/*
75
73
 * Structure for XFS_IOC_GETBMAP.
76
74
 * On input, fill in bmv_offset and bmv_length of the first structure
77
 
 * to indicate the area of interest in the file, and bmv_entry with the
78
 
 * number of array elements given.  The first structure is updated on
79
 
 * return to give the offset and length for the next call.
 
75
 * to indicate the area of interest in the file, and bmv_entries with
 
76
 * the number of array elements given back.  The first structure is
 
77
 * updated on return to give the offset and length for the next call.
80
78
 */
81
79
#ifndef HAVE_GETBMAP
82
80
struct getbmap {
241
239
#define XFS_FSOP_GEOM_FLAGS_LOGV2       0x0100  /* log format version 2 */
242
240
#define XFS_FSOP_GEOM_FLAGS_SECTOR      0x0200  /* sector sizes >1BB    */
243
241
#define XFS_FSOP_GEOM_FLAGS_ATTR2       0x0400  /* inline attributes rework */
 
242
#define XFS_FSOP_GEOM_FLAGS_DIRV2CI     0x1000  /* ASCII only CI names */
244
243
#define XFS_FSOP_GEOM_FLAGS_LAZYSB      0x4000  /* lazy superblock counters */
245
244
 
246
245
 
373
372
 
374
373
typedef struct xfs_attr_multiop {
375
374
        __u32           am_opcode;
 
375
#define ATTR_OP_GET     1       /* return the indicated attr's value */
 
376
#define ATTR_OP_SET     2       /* set/create the indicated attr/value pair */
 
377
#define ATTR_OP_REMOVE  3       /* remove the indicated attr */
376
378
        __s32           am_error;
377
379
        void            __user *am_attrname;
378
380
        void            __user *am_attrvalue;
391
393
 */
392
394
typedef struct { __u32 val[2]; } xfs_fsid_t; /* file system id type */
393
395
 
394
 
 
395
 
#ifndef HAVE_FID
396
 
#define MAXFIDSZ        46
397
 
 
398
 
typedef struct fid {
399
 
        __u16           fid_len;                /* length of data in bytes */
400
 
        unsigned char   fid_data[MAXFIDSZ];     /* data (fid_len worth)  */
401
 
} fid_t;
402
 
#endif
403
 
 
404
396
typedef struct xfs_fid {
405
 
        __u16   xfs_fid_len;            /* length of remainder  */
406
 
        __u16   xfs_fid_pad;
407
 
        __u32   xfs_fid_gen;            /* generation number    */
408
 
        __u64   xfs_fid_ino;            /* 64 bits inode number */
 
397
        __u16   fid_len;                /* length of remainder  */
 
398
        __u16   fid_pad;
 
399
        __u32   fid_gen;                /* generation number    */
 
400
        __u64   fid_ino;                /* 64 bits inode number */
409
401
} xfs_fid_t;
410
402
 
411
 
typedef struct xfs_fid2 {
412
 
        __u16   fid_len;        /* length of remainder */
413
 
        __u16   fid_pad;        /* padding, must be zero */
414
 
        __u32   fid_gen;        /* generation number */
415
 
        __u64   fid_ino;        /* inode number */
416
 
} xfs_fid2_t;
417
 
 
418
403
typedef struct xfs_handle {
419
404
        union {
420
405
                __s64       align;      /* force alignment of ha_fid     */
424
409
} xfs_handle_t;
425
410
#define ha_fsid ha_u._ha_fsid
426
411
 
427
 
#define XFS_HSIZE(handle)       (((char *) &(handle).ha_fid.xfs_fid_pad  \
 
412
#define XFS_HSIZE(handle)       (((char *) &(handle).ha_fid.fid_pad      \
428
413
                                 - (char *) &(handle))                    \
429
 
                                 + (handle).ha_fid.xfs_fid_len)
430
 
 
431
 
#define XFS_HANDLE_CMP(h1, h2)  memcmp(h1, h2, sizeof(xfs_handle_t))
432
 
 
433
 
#define FSHSIZE         sizeof(fsid_t)
 
414
                                 + (handle).ha_fid.fid_len)
434
415
 
435
416
/*
436
417
 * Flags for going down operation
442
423
/*
443
424
 * ioctl commands that are used by Linux filesystems
444
425
 */
445
 
#define XFS_IOC_GETXFLAGS       _IOR('f', 1, long)
446
 
#define XFS_IOC_SETXFLAGS       _IOW('f', 2, long)
447
 
#define XFS_IOC_GETVERSION      _IOR('v', 1, long)
 
426
#define XFS_IOC_GETXFLAGS       FS_IOC_GETFLAGS
 
427
#define XFS_IOC_SETXFLAGS       FS_IOC_SETFLAGS
 
428
#define XFS_IOC_GETVERSION      FS_IOC_GETVERSION
 
429
/* 32-bit compat counterparts */
 
430
#define XFS_IOC32_GETXFLAGS     FS_IOC32_GETFLAGS
 
431
#define XFS_IOC32_SETXFLAGS     FS_IOC32_SETFLAGS
 
432
#define XFS_IOC32_GETVERSION    FS_IOC32_GETVERSION
448
433
 
449
434
/*
450
435
 * ioctl commands that replace IRIX fcntl()'s