summaryrefslogtreecommitdiff
path: root/include/linux/loop.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-06-22 22:01:51 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-22 22:01:51 -0700
commit2e7f53ec14475d56559bcdd07acfb737b7bff1e9 (patch)
tree964fee6f7bfc40bae796fe137e293c6831103919 /include/linux/loop.h
parent5cb7db89366c7c64c5476bec0a2939c7c75af4c9 (diff)
parent8514206eb4e65262f50d6f18293dc3175ab05693 (diff)
Merge home.transmeta.com:/home/torvalds/v2.5/xfs
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux/loop.h')
-rw-r--r--include/linux/loop.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/loop.h b/include/linux/loop.h
index 6f78f33cbac9..424ddff9b70a 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -14,6 +14,9 @@
#define LO_KEY_SIZE 32
#ifdef __KERNEL__
+#include <linux/bio.h>
+#include <linux/blk.h>
+#include <linux/spinlock.h>
/* Possible states of device */
enum {
@@ -22,18 +25,20 @@ enum {
Lo_rundown,
};
+struct loop_func_table;
+
struct loop_device {
int lo_number;
int lo_refcnt;
int lo_offset;
- int lo_encrypt_type;
- int lo_encrypt_key_size;
int lo_flags;
int (*transfer)(struct loop_device *, int cmd,
char *raw_buf, char *loop_buf, int size,
sector_t real_block);
char lo_name[LO_NAME_SIZE];
char lo_encrypt_key[LO_KEY_SIZE];
+ int lo_encrypt_key_size;
+ struct loop_func_table *lo_encryption;
__u32 lo_init[2];
uid_t lo_key_owner; /* Who set the key */
int (*ioctl)(struct loop_device *, int cmd,
@@ -129,9 +134,7 @@ struct loop_func_table {
/* release is called from loop_unregister_transfer or clr_fd */
int (*release)(struct loop_device *);
int (*ioctl)(struct loop_device *, int cmd, unsigned long arg);
- /* lock and unlock manage the module use counts */
- void (*lock)(struct loop_device *);
- void (*unlock)(struct loop_device *);
+ struct module *owner;
};
int loop_register_transfer(struct loop_func_table *funcs);