X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fum%2Finclude%2Fubd_user.h;h=bb66517f0739e655057ff20dab63ed300cf48341;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9bac59c4c9df4ab4e1f5a89ecbafbd342f3fd6d4;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/um/include/ubd_user.h b/arch/um/include/ubd_user.h index 9bac59c4c..bb66517f0 100644 --- a/arch/um/include/ubd_user.h +++ b/arch/um/include/ubd_user.h @@ -7,63 +7,10 @@ #ifndef __UM_UBD_USER_H #define __UM_UBD_USER_H -#include "os.h" - -enum ubd_req { UBD_READ, UBD_WRITE, UBD_MMAP }; - -struct io_thread_req { - enum ubd_req op; - int fds[2]; - unsigned long offsets[2]; - unsigned long long offset; - unsigned long length; - char *buffer; - int sectorsize; - unsigned long sector_mask; - unsigned long long cow_offset; - unsigned long bitmap_words[2]; - int map_fd; - unsigned long long map_offset; - int error; -}; - -extern int open_ubd_file(char *file, struct openflags *openflags, - char **backing_file_out, int *bitmap_offset_out, - unsigned long *bitmap_len_out, int *data_offset_out, - int *create_cow_out); -extern int create_cow_file(char *cow_file, char *backing_file, - struct openflags flags, int sectorsize, - int alignment, int *bitmap_offset_out, - unsigned long *bitmap_len_out, - int *data_offset_out); -extern int read_cow_bitmap(int fd, void *buf, int offset, int len); -extern int read_ubd_fs(int fd, void *buffer, int len); -extern int write_ubd_fs(int fd, char *buffer, int len); +extern void ignore_sigwinch_sig(void); extern int start_io_thread(unsigned long sp, int *fds_out); -extern void do_io(struct io_thread_req *req); - -static inline int ubd_test_bit(__u64 bit, unsigned char *data) -{ - __u64 n; - int bits, off; - - bits = sizeof(data[0]) * 8; - n = bit / bits; - off = bit % bits; - return((data[n] & (1 << off)) != 0); -} - -static inline void ubd_set_bit(__u64 bit, unsigned char *data) -{ - __u64 n; - int bits, off; - - bits = sizeof(data[0]) * 8; - n = bit / bits; - off = bit % bits; - data[n] |= (1 << off); -} - +extern int io_thread(void *arg); +extern int kernel_fd; #endif