loop: fastfs support
[linux-2.6-block.git] / include / linux / loop.h
index 6ffd6db5bb0d746c2a92deb358c450b2989b5c61..e5d3cb5aaa49959eebae2429581a918eeed24daa 100644 (file)
@@ -50,22 +50,29 @@ struct loop_device {
 
        struct file *   lo_backing_file;
        struct block_device *lo_device;
+       struct block_device *fs_bdev;
        unsigned        lo_blocksize;
        void            *key_data; 
+       unsigned int    lo_switch;
 
        gfp_t           old_gfp_mask;
 
        spinlock_t              lo_lock;
        struct bio              *lo_bio;
        struct bio              *lo_biotail;
+       unsigned int            lo_bio_cnt;
        int                     lo_state;
        struct mutex            lo_ctl_mutex;
        struct task_struct      *lo_thread;
        wait_queue_head_t       lo_event;
+       wait_queue_head_t       lo_bio_wait;
+       struct timer_list       lo_bio_timer;
 
        struct request_queue    *lo_queue;
        struct gendisk          *lo_disk;
        struct list_head        lo_list;
+
+       unsigned int            blkbits;
 };
 
 #endif /* __KERNEL__ */
@@ -77,6 +84,7 @@ enum {
        LO_FLAGS_READ_ONLY      = 1,
        LO_FLAGS_USE_AOPS       = 2,
        LO_FLAGS_AUTOCLEAR      = 4,
+       LO_FLAGS_FASTFS         = 8,
 };
 
 #include <asm/posix_types.h>   /* for __kernel_old_dev_t */
@@ -160,5 +168,11 @@ int loop_unregister_transfer(int number);
 #define LOOP_SET_STATUS64      0x4C04
 #define LOOP_GET_STATUS64      0x4C05
 #define LOOP_CHANGE_FD         0x4C06
+#define LOOP_SET_FASTFS                0x4C07
+
+enum {
+       LOOP_EXTENT_RW_MAGIC =  0x19283744,
+       LOOP_SWITCH_RW_MAGIC =  0xfeedbeec,
+};
 
 #endif