diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/linux/loop.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/linux/loop.h')
| -rw-r--r-- | include/linux/loop.h | 93 |
1 files changed, 4 insertions, 89 deletions
diff --git a/include/linux/loop.h b/include/linux/loop.h index 11a41a8f08eb..6492181bcb1d 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | #ifndef _LINUX_LOOP_H | ||
| 2 | #define _LINUX_LOOP_H | ||
| 3 | |||
| 4 | /* | 1 | /* |
| 5 | * include/linux/loop.h | 2 | * include/linux/loop.h |
| 6 | * | 3 | * |
| @@ -9,15 +6,14 @@ | |||
| 9 | * Copyright 1993 by Theodore Ts'o. Redistribution of this file is | 6 | * Copyright 1993 by Theodore Ts'o. Redistribution of this file is |
| 10 | * permitted under the GNU General Public License. | 7 | * permitted under the GNU General Public License. |
| 11 | */ | 8 | */ |
| 9 | #ifndef _LINUX_LOOP_H | ||
| 10 | #define _LINUX_LOOP_H | ||
| 12 | 11 | ||
| 13 | #define LO_NAME_SIZE 64 | ||
| 14 | #define LO_KEY_SIZE 32 | ||
| 15 | |||
| 16 | #ifdef __KERNEL__ | ||
| 17 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
| 18 | #include <linux/blkdev.h> | 13 | #include <linux/blkdev.h> |
| 19 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
| 20 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
| 16 | #include <uapi/linux/loop.h> | ||
| 21 | 17 | ||
| 22 | /* Possible states of device */ | 18 | /* Possible states of device */ |
| 23 | enum { | 19 | enum { |
| @@ -44,7 +40,7 @@ struct loop_device { | |||
| 44 | int lo_encrypt_key_size; | 40 | int lo_encrypt_key_size; |
| 45 | struct loop_func_table *lo_encryption; | 41 | struct loop_func_table *lo_encryption; |
| 46 | __u32 lo_init[2]; | 42 | __u32 lo_init[2]; |
| 47 | uid_t lo_key_owner; /* Who set the key */ | 43 | kuid_t lo_key_owner; /* Who set the key */ |
| 48 | int (*ioctl)(struct loop_device *, int cmd, | 44 | int (*ioctl)(struct loop_device *, int cmd, |
| 49 | unsigned long arg); | 45 | unsigned long arg); |
| 50 | 46 | ||
| @@ -66,69 +62,6 @@ struct loop_device { | |||
| 66 | struct gendisk *lo_disk; | 62 | struct gendisk *lo_disk; |
| 67 | }; | 63 | }; |
| 68 | 64 | ||
| 69 | #endif /* __KERNEL__ */ | ||
| 70 | |||
| 71 | /* | ||
| 72 | * Loop flags | ||
| 73 | */ | ||
| 74 | enum { | ||
| 75 | LO_FLAGS_READ_ONLY = 1, | ||
| 76 | LO_FLAGS_AUTOCLEAR = 4, | ||
| 77 | LO_FLAGS_PARTSCAN = 8, | ||
| 78 | }; | ||
| 79 | |||
| 80 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | ||
| 81 | #include <linux/types.h> /* for __u64 */ | ||
| 82 | |||
| 83 | /* Backwards compatibility version */ | ||
| 84 | struct loop_info { | ||
| 85 | int lo_number; /* ioctl r/o */ | ||
| 86 | __kernel_old_dev_t lo_device; /* ioctl r/o */ | ||
| 87 | unsigned long lo_inode; /* ioctl r/o */ | ||
| 88 | __kernel_old_dev_t lo_rdevice; /* ioctl r/o */ | ||
| 89 | int lo_offset; | ||
| 90 | int lo_encrypt_type; | ||
| 91 | int lo_encrypt_key_size; /* ioctl w/o */ | ||
| 92 | int lo_flags; /* ioctl r/o */ | ||
| 93 | char lo_name[LO_NAME_SIZE]; | ||
| 94 | unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ | ||
| 95 | unsigned long lo_init[2]; | ||
| 96 | char reserved[4]; | ||
| 97 | }; | ||
| 98 | |||
| 99 | struct loop_info64 { | ||
| 100 | __u64 lo_device; /* ioctl r/o */ | ||
| 101 | __u64 lo_inode; /* ioctl r/o */ | ||
| 102 | __u64 lo_rdevice; /* ioctl r/o */ | ||
| 103 | __u64 lo_offset; | ||
| 104 | __u64 lo_sizelimit;/* bytes, 0 == max available */ | ||
| 105 | __u32 lo_number; /* ioctl r/o */ | ||
| 106 | __u32 lo_encrypt_type; | ||
| 107 | __u32 lo_encrypt_key_size; /* ioctl w/o */ | ||
| 108 | __u32 lo_flags; /* ioctl r/o */ | ||
| 109 | __u8 lo_file_name[LO_NAME_SIZE]; | ||
| 110 | __u8 lo_crypt_name[LO_NAME_SIZE]; | ||
| 111 | __u8 lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ | ||
| 112 | __u64 lo_init[2]; | ||
| 113 | }; | ||
| 114 | |||
| 115 | /* | ||
| 116 | * Loop filter types | ||
| 117 | */ | ||
| 118 | |||
| 119 | #define LO_CRYPT_NONE 0 | ||
| 120 | #define LO_CRYPT_XOR 1 | ||
| 121 | #define LO_CRYPT_DES 2 | ||
| 122 | #define LO_CRYPT_FISH2 3 /* Twofish encryption */ | ||
| 123 | #define LO_CRYPT_BLOW 4 | ||
| 124 | #define LO_CRYPT_CAST128 5 | ||
| 125 | #define LO_CRYPT_IDEA 6 | ||
| 126 | #define LO_CRYPT_DUMMY 9 | ||
| 127 | #define LO_CRYPT_SKIPJACK 10 | ||
| 128 | #define LO_CRYPT_CRYPTOAPI 18 | ||
| 129 | #define MAX_LO_CRYPT 20 | ||
| 130 | |||
| 131 | #ifdef __KERNEL__ | ||
| 132 | /* Support for loadable transfer modules */ | 65 | /* Support for loadable transfer modules */ |
| 133 | struct loop_func_table { | 66 | struct loop_func_table { |
| 134 | int number; /* filter type */ | 67 | int number; /* filter type */ |
| @@ -147,21 +80,3 @@ int loop_register_transfer(struct loop_func_table *funcs); | |||
| 147 | int loop_unregister_transfer(int number); | 80 | int loop_unregister_transfer(int number); |
| 148 | 81 | ||
| 149 | #endif | 82 | #endif |
| 150 | /* | ||
| 151 | * IOCTL commands --- we will commandeer 0x4C ('L') | ||
| 152 | */ | ||
| 153 | |||
| 154 | #define LOOP_SET_FD 0x4C00 | ||
| 155 | #define LOOP_CLR_FD 0x4C01 | ||
| 156 | #define LOOP_SET_STATUS 0x4C02 | ||
| 157 | #define LOOP_GET_STATUS 0x4C03 | ||
| 158 | #define LOOP_SET_STATUS64 0x4C04 | ||
| 159 | #define LOOP_GET_STATUS64 0x4C05 | ||
| 160 | #define LOOP_CHANGE_FD 0x4C06 | ||
| 161 | #define LOOP_SET_CAPACITY 0x4C07 | ||
| 162 | |||
| 163 | /* /dev/loop-control interface */ | ||
| 164 | #define LOOP_CTL_ADD 0x4C80 | ||
| 165 | #define LOOP_CTL_REMOVE 0x4C81 | ||
| 166 | #define LOOP_CTL_GET_FREE 0x4C82 | ||
| 167 | #endif | ||
