Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

loop: remove loop.h

Merge loop.h into loop.c as all the content is only used there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220419063303.583106-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
754d9679 49c3b926

+55 -75
+55 -4
drivers/block/loop.c
··· 59 59 #include <linux/errno.h> 60 60 #include <linux/major.h> 61 61 #include <linux/wait.h> 62 - #include <linux/blkdev.h> 63 62 #include <linux/blkpg.h> 64 63 #include <linux/init.h> 65 64 #include <linux/swap.h> ··· 79 80 #include <linux/blk-cgroup.h> 80 81 #include <linux/sched/mm.h> 81 82 #include <linux/statfs.h> 82 - 83 - #include "loop.h" 84 - 85 83 #include <linux/uaccess.h> 84 + #include <linux/blk-mq.h> 85 + #include <linux/spinlock.h> 86 + #include <uapi/linux/loop.h> 87 + 88 + /* Possible states of device */ 89 + enum { 90 + Lo_unbound, 91 + Lo_bound, 92 + Lo_rundown, 93 + Lo_deleting, 94 + }; 95 + 96 + struct loop_func_table; 97 + 98 + struct loop_device { 99 + int lo_number; 100 + loff_t lo_offset; 101 + loff_t lo_sizelimit; 102 + int lo_flags; 103 + char lo_file_name[LO_NAME_SIZE]; 104 + 105 + struct file * lo_backing_file; 106 + struct block_device *lo_device; 107 + 108 + gfp_t old_gfp_mask; 109 + 110 + spinlock_t lo_lock; 111 + int lo_state; 112 + spinlock_t lo_work_lock; 113 + struct workqueue_struct *workqueue; 114 + struct work_struct rootcg_work; 115 + struct list_head rootcg_cmd_list; 116 + struct list_head idle_worker_list; 117 + struct rb_root worker_tree; 118 + struct timer_list timer; 119 + bool use_dio; 120 + bool sysfs_inited; 121 + 122 + struct request_queue *lo_queue; 123 + struct blk_mq_tag_set tag_set; 124 + struct gendisk *lo_disk; 125 + struct mutex lo_mutex; 126 + bool idr_visible; 127 + }; 128 + 129 + struct loop_cmd { 130 + struct list_head list_entry; 131 + bool use_aio; /* use AIO interface to handle I/O */ 132 + atomic_t ref; /* only for aio */ 133 + long ret; 134 + struct kiocb iocb; 135 + struct bio_vec *bvec; 136 + struct cgroup_subsys_state *blkcg_css; 137 + struct cgroup_subsys_state *memcg_css; 138 + }; 86 139 87 140 #define LOOP_IDLE_WORKER_TIMEOUT (60 * HZ) 88 141 #define LOOP_DEFAULT_HW_Q_DEPTH (128)
-71
drivers/block/loop.h
··· 1 - /* 2 - * loop.h 3 - * 4 - * Written by Theodore Ts'o, 3/29/93. 5 - * 6 - * Copyright 1993 by Theodore Ts'o. Redistribution of this file is 7 - * permitted under the GNU General Public License. 8 - */ 9 - #ifndef _LINUX_LOOP_H 10 - #define _LINUX_LOOP_H 11 - 12 - #include <linux/bio.h> 13 - #include <linux/blkdev.h> 14 - #include <linux/blk-mq.h> 15 - #include <linux/spinlock.h> 16 - #include <linux/mutex.h> 17 - #include <uapi/linux/loop.h> 18 - 19 - /* Possible states of device */ 20 - enum { 21 - Lo_unbound, 22 - Lo_bound, 23 - Lo_rundown, 24 - Lo_deleting, 25 - }; 26 - 27 - struct loop_func_table; 28 - 29 - struct loop_device { 30 - int lo_number; 31 - loff_t lo_offset; 32 - loff_t lo_sizelimit; 33 - int lo_flags; 34 - char lo_file_name[LO_NAME_SIZE]; 35 - 36 - struct file * lo_backing_file; 37 - struct block_device *lo_device; 38 - 39 - gfp_t old_gfp_mask; 40 - 41 - spinlock_t lo_lock; 42 - int lo_state; 43 - spinlock_t lo_work_lock; 44 - struct workqueue_struct *workqueue; 45 - struct work_struct rootcg_work; 46 - struct list_head rootcg_cmd_list; 47 - struct list_head idle_worker_list; 48 - struct rb_root worker_tree; 49 - struct timer_list timer; 50 - bool use_dio; 51 - bool sysfs_inited; 52 - 53 - struct request_queue *lo_queue; 54 - struct blk_mq_tag_set tag_set; 55 - struct gendisk *lo_disk; 56 - struct mutex lo_mutex; 57 - bool idr_visible; 58 - }; 59 - 60 - struct loop_cmd { 61 - struct list_head list_entry; 62 - bool use_aio; /* use AIO interface to handle I/O */ 63 - atomic_t ref; /* only for aio */ 64 - long ret; 65 - struct kiocb iocb; 66 - struct bio_vec *bvec; 67 - struct cgroup_subsys_state *blkcg_css; 68 - struct cgroup_subsys_state *memcg_css; 69 - }; 70 - 71 - #endif