diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-18 18:35:43 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-18 18:35:43 -0500 |
commit | 3d1ab40f4c20767afbd361b258a531d73e3e6fc2 (patch) | |
tree | 2da79cc8b47a98b0496b6e762fa790a8d547977b /include/linux/elevator.h | |
parent | 1cc9be68ebcc1de9904bf225441613878da9c0d8 (diff) |
[PATCH] elevator_t lifetime rules and sysfs fixes
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r-- | include/linux/elevator.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index f65766ef053..4d0a80f13ee 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -61,7 +61,7 @@ struct elevator_type | |||
61 | struct list_head list; | 61 | struct list_head list; |
62 | struct elevator_ops ops; | 62 | struct elevator_ops ops; |
63 | struct elevator_type *elevator_type; | 63 | struct elevator_type *elevator_type; |
64 | struct kobj_type *elevator_ktype; | 64 | struct attribute **elevator_attrs; |
65 | char elevator_name[ELV_NAME_MAX]; | 65 | char elevator_name[ELV_NAME_MAX]; |
66 | struct module *elevator_owner; | 66 | struct module *elevator_owner; |
67 | }; | 67 | }; |
@@ -75,6 +75,7 @@ struct elevator_queue | |||
75 | void *elevator_data; | 75 | void *elevator_data; |
76 | struct kobject kobj; | 76 | struct kobject kobj; |
77 | struct elevator_type *elevator_type; | 77 | struct elevator_type *elevator_type; |
78 | struct mutex sysfs_lock; | ||
78 | }; | 79 | }; |
79 | 80 | ||
80 | /* | 81 | /* |
@@ -141,6 +142,12 @@ enum { | |||
141 | ELV_MQUEUE_MUST, | 142 | ELV_MQUEUE_MUST, |
142 | }; | 143 | }; |
143 | 144 | ||
145 | struct elv_fs_entry { | ||
146 | struct attribute attr; | ||
147 | ssize_t (*show)(elevator_t *, char *); | ||
148 | ssize_t (*store)(elevator_t *, const char *, size_t); | ||
149 | }; | ||
150 | |||
144 | #define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors) | 151 | #define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors) |
145 | 152 | ||
146 | #endif | 153 | #endif |