diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-22 16:34:51 +0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-22 16:34:51 +0400 |
commit | c2fb7916927e989ea424e61ce5fe617e54878827 (patch) | |
tree | 02f9d5482075f8931637d82bb697a6470270136a /include/uapi/linux/bfs_fs.h | |
parent | 29de6ce574870a0d3fd157afdbf51c0282e2bf63 (diff) | |
parent | 6f0c0580b70c89094b3422ba81118c7b959c7556 (diff) | |
download | linux-c2fb7916927e989ea424e61ce5fe617e54878827.tar.xz |
Merge tag 'v3.7-rc2' into drm-intel-next-queued
Linux 3.7-rc2
Backmerge to solve two ugly conflicts:
- uapi. We've already added new ioctl definitions for -next. Do I need to say more?
- wc support gtt ptes. We've had to revert this for snb+ for 3.7 and
also fix a few other things in the code. Now we know how to make it
work on snb+, but to avoid losing the other fixes do the backmerge
first before re-enabling wc gtt ptes on snb+.
And a few other minor things, among them git getting confused in
intel_dp.c and seemingly causing a conflict out of nothing ...
Conflicts:
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_modes.c
include/drm/i915_drm.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/uapi/linux/bfs_fs.h')
-rw-r--r-- | include/uapi/linux/bfs_fs.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/include/uapi/linux/bfs_fs.h b/include/uapi/linux/bfs_fs.h new file mode 100644 index 000000000000..1c0b355aa515 --- /dev/null +++ b/include/uapi/linux/bfs_fs.h @@ -0,0 +1,81 @@ +/* + * include/linux/bfs_fs.h - BFS data structures on disk. + * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com> + */ + +#ifndef _LINUX_BFS_FS_H +#define _LINUX_BFS_FS_H + +#include <linux/types.h> + +#define BFS_BSIZE_BITS 9 +#define BFS_BSIZE (1<<BFS_BSIZE_BITS) + +#define BFS_MAGIC 0x1BADFACE +#define BFS_ROOT_INO 2 +#define BFS_INODES_PER_BLOCK 8 + +/* SVR4 vnode type values (bfs_inode->i_vtype) */ +#define BFS_VDIR 2L +#define BFS_VREG 1L + +/* BFS inode layout on disk */ +struct bfs_inode { + __le16 i_ino; + __u16 i_unused; + __le32 i_sblock; + __le32 i_eblock; + __le32 i_eoffset; + __le32 i_vtype; + __le32 i_mode; + __le32 i_uid; + __le32 i_gid; + __le32 i_nlink; + __le32 i_atime; + __le32 i_mtime; + __le32 i_ctime; + __u32 i_padding[4]; +}; + +#define BFS_NAMELEN 14 +#define BFS_DIRENT_SIZE 16 +#define BFS_DIRS_PER_BLOCK 32 + +struct bfs_dirent { + __le16 ino; + char name[BFS_NAMELEN]; +}; + +/* BFS superblock layout on disk */ +struct bfs_super_block { + __le32 s_magic; + __le32 s_start; + __le32 s_end; + __le32 s_from; + __le32 s_to; + __s32 s_bfrom; + __s32 s_bto; + char s_fsname[6]; + char s_volume[6]; + __u32 s_padding[118]; +}; + + +#define BFS_OFF2INO(offset) \ + ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO) + +#define BFS_INO2OFF(ino) \ + ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) +#define BFS_NZFILESIZE(ip) \ + ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE) + +#define BFS_FILESIZE(ip) \ + ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) + +#define BFS_FILEBLOCKS(ip) \ + ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) +#define BFS_UNCLEAN(bfs_sb, sb) \ + ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) + + +#endif /* _LINUX_BFS_FS_H */ |