cregit-Linux how code gets into the kernel

Release 4.7 drivers/block/loop.h

Directory: drivers/block
/*
 * loop.h
 *
 * Written by Theodore Ts'o, 3/29/93.
 *
 * Copyright 1993 by Theodore Ts'o.  Redistribution of this file is
 * permitted under the GNU General Public License.
 */
#ifndef _LINUX_LOOP_H

#define _LINUX_LOOP_H

#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/kthread.h>
#include <uapi/linux/loop.h>

/* Possible states of device */
enum {
	
Lo_unbound,
	
Lo_bound,
	
Lo_rundown,
};

struct loop_func_table;


struct loop_device {
	
int		lo_number;
	
atomic_t	lo_refcnt;
	
loff_t		lo_offset;
	
loff_t		lo_sizelimit;
	
int		lo_flags;
	
int		(*transfer)(struct loop_device *, int cmd,
				    struct page *raw_page, unsigned raw_off,
				    struct page *loop_page, unsigned loop_off,
				    int size, sector_t real_block);
	
char		lo_file_name[LO_NAME_SIZE];
	
char		lo_crypt_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];
	
kuid_t		lo_key_owner;	/* Who set the key */
	
int		(*ioctl)(struct loop_device *, int cmd, 
				 unsigned long arg); 

	
struct file *	lo_backing_file;
	
struct block_device *lo_device;
	
unsigned	lo_blocksize;
	
void		*key_data; 

	
gfp_t		old_gfp_mask;

	
spinlock_t		lo_lock;
	
int			lo_state;
	
struct mutex		lo_ctl_mutex;
	
struct kthread_worker	worker;
	
struct task_struct	*worker_task;
	
bool			use_dio;

	
struct request_queue	*lo_queue;
	
struct blk_mq_tag_set	tag_set;
	
struct gendisk		*lo_disk;
};


struct loop_cmd {
	
struct kthread_work work;
	
struct request *rq;
	
struct list_head list;
	
bool use_aio;           /* use AIO interface to handle I/O */
	
struct kiocb iocb;
};

/* Support for loadable transfer modules */

struct loop_func_table {
	
int number;	/* filter type */ 
	
int (*transfer)(struct loop_device *lo, int cmd,
			struct page *raw_page, unsigned raw_off,
			struct page *loop_page, unsigned loop_off,
			int size, sector_t real_block);
	
int (*init)(struct loop_device *, const struct loop_info64 *); 
	/* 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);
	
struct module *owner;
}; 

int loop_register_transfer(struct loop_func_table *funcs);
int loop_unregister_transfer(int number); 

#endif

Overall Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git18954.15%618.75%
ming leiming lei4613.18%515.62%
andries brouwerandries brouwer3510.03%412.50%
andrew mortonandrew morton267.45%26.25%
linus torvaldslinus torvalds205.73%13.12%
al viroal viro102.87%412.50%
jens axboejens axboe61.72%39.38%
ingo molnaringo molnar51.43%26.25%
ken chenken chen51.43%13.12%
david howellsdavid howells30.86%13.12%
arnd bergmannarnd bergmann20.57%13.12%
adrian bunkadrian bunk10.29%13.12%
eric w. biedermaneric w. biederman10.29%13.12%
Total349100.00%32100.00%
Directory: drivers/block
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}