Searched refs:item (Results 1 - 200 of 786) sorted by relevance

1234

/linux-4.4.14/fs/configfs/
H A Ditem.c4 * item.c - library routines for handling generic config items
47 * config_item_init - initialize item.
48 * @item: item in question.
50 static void config_item_init(struct config_item *item) config_item_init() argument
52 kref_init(&item->ci_kref); config_item_init()
53 INIT_LIST_HEAD(&item->ci_entry); config_item_init()
57 * config_item_set_name - Set the name of an item
58 * @item: item.
62 * dynamically allocated string that @item->ci_name points to.
63 * Otherwise, use the static @item->ci_namebuf array.
65 int config_item_set_name(struct config_item *item, const char *fmt, ...) config_item_set_name() argument
77 need = vsnprintf(item->ci_namebuf, limit, fmt, args); config_item_set_name()
80 name = item->ci_namebuf; config_item_set_name()
104 if (item->ci_name && item->ci_name != item->ci_namebuf) config_item_set_name()
105 kfree(item->ci_name); config_item_set_name()
108 item->ci_name = name; config_item_set_name()
114 void config_item_init_type_name(struct config_item *item, config_item_init_type_name() argument
118 config_item_set_name(item, "%s", name); config_item_init_type_name()
119 item->ci_type = type; config_item_init_type_name()
120 config_item_init(item); config_item_init_type_name()
133 struct config_item *config_item_get(struct config_item *item) config_item_get() argument
135 if (item) config_item_get()
136 kref_get(&item->ci_kref); config_item_get()
137 return item; config_item_get()
141 static void config_item_cleanup(struct config_item *item) config_item_cleanup() argument
143 struct config_item_type *t = item->ci_type; config_item_cleanup()
144 struct config_group *s = item->ci_group; config_item_cleanup()
145 struct config_item *parent = item->ci_parent; config_item_cleanup()
147 pr_debug("config_item %s: cleaning up\n", config_item_name(item)); config_item_cleanup()
148 if (item->ci_name != item->ci_namebuf) config_item_cleanup()
149 kfree(item->ci_name); config_item_cleanup()
150 item->ci_name = NULL; config_item_cleanup()
152 t->ct_item_ops->release(item); config_item_cleanup()
165 * config_item_put - decrement refcount for item.
166 * @item: item.
170 void config_item_put(struct config_item *item) config_item_put() argument
172 if (item) config_item_put()
173 kref_put(&item->ci_kref, config_item_release); config_item_put()
189 * config_group_find_item - search for item in group.
191 * @name: item's name.
194 * If matching item is found take a reference and return the item.
204 struct config_item *item = to_item(entry); config_group_find_item() local
205 if (config_item_name(item) && config_group_find_item()
206 !strcmp(config_item_name(item), name)) { config_group_find_item()
207 ret = config_item_get(item); config_group_find_item()
H A DMakefile7 configfs-objs := inode.o file.o dir.o symlink.o mount.o item.o
H A Ddir.c122 * item's i_mutex class is already setup, so s_depth is now only configfs_adjust_dir_dirent_depth_before_populate()
124 * with item's i_mutex locked. configfs_adjust_dir_dirent_depth_before_populate()
265 * @item: config_itemwe're creating directory for.
272 static int configfs_create_dir(struct config_item *item, struct dentry *dentry) configfs_create_dir() argument
278 BUG_ON(!item); configfs_create_dir()
284 error = configfs_make_dirent(p->d_fsdata, dentry, item, mode, configfs_create_dir()
293 item->ci_dentry = dentry; configfs_create_dir()
388 * @item: config_item we're removing.
394 * Caller holds the mutex of the item's inode
397 static void configfs_remove_dir(struct config_item * item) configfs_remove_dir() argument
399 struct dentry * dentry = dget(item->ci_dentry); configfs_remove_dir()
473 * If it doesn't exist and it isn't a NOT_PINNED item, configfs_lookup()
553 static void detach_attrs(struct config_item * item) detach_attrs() argument
555 struct dentry * dentry = dget(item->ci_dentry); detach_attrs()
582 static int populate_attrs(struct config_item *item) populate_attrs() argument
584 struct config_item_type *t = item->ci_type; populate_attrs()
593 if ((error = configfs_create_file(item, attr))) populate_attrs()
599 detach_attrs(item); populate_attrs()
605 struct config_item *item,
607 static void configfs_detach_group(struct config_item *item);
710 static void unlink_obj(struct config_item *item) unlink_obj() argument
714 group = item->ci_group; unlink_obj()
716 list_del_init(&item->ci_entry); unlink_obj()
718 item->ci_group = NULL; unlink_obj()
719 item->ci_parent = NULL; unlink_obj()
722 config_item_put(item); unlink_obj()
729 static void link_obj(struct config_item *parent_item, struct config_item *item) link_obj() argument
735 item->ci_parent = parent_item; link_obj()
741 item->ci_group = config_group_get(to_config_group(parent_item)); link_obj()
742 list_add_tail(&item->ci_entry, &item->ci_group->cg_children); link_obj()
748 config_item_get(item); link_obj()
807 struct config_item *item, configfs_attach_item()
812 ret = configfs_create_dir(item, dentry); configfs_attach_item()
814 ret = populate_attrs(item); configfs_attach_item()
822 configfs_remove_dir(item); configfs_attach_item()
833 /* Caller holds the mutex of the item's inode */ configfs_detach_item()
834 static void configfs_detach_item(struct config_item *item) configfs_detach_item() argument
836 detach_attrs(item); configfs_detach_item()
837 configfs_remove_dir(item); configfs_detach_item()
841 struct config_item *item, configfs_attach_group()
847 ret = configfs_attach_item(parent_item, item, dentry); configfs_attach_group()
863 ret = populate_groups(to_config_group(item)); configfs_attach_group()
865 configfs_detach_item(item); configfs_attach_group()
879 static void configfs_detach_group(struct config_item *item) configfs_detach_group() argument
881 detach_groups(to_config_group(item)); configfs_detach_group()
882 configfs_detach_item(item); configfs_detach_group()
886 * After the item has been detached from the filesystem view, we are
895 struct config_item *item) client_disconnect_notify()
904 item); client_disconnect_notify() local
909 * This function assumes that reference is held on item
910 * and that item holds a valid reference to the parent. Also, it
914 struct config_item *item) client_drop_item()
927 item); client_drop_item() local
929 config_item_put(item); client_drop_item()
977 * happens, the item cannot go away until the dependent can live without
979 * possible. When a system asks them to depend on an item, they just
980 * call configfs_depend_item(). If the item is live and the client
993 * If we can find the target item in the
1016 * CONFIGFS_USET_CREATING is set, we ignore the item. The actual set of
1105 * We are sure that the item is not about to be removed by rmdir(), and configfs_depend_item()
1148 * After this unlock, we cannot trust the item to stay alive! configfs_undepend_item()
1149 * DO NOT REFERENCE item after this unlock. configfs_undepend_item()
1160 struct config_item *item = NULL; configfs_mkdir() local
1198 * The subsystem may belong to a different module than the item configfs_mkdir()
1199 * being created. We don't want to safely pin the new item but configfs_mkdir()
1227 item = &group->cg_item; configfs_mkdir()
1231 item = type->ct_group_ops->make_item(to_config_group(parent_item), name); configfs_mkdir()
1232 if (!item) configfs_mkdir()
1233 item = ERR_PTR(-ENOMEM); configfs_mkdir()
1234 if (!IS_ERR(item)) configfs_mkdir()
1235 link_obj(parent_item, item); configfs_mkdir()
1237 ret = PTR_ERR(item); configfs_mkdir()
1255 type = item->ci_type; configfs_mkdir()
1286 ret = configfs_attach_group(parent_item, item, dentry); configfs_mkdir()
1288 ret = configfs_attach_item(parent_item, item, dentry); configfs_mkdir()
1301 client_disconnect_notify(parent_item, item); configfs_mkdir()
1305 unlink_obj(item); configfs_mkdir()
1306 client_drop_item(parent_item, item); configfs_mkdir()
1333 struct config_item *item; configfs_rmdir() local
1369 * If no dependent, atomically tag the item as dropping. configfs_rmdir()
1393 item = configfs_get_config_item(dentry); configfs_rmdir()
1395 /* Drop reference from above, item already holds one. */ configfs_rmdir()
1398 if (item->ci_type) configfs_rmdir()
1399 dead_item_owner = item->ci_type->ct_owner; configfs_rmdir()
1402 configfs_detach_group(item); configfs_rmdir()
1405 client_disconnect_notify(parent_item, item); configfs_rmdir()
1406 unlink_group(to_config_group(item)); configfs_rmdir()
1408 configfs_detach_item(item); configfs_rmdir()
1411 client_disconnect_notify(parent_item, item); configfs_rmdir()
1412 unlink_obj(item); configfs_rmdir()
1415 client_drop_item(parent_item, item); configfs_rmdir()
1419 config_item_put(item); configfs_rmdir()
1442 int configfs_rename_dir(struct config_item * item, const char *new_name)
1447 if (!strcmp(config_item_name(item), new_name))
1450 if (!item->parent)
1454 parent = item->parent->dentry;
1461 error = config_item_set_name(item, "%s", new_name);
1464 d_move(item->dentry, new_dentry);
1709 * @item_type: child item type description
806 configfs_attach_item(struct config_item *parent_item, struct config_item *item, struct dentry *dentry) configfs_attach_item() argument
840 configfs_attach_group(struct config_item *parent_item, struct config_item *item, struct dentry *dentry) configfs_attach_group() argument
894 client_disconnect_notify(struct config_item *parent_item, struct config_item *item) client_disconnect_notify() argument
913 client_drop_item(struct config_item *parent_item, struct config_item *item) client_drop_item() argument
H A Dsymlink.c38 static int item_depth(struct config_item * item) item_depth() argument
40 struct config_item * p = item; item_depth()
46 static int item_path_length(struct config_item * item) item_path_length() argument
48 struct config_item * p = item; item_path_length()
57 static void fill_item_path(struct config_item * item, char * buffer, int length) fill_item_path() argument
62 for (p = item; p && !configfs_is_root(p); p = p->ci_parent) { fill_item_path()
73 struct config_item *item, create_link()
76 struct configfs_dirent *target_sd = item->ci_dentry->d_fsdata; create_link()
86 sl->sl_target = config_item_get(item); create_link()
90 config_item_put(item); create_link()
102 config_item_put(item); create_link()
235 static int configfs_get_target_path(struct config_item * item, struct config_item * target, configfs_get_target_path() argument
241 depth = item_depth(item); configfs_get_target_path()
259 struct config_item *item, *target_item; configfs_getlink() local
262 item = configfs_get_config_item(dentry->d_parent); configfs_getlink()
263 if (!item) configfs_getlink()
268 config_item_put(item); configfs_getlink()
273 error = configfs_get_target_path(item, target_item, path); configfs_getlink()
276 config_item_put(item); configfs_getlink()
72 create_link(struct config_item *parent_item, struct config_item *item, struct dentry *dentry) create_link() argument
H A Dfile.c55 * fill_read_buffer - allocate and fill buffer from item.
67 struct config_item * item = to_item(dentry->d_parent); fill_read_buffer() local
76 count = attr->show(item, buffer->page); fill_read_buffer()
95 * is in the file's ->d_fsdata. The target item is in the directory's
99 * item's show() method exactly once (if the read is happening from
101 * all the data the item has to offer for that attribute.
173 struct config_item * item = to_item(dentry->d_parent); flush_write_buffer() local
175 return attr->store(item, buffer->page, count); flush_write_buffer()
214 struct config_item *item = configfs_get_config_item(file->f_path.dentry->d_parent); check_perm() local
220 if (!item || !attr) check_perm()
229 if (item->ci_type) check_perm()
230 ops = item->ci_type->ct_item_ops; check_perm()
275 if (error && item) check_perm()
276 config_item_put(item); check_perm()
287 struct config_item * item = to_item(filp->f_path.dentry->d_parent); configfs_release() local
292 if (item) configfs_release()
293 config_item_put(item); configfs_release()
315 * configfs_create_file - create an attribute file for an item.
316 * @item: item we're creating for.
320 int configfs_create_file(struct config_item * item, const struct configfs_attribute * attr) configfs_create_file() argument
322 struct dentry *dir = item->ci_dentry; configfs_create_file()
H A Dconfigfs_internal.h69 extern int configfs_is_root(struct config_item *item);
124 struct config_item * item = NULL; configfs_get_config_item() local
131 item = config_item_get(sl->sl_target); configfs_get_config_item()
133 item = config_item_get(sd->s_element); configfs_get_config_item()
137 return item; configfs_get_config_item()
H A Dmount.c56 int configfs_is_root(struct config_item *item) configfs_is_root() argument
58 return item == &configfs_root_group.cg_item; configfs_is_root()
/linux-4.4.14/include/linux/soc/qcom/
H A Dsmem.h6 int qcom_smem_alloc(unsigned host, unsigned item, size_t size);
7 void *qcom_smem_get(unsigned host, unsigned item, size_t *size);
/linux-4.4.14/drivers/gpu/drm/
H A Ddrm_global.c49 struct drm_global_item *item = &glob[i]; drm_global_init() local
50 mutex_init(&item->mutex); drm_global_init()
51 item->object = NULL; drm_global_init()
52 item->refcount = 0; drm_global_init()
60 struct drm_global_item *item = &glob[i]; drm_global_release() local
61 BUG_ON(item->object != NULL); drm_global_release()
62 BUG_ON(item->refcount != 0); drm_global_release()
69 struct drm_global_item *item = &glob[ref->global_type]; drm_global_item_ref() local
71 mutex_lock(&item->mutex); drm_global_item_ref()
72 if (item->refcount == 0) { drm_global_item_ref()
73 item->object = kzalloc(ref->size, GFP_KERNEL); drm_global_item_ref()
74 if (unlikely(item->object == NULL)) { drm_global_item_ref()
79 ref->object = item->object; drm_global_item_ref()
85 ++item->refcount; drm_global_item_ref()
86 ref->object = item->object; drm_global_item_ref()
87 mutex_unlock(&item->mutex); drm_global_item_ref()
90 mutex_unlock(&item->mutex); drm_global_item_ref()
91 item->object = NULL; drm_global_item_ref()
98 struct drm_global_item *item = &glob[ref->global_type]; drm_global_item_unref() local
100 mutex_lock(&item->mutex); drm_global_item_unref()
101 BUG_ON(item->refcount == 0); drm_global_item_unref()
102 BUG_ON(ref->object != item->object); drm_global_item_unref()
103 if (--item->refcount == 0) { drm_global_item_unref()
105 item->object = NULL; drm_global_item_unref()
107 mutex_unlock(&item->mutex); drm_global_item_unref()
H A Ddrm_hashtab.c109 int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item) drm_ht_insert_item() argument
115 unsigned long key = item->key; drm_ht_insert_item()
128 hlist_add_behind_rcu(&item->head, parent);
130 hlist_add_head_rcu(&item->head, h_list);
137 * Just insert an item and return any "bits" bit key that hasn't been
140 int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item, drm_ht_just_insert_please() argument
151 item->key = (unshifted_key << shift) + add; drm_ht_just_insert_please()
152 ret = drm_ht_insert_item(ht, item); drm_ht_just_insert_please()
166 struct drm_hash_item **item) drm_ht_find_item()
174 *item = hlist_entry(list, struct drm_hash_item, head); drm_ht_find_item()
191 int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item) drm_ht_remove_item() argument
193 hlist_del_init_rcu(&item->head); drm_ht_remove_item()
165 drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item) drm_ht_find_item() argument
/linux-4.4.14/kernel/trace/
H A Dtrace_export.c31 #define __field_struct(type, item)
34 #define __field(type, item) type item;
37 #define __field_desc(type, container, item) type item;
40 #define __array(type, item, size) type item[size];
43 #define __array_desc(type, container, item, size) type item[size];
46 #define __dynamic_array(type, item) type item[];
75 #define __field(type, item) \
76 ret = trace_define_field(event_call, #type, #item, \
77 offsetof(typeof(field), item), \
78 sizeof(field.item), \
84 #define __field_desc(type, container, item) \
85 ret = trace_define_field(event_call, #type, #item, \
87 container.item), \
88 sizeof(field.container.item), \
94 #define __array(type, item, len) \
98 ret = trace_define_field(event_call, type_str, #item, \
99 offsetof(typeof(field), item), \
100 sizeof(field.item), \
107 #define __array_desc(type, container, item, len) \
109 ret = trace_define_field(event_call, #type "[" #len "]", #item, \
111 container.item), \
112 sizeof(field.container.item), \
118 #define __dynamic_array(type, item) \
119 ret = trace_define_field(event_call, #type, #item, \
120 offsetof(typeof(field), item), \
145 #define __field(type, item)
148 #define __field_desc(type, container, item)
151 #define __array(type, item, len)
154 #define __array_desc(type, container, item, len)
157 #define __dynamic_array(type, item)
H A Dtrace_entries.h20 * - __field( type, item )
22 * type item;
24 * - __array( type, item, size )
26 * type item[size];
39 * __field_struct( type, item )
44 * __field_desc( type, container, item )
45 * __array_desc( type, container, item, len )
47 * type, item and len are the same as __field and __array, but
48 * container is added. This is the name of the item in
/linux-4.4.14/drivers/usb/gadget/
H A Dconfigfs.h6 void unregister_gadget_item(struct config_item *item);
14 static inline struct usb_os_desc *to_usb_os_desc(struct config_item *item) to_usb_os_desc() argument
16 return container_of(to_config_group(item), struct usb_os_desc, group); to_usb_os_desc()
H A Dconfigfs.c67 static inline struct gadget_info *to_gadget_info(struct config_item *item) to_gadget_info() argument
69 return container_of(to_config_group(item), struct gadget_info, group); to_gadget_info()
82 static inline struct config_usb_cfg *to_config_usb_cfg(struct config_item *item) to_config_usb_cfg() argument
84 return container_of(to_config_group(item), struct config_usb_cfg, to_config_usb_cfg()
132 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
136 to_gadget_info(item)->cdev.desc.__name); \
140 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
144 le16_to_cpup(&to_gadget_info(item)->cdev.desc.__name)); \
149 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
157 to_gadget_info(item)->cdev.desc._name = val; \
162 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
170 to_gadget_info(item)->cdev.desc._name = cpu_to_le16p(&val); \
200 static ssize_t gadget_dev_desc_bcdDevice_store(struct config_item *item, gadget_dev_desc_bcdDevice_store() argument
213 to_gadget_info(item)->cdev.desc.bcdDevice = cpu_to_le16(bcdDevice); gadget_dev_desc_bcdDevice_store()
217 static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item, gadget_dev_desc_bcdUSB_store() argument
230 to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB); gadget_dev_desc_bcdUSB_store()
234 static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) gadget_dev_desc_UDC_show() argument
236 return sprintf(page, "%s\n", to_gadget_info(item)->udc_name ?: ""); gadget_dev_desc_UDC_show()
254 static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, gadget_dev_desc_UDC_store() argument
257 struct gadget_info *gi = to_gadget_info(item); gadget_dev_desc_UDC_store()
314 static inline struct gadget_strings *to_gadget_strings(struct config_item *item) to_gadget_strings() argument
316 return container_of(to_config_group(item), struct gadget_strings, to_gadget_strings()
321 struct config_item *item) to_gadget_config_name()
323 return container_of(to_config_group(item), struct gadget_config_name, to_gadget_config_name()
328 struct config_item *item) to_usb_function_instance()
330 return container_of(to_config_group(item), to_usb_function_instance()
334 static void gadget_info_attr_release(struct config_item *item) gadget_info_attr_release() argument
336 struct gadget_info *gi = to_gadget_info(item); gadget_info_attr_release()
349 static void gadget_config_attr_release(struct config_item *item) gadget_config_attr_release() argument
351 struct config_usb_cfg *cfg = to_config_usb_cfg(item); gadget_config_attr_release()
454 static ssize_t gadget_config_desc_MaxPower_show(struct config_item *item, gadget_config_desc_MaxPower_show() argument
457 return sprintf(page, "%u\n", to_config_usb_cfg(item)->c.MaxPower); gadget_config_desc_MaxPower_show()
460 static ssize_t gadget_config_desc_MaxPower_store(struct config_item *item, gadget_config_desc_MaxPower_store() argument
470 to_config_usb_cfg(item)->c.MaxPower = val; gadget_config_desc_MaxPower_store()
474 static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, gadget_config_desc_bmAttributes_show() argument
478 to_config_usb_cfg(item)->c.bmAttributes); gadget_config_desc_bmAttributes_show()
481 static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, gadget_config_desc_bmAttributes_store() argument
494 to_config_usb_cfg(item)->c.bmAttributes = val; gadget_config_desc_bmAttributes_store()
577 struct config_item *item) function_drop()
579 struct usb_function_instance *fi = to_usb_function_instance(item); function_drop()
587 config_item_put(item); function_drop()
607 static void gadget_config_name_attr_release(struct config_item *item) gadget_config_name_attr_release() argument
609 struct gadget_config_name *cn = to_gadget_config_name(item); gadget_config_name_attr_release()
687 struct config_item *item) config_desc_drop()
689 config_item_put(item); config_desc_drop()
713 static void gadget_strings_attr_release(struct config_item *item) gadget_strings_attr_release() argument
715 struct gadget_strings *gs = to_gadget_strings(item); gadget_strings_attr_release()
728 static inline struct os_desc *to_os_desc(struct config_item *item) to_os_desc() argument
730 return container_of(to_config_group(item), struct os_desc, group); to_os_desc()
734 struct config_item *item) os_desc_item_to_gadget_info()
736 return to_gadget_info(to_os_desc(item)->group.cg_item.ci_parent); os_desc_item_to_gadget_info()
739 static ssize_t os_desc_use_show(struct config_item *item, char *page) os_desc_use_show() argument
742 os_desc_item_to_gadget_info(item)->use_os_desc); os_desc_use_show()
745 static ssize_t os_desc_use_store(struct config_item *item, const char *page, os_desc_use_store() argument
748 struct gadget_info *gi = os_desc_item_to_gadget_info(item); os_desc_use_store()
763 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) os_desc_b_vendor_code_show() argument
766 os_desc_item_to_gadget_info(item)->b_vendor_code); os_desc_b_vendor_code_show()
769 static ssize_t os_desc_b_vendor_code_store(struct config_item *item, os_desc_b_vendor_code_store() argument
772 struct gadget_info *gi = os_desc_item_to_gadget_info(item); os_desc_b_vendor_code_store()
787 static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) os_desc_qw_sign_show() argument
789 struct gadget_info *gi = os_desc_item_to_gadget_info(item); os_desc_qw_sign_show()
795 static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page, os_desc_qw_sign_store() argument
798 struct gadget_info *gi = os_desc_item_to_gadget_info(item); os_desc_qw_sign_store()
827 static void os_desc_attr_release(struct config_item *item) os_desc_attr_release() argument
829 struct os_desc *os_desc = to_os_desc(item); os_desc_attr_release()
897 *to_usb_os_desc_ext_prop(struct config_item *item) to_usb_os_desc_ext_prop() argument
899 return container_of(item, struct usb_os_desc_ext_prop, item); to_usb_os_desc_ext_prop()
902 static ssize_t ext_prop_type_show(struct config_item *item, char *page) ext_prop_type_show() argument
904 return sprintf(page, "%d", to_usb_os_desc_ext_prop(item)->type); ext_prop_type_show()
907 static ssize_t ext_prop_type_store(struct config_item *item, ext_prop_type_store() argument
910 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); ext_prop_type_store()
911 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); ext_prop_type_store()
948 static ssize_t ext_prop_data_show(struct config_item *item, char *page) ext_prop_data_show() argument
950 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); ext_prop_data_show()
962 static ssize_t ext_prop_data_store(struct config_item *item, ext_prop_data_store() argument
965 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); ext_prop_data_store()
966 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); ext_prop_data_store()
1005 static void usb_os_desc_ext_prop_release(struct config_item *item) usb_os_desc_ext_prop_release() argument
1007 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); usb_os_desc_ext_prop_release()
1041 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); ext_prop_make()
1058 return &ext_prop->item; ext_prop_make()
1061 static void ext_prop_drop(struct config_group *group, struct config_item *item) ext_prop_drop() argument
1063 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); ext_prop_drop()
1074 config_item_put(item); ext_prop_drop()
1082 static ssize_t interf_grp_compatible_id_show(struct config_item *item, interf_grp_compatible_id_show() argument
1085 memcpy(page, to_usb_os_desc(item)->ext_compat_id, 8); interf_grp_compatible_id_show()
1089 static ssize_t interf_grp_compatible_id_store(struct config_item *item, interf_grp_compatible_id_store() argument
1092 struct usb_os_desc *desc = to_usb_os_desc(item); interf_grp_compatible_id_store()
1108 static ssize_t interf_grp_sub_compatible_id_show(struct config_item *item, interf_grp_sub_compatible_id_show() argument
1111 memcpy(page, to_usb_os_desc(item)->ext_compat_id + 8, 8); interf_grp_sub_compatible_id_show()
1115 static ssize_t interf_grp_sub_compatible_id_store(struct config_item *item, interf_grp_sub_compatible_id_store() argument
1118 struct usb_os_desc *desc = to_usb_os_desc(item); interf_grp_sub_compatible_id_store()
1469 static void gadgets_drop(struct config_group *group, struct config_item *item) gadgets_drop() argument
1471 config_item_put(item); gadgets_drop()
1494 void unregister_gadget_item(struct config_item *item) unregister_gadget_item() argument
1496 struct gadget_info *gi = to_gadget_info(item); unregister_gadget_item()
320 to_gadget_config_name( struct config_item *item) to_gadget_config_name() argument
327 to_usb_function_instance( struct config_item *item) to_usb_function_instance() argument
575 function_drop( struct config_group *group, struct config_item *item) function_drop() argument
685 config_desc_drop( struct config_group *group, struct config_item *item) config_desc_drop() argument
733 os_desc_item_to_gadget_info( struct config_item *item) os_desc_item_to_gadget_info() argument
/linux-4.4.14/drivers/net/wireless/cw1200/
H A Dqueue.c72 struct cw1200_queue_item *item, *tmp; cw1200_queue_post_gc() local
74 list_for_each_entry_safe(item, tmp, gc_list, head) { list_for_each_entry_safe()
75 list_del(&item->head); list_for_each_entry_safe()
76 stats->skb_dtor(stats->priv, item->skb, &item->txpriv); list_for_each_entry_safe()
77 kfree(item); list_for_each_entry_safe()
82 struct cw1200_queue_item *item) cw1200_queue_register_post_gc()
88 memcpy(gc_item, item, sizeof(struct cw1200_queue_item)); cw1200_queue_register_post_gc()
97 struct cw1200_queue_item *item = NULL, *tmp; __cw1200_queue_gc() local
100 list_for_each_entry_safe(item, tmp, &queue->queue, head) { __cw1200_queue_gc()
101 if (jiffies - item->queue_timestamp < queue->ttl) __cw1200_queue_gc()
104 --queue->link_map_cache[item->txpriv.link_id]; __cw1200_queue_gc()
107 if (!--stats->link_map_cache[item->txpriv.link_id]) __cw1200_queue_gc()
111 cw1200_queue_register_post_gc(head, item); __cw1200_queue_gc()
112 item->skb = NULL; __cw1200_queue_gc()
113 list_move_tail(&item->head, &queue->free_pool); __cw1200_queue_gc()
124 } else if (item) { __cw1200_queue_gc()
125 unsigned long tmo = item->queue_timestamp + queue->ttl; __cw1200_queue_gc()
208 struct cw1200_queue_item *item, *tmp; cw1200_queue_clear() local
213 list_for_each_entry_safe(item, tmp, &queue->pending, head) { cw1200_queue_clear()
214 WARN_ON(!item->skb); cw1200_queue_clear()
215 cw1200_queue_register_post_gc(&gc_list, item); cw1200_queue_clear()
216 item->skb = NULL; cw1200_queue_clear()
217 list_move_tail(&item->head, &queue->free_pool); cw1200_queue_clear()
294 struct cw1200_queue_item *item = list_first_entry( cw1200_queue_put() local
296 BUG_ON(item->skb); cw1200_queue_put()
298 list_move_tail(&item->head, &queue->queue); cw1200_queue_put()
299 item->skb = skb; cw1200_queue_put()
300 item->txpriv = *txpriv; cw1200_queue_put()
301 item->generation = 0; cw1200_queue_put()
302 item->packet_id = cw1200_queue_mk_packet_id(queue->generation, cw1200_queue_put()
304 item->generation, cw1200_queue_put()
305 item - queue->pool); cw1200_queue_put()
306 item->queue_timestamp = jiffies; cw1200_queue_put()
340 struct cw1200_queue_item *item; cw1200_queue_get() local
345 list_for_each_entry(item, &queue->queue, head) { cw1200_queue_get()
346 if (link_id_map & BIT(item->txpriv.link_id)) { cw1200_queue_get()
353 *tx = (struct wsm_tx *)item->skb->data; cw1200_queue_get()
354 *tx_info = IEEE80211_SKB_CB(item->skb); cw1200_queue_get()
355 *txpriv = &item->txpriv; cw1200_queue_get()
356 (*tx)->packet_id = item->packet_id; cw1200_queue_get()
357 list_move_tail(&item->head, &queue->pending); cw1200_queue_get()
359 --queue->link_map_cache[item->txpriv.link_id]; cw1200_queue_get()
360 item->xmit_timestamp = jiffies; cw1200_queue_get()
364 if (!--stats->link_map_cache[item->txpriv.link_id]) cw1200_queue_get()
378 struct cw1200_queue_item *item; cw1200_queue_requeue() local
384 item = &queue->pool[item_id]; cw1200_queue_requeue()
393 } else if (item->generation != item_generation) { cw1200_queue_requeue()
398 ++queue->link_map_cache[item->txpriv.link_id]; cw1200_queue_requeue()
402 ++stats->link_map_cache[item->txpriv.link_id]; cw1200_queue_requeue()
405 item->generation = ++item_generation; cw1200_queue_requeue()
406 item->packet_id = cw1200_queue_mk_packet_id(queue_generation, cw1200_queue_requeue()
410 list_move(&item->head, &queue->queue); cw1200_queue_requeue()
418 struct cw1200_queue_item *item, *tmp; cw1200_queue_requeue_all() local
422 list_for_each_entry_safe_reverse(item, tmp, &queue->pending, head) { cw1200_queue_requeue_all()
424 ++queue->link_map_cache[item->txpriv.link_id]; cw1200_queue_requeue_all()
428 ++stats->link_map_cache[item->txpriv.link_id]; cw1200_queue_requeue_all()
431 ++item->generation; cw1200_queue_requeue_all()
432 item->packet_id = cw1200_queue_mk_packet_id(queue->generation, cw1200_queue_requeue_all()
434 item->generation, cw1200_queue_requeue_all()
435 item - queue->pool); cw1200_queue_requeue_all()
436 list_move(&item->head, &queue->queue); cw1200_queue_requeue_all()
447 struct cw1200_queue_item *item; cw1200_queue_remove() local
455 item = &queue->pool[item_id]; cw1200_queue_remove()
464 } else if (item->generation != item_generation) { cw1200_queue_remove()
468 gc_txpriv = item->txpriv; cw1200_queue_remove()
469 gc_skb = item->skb; cw1200_queue_remove()
470 item->skb = NULL; cw1200_queue_remove()
474 ++item->generation; cw1200_queue_remove()
478 list_move(&item->head, &queue->free_pool); cw1200_queue_remove()
500 struct cw1200_queue_item *item; cw1200_queue_get_skb() local
504 item = &queue->pool[item_id]; cw1200_queue_get_skb()
513 } else if (item->generation != item_generation) { cw1200_queue_get_skb()
517 *skb = item->skb; cw1200_queue_get_skb()
518 *txpriv = &item->txpriv; cw1200_queue_get_skb()
542 struct cw1200_queue_item *item; cw1200_queue_get_xmit_timestamp() local
548 list_for_each_entry(item, &queue->pending, head) { cw1200_queue_get_xmit_timestamp()
549 if (item->packet_id != pending_frame_id) cw1200_queue_get_xmit_timestamp()
550 if (time_before(item->xmit_timestamp, cw1200_queue_get_xmit_timestamp()
552 *timestamp = item->xmit_timestamp; cw1200_queue_get_xmit_timestamp()
81 cw1200_queue_register_post_gc(struct list_head *gc_list, struct cw1200_queue_item *item) cw1200_queue_register_post_gc() argument
/linux-4.4.14/drivers/net/ethernet/mellanox/mlxsw/
H A Ditem.h2 * drivers/net/ethernet/mellanox/mlxsw/item.h
58 __mlxsw_item_offset(struct mlxsw_item *item, unsigned short index, __mlxsw_item_offset() argument
61 BUG_ON(index && !item->step); __mlxsw_item_offset()
62 if (item->offset % typesize != 0 || __mlxsw_item_offset()
63 item->step % typesize != 0 || __mlxsw_item_offset()
64 item->in_step_offset % typesize != 0) { __mlxsw_item_offset()
65 pr_err("mlxsw: item bug (name=%s,offset=%x,step=%x,in_step_offset=%x,typesize=%zx)\n", __mlxsw_item_offset()
66 item->name, item->offset, item->step, __mlxsw_item_offset()
67 item->in_step_offset, typesize); __mlxsw_item_offset()
71 return ((item->offset + item->step * index + item->in_step_offset) / __mlxsw_item_offset()
75 static inline u16 __mlxsw_item_get16(char *buf, struct mlxsw_item *item, __mlxsw_item_get16() argument
78 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u16)); __mlxsw_item_get16()
83 tmp >>= item->shift; __mlxsw_item_get16()
84 tmp &= GENMASK(item->size.bits - 1, 0); __mlxsw_item_get16()
85 if (item->no_real_shift) __mlxsw_item_get16()
86 tmp <<= item->shift; __mlxsw_item_get16()
90 static inline void __mlxsw_item_set16(char *buf, struct mlxsw_item *item, __mlxsw_item_set16() argument
93 unsigned int offset = __mlxsw_item_offset(item, index, __mlxsw_item_set16()
96 u16 mask = GENMASK(item->size.bits - 1, 0) << item->shift; __mlxsw_item_set16()
99 if (!item->no_real_shift) __mlxsw_item_set16()
100 val <<= item->shift; __mlxsw_item_set16()
108 static inline u32 __mlxsw_item_get32(char *buf, struct mlxsw_item *item, __mlxsw_item_get32() argument
111 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u32)); __mlxsw_item_get32()
116 tmp >>= item->shift; __mlxsw_item_get32()
117 tmp &= GENMASK(item->size.bits - 1, 0); __mlxsw_item_get32()
118 if (item->no_real_shift) __mlxsw_item_get32()
119 tmp <<= item->shift; __mlxsw_item_get32()
123 static inline void __mlxsw_item_set32(char *buf, struct mlxsw_item *item, __mlxsw_item_set32() argument
126 unsigned int offset = __mlxsw_item_offset(item, index, __mlxsw_item_set32()
129 u32 mask = GENMASK(item->size.bits - 1, 0) << item->shift; __mlxsw_item_set32()
132 if (!item->no_real_shift) __mlxsw_item_set32()
133 val <<= item->shift; __mlxsw_item_set32()
141 static inline u64 __mlxsw_item_get64(char *buf, struct mlxsw_item *item, __mlxsw_item_get64() argument
144 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u64)); __mlxsw_item_get64()
149 tmp >>= item->shift; __mlxsw_item_get64()
150 tmp &= GENMASK_ULL(item->size.bits - 1, 0); __mlxsw_item_get64()
151 if (item->no_real_shift) __mlxsw_item_get64()
152 tmp <<= item->shift; __mlxsw_item_get64()
156 static inline void __mlxsw_item_set64(char *buf, struct mlxsw_item *item, __mlxsw_item_set64() argument
159 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u64)); __mlxsw_item_set64()
161 u64 mask = GENMASK_ULL(item->size.bits - 1, 0) << item->shift; __mlxsw_item_set64()
164 if (!item->no_real_shift) __mlxsw_item_set64()
165 val <<= item->shift; __mlxsw_item_set64()
174 struct mlxsw_item *item, __mlxsw_item_memcpy_from()
177 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(char)); __mlxsw_item_memcpy_from()
179 memcpy(dst, &buf[offset], item->size.bytes); __mlxsw_item_memcpy_from()
183 struct mlxsw_item *item, __mlxsw_item_memcpy_to()
186 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(char)); __mlxsw_item_memcpy_to()
188 memcpy(&buf[offset], src, item->size.bytes); __mlxsw_item_memcpy_to()
192 __mlxsw_item_bit_array_offset(struct mlxsw_item *item, u16 index, u8 *shift) __mlxsw_item_bit_array_offset() argument
198 BUG_ON(index && !item->element_size); __mlxsw_item_bit_array_offset()
199 if (item->offset % sizeof(u32) != 0 || __mlxsw_item_bit_array_offset()
200 BITS_PER_BYTE % item->element_size != 0) { __mlxsw_item_bit_array_offset()
201 pr_err("mlxsw: item bug (name=%s,offset=%x,element_size=%x)\n", __mlxsw_item_bit_array_offset()
202 item->name, item->offset, item->element_size); __mlxsw_item_bit_array_offset()
206 max_index = (item->size.bytes << 3) / item->element_size - 1; __mlxsw_item_bit_array_offset()
208 offset = be_index * item->element_size >> 3; __mlxsw_item_bit_array_offset()
209 in_byte_index = index % (BITS_PER_BYTE / item->element_size); __mlxsw_item_bit_array_offset()
210 *shift = in_byte_index * item->element_size; __mlxsw_item_bit_array_offset()
212 return item->offset + offset; __mlxsw_item_bit_array_offset()
215 static inline u8 __mlxsw_item_bit_array_get(char *buf, struct mlxsw_item *item, __mlxsw_item_bit_array_get() argument
219 u16 offset = __mlxsw_item_bit_array_offset(item, index, &shift); __mlxsw_item_bit_array_get()
223 tmp &= GENMASK(item->element_size - 1, 0); __mlxsw_item_bit_array_get()
227 static inline void __mlxsw_item_bit_array_set(char *buf, struct mlxsw_item *item, __mlxsw_item_bit_array_set() argument
231 u16 offset = __mlxsw_item_bit_array_offset(item, index, &shift); __mlxsw_item_bit_array_set()
232 u8 mask = GENMASK(item->element_size - 1, 0) << shift; __mlxsw_item_bit_array_set()
247 * _iname: item name within the container
173 __mlxsw_item_memcpy_from(char *buf, char *dst, struct mlxsw_item *item, unsigned short index) __mlxsw_item_memcpy_from() argument
182 __mlxsw_item_memcpy_to(char *buf, const char *src, struct mlxsw_item *item, unsigned short index) __mlxsw_item_memcpy_to() argument
/linux-4.4.14/include/linux/
H A Dvmstat.h34 static inline void __count_vm_event(enum vm_event_item item) __count_vm_event() argument
36 raw_cpu_inc(vm_event_states.event[item]); __count_vm_event()
39 static inline void count_vm_event(enum vm_event_item item) count_vm_event() argument
41 this_cpu_inc(vm_event_states.event[item]); count_vm_event()
44 static inline void __count_vm_events(enum vm_event_item item, long delta) __count_vm_events() argument
46 raw_cpu_add(vm_event_states.event[item], delta); __count_vm_events()
49 static inline void count_vm_events(enum vm_event_item item, long delta) count_vm_events() argument
51 this_cpu_add(vm_event_states.event[item], delta); count_vm_events()
61 static inline void count_vm_event(enum vm_event_item item) count_vm_event() argument
64 static inline void count_vm_events(enum vm_event_item item, long delta) count_vm_events() argument
67 static inline void __count_vm_event(enum vm_event_item item) __count_vm_event() argument
70 static inline void __count_vm_events(enum vm_event_item item, long delta) __count_vm_events() argument
104 #define __count_zone_vm_events(item, zone, delta) \
105 __count_vm_events(item##_NORMAL - ZONE_NORMAL + \
114 enum zone_stat_item item) zone_page_state_add()
116 atomic_long_add(x, &zone->vm_stat[item]); zone_page_state_add()
117 atomic_long_add(x, &vm_stat[item]); zone_page_state_add()
120 static inline unsigned long global_page_state(enum zone_stat_item item) global_page_state() argument
122 long x = atomic_long_read(&vm_stat[item]); global_page_state()
131 enum zone_stat_item item) zone_page_state()
133 long x = atomic_long_read(&zone->vm_stat[item]); zone_page_state()
148 enum zone_stat_item item) zone_page_state_snapshot()
150 long x = atomic_long_read(&zone->vm_stat[item]); zone_page_state_snapshot()
155 x += per_cpu_ptr(zone->pageset, cpu)->vm_stat_diff[item]; zone_page_state_snapshot()
165 extern unsigned long node_page_state(int node, enum zone_stat_item item);
170 #define node_page_state(node, item) global_page_state(item)
179 void __mod_zone_page_state(struct zone *, enum zone_stat_item item, long);
208 enum zone_stat_item item, long delta) __mod_zone_page_state()
210 zone_page_state_add(delta, zone, item); __mod_zone_page_state()
213 static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) __inc_zone_state() argument
215 atomic_long_inc(&zone->vm_stat[item]); __inc_zone_state()
216 atomic_long_inc(&vm_stat[item]); __inc_zone_state()
219 static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) __dec_zone_state() argument
221 atomic_long_dec(&zone->vm_stat[item]); __dec_zone_state()
222 atomic_long_dec(&vm_stat[item]); __dec_zone_state()
226 enum zone_stat_item item) __inc_zone_page_state()
228 __inc_zone_state(page_zone(page), item); __inc_zone_page_state() local
232 enum zone_stat_item item) __dec_zone_page_state()
234 __dec_zone_state(page_zone(page), item); __dec_zone_page_state() local
113 zone_page_state_add(long x, struct zone *zone, enum zone_stat_item item) zone_page_state_add() argument
130 zone_page_state(struct zone *zone, enum zone_stat_item item) zone_page_state() argument
147 zone_page_state_snapshot(struct zone *zone, enum zone_stat_item item) zone_page_state_snapshot() argument
207 __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, long delta) __mod_zone_page_state() argument
225 __inc_zone_page_state(struct page *page, enum zone_stat_item item) __inc_zone_page_state() argument
231 __dec_zone_page_state(struct page *page, enum zone_stat_item item) __dec_zone_page_state() argument
H A Dlist_lru.h18 LRU_REMOVED, /* item removed from list */
19 LRU_REMOVED_RETRY, /* item removed, but lock has been
21 LRU_ROTATE, /* item referenced, give another pass */
22 LRU_SKIP, /* item cannot be locked, skip */
23 LRU_RETRY, /* item not freeable. May drop the lock
70 * @item: the item to be added.
77 * one type of list, it is up to the caller to fully remove the item from
83 bool list_lru_add(struct list_lru *lru, struct list_head *item);
88 * @item: the item to be deleted.
96 bool list_lru_del(struct list_lru *lru, struct list_head *item);
129 void list_lru_isolate(struct list_lru_one *list, struct list_head *item);
130 void list_lru_isolate_move(struct list_lru_one *list, struct list_head *item,
133 typedef enum lru_status (*list_lru_walk_cb)(struct list_head *item,
142 * the item currently being scanned
H A Dconfigfs.h32 * item destructors.
70 static inline char *config_item_name(struct config_item * item) config_item_name() argument
72 return item->ci_name; config_item_name()
75 extern void config_item_init_type_name(struct config_item *item,
105 static inline struct config_group *to_config_group(struct config_item *item) to_config_group() argument
107 return item ? container_of(item,struct config_group,cg_item) : NULL; to_config_group()
158 * If allow_link() exists, the item can symlink(2) out to other
159 * items. If the item is a group, it may support mkdir(2).
180 int (*commit_item)(struct config_item *item);
181 void (*disconnect_notify)(struct config_group *group, struct config_item *item);
182 void (*drop_item)(struct config_group *group, struct config_item *item);
H A Dbacking-dev.h58 enum wb_stat_item item, s64 amount) __add_wb_stat()
60 __percpu_counter_add(&wb->stat[item], amount, WB_STAT_BATCH); __add_wb_stat()
64 enum wb_stat_item item) __inc_wb_stat()
66 __add_wb_stat(wb, item, 1); __inc_wb_stat()
69 static inline void inc_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) inc_wb_stat() argument
74 __inc_wb_stat(wb, item); inc_wb_stat()
79 enum wb_stat_item item) __dec_wb_stat()
81 __add_wb_stat(wb, item, -1); __dec_wb_stat()
84 static inline void dec_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) dec_wb_stat() argument
89 __dec_wb_stat(wb, item); dec_wb_stat()
93 static inline s64 wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) wb_stat() argument
95 return percpu_counter_read_positive(&wb->stat[item]); wb_stat()
99 enum wb_stat_item item) __wb_stat_sum()
101 return percpu_counter_sum_positive(&wb->stat[item]); __wb_stat_sum()
104 static inline s64 wb_stat_sum(struct bdi_writeback *wb, enum wb_stat_item item) wb_stat_sum() argument
110 sum = __wb_stat_sum(wb, item); wb_stat_sum()
57 __add_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item, s64 amount) __add_wb_stat() argument
63 __inc_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) __inc_wb_stat() argument
78 __dec_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) __dec_wb_stat() argument
98 __wb_stat_sum(struct bdi_writeback *wb, enum wb_stat_item item) __wb_stat_sum() argument
H A Dworkqueue.h29 WORK_STRUCT_PENDING_BIT = 0, /* work item is pending execution */
30 WORK_STRUCT_DELAYED_BIT = 1, /* work item is delayed */
77 * When a work item is off queue, its high bits point to the last
196 * initialize all of a work item in one go work_static()
259 * work_pending - Find out whether a work item is currently pending
260 * @work: The work item in question
266 * delayed_work_pending - Find out whether a delayable work item is currently
268 * @w: The work item in question
294 * however, for example, a per-cpu work item scheduled from an
296 * excute the work item on that CPU breaking the idleness, which in
404 * most one work item at any given time in the queued order. They are
553 * need to know that a particular work item isn't queued and isn't running.
H A Dradix-tree.h32 * than a data item) is signalled by the low bit set in the root->rnode
184 * Returns: item that was stored in that slot with any direct pointer flag
202 * Returns: item that was stored in that slot with any direct pointer flag
250 * radix_tree_replace_slot - replace item in a slot
252 * @item: new item to store in the slot.
257 static inline void radix_tree_replace_slot(void **pslot, void *item) radix_tree_replace_slot() argument
259 BUG_ON(radix_tree_is_indirect_ptr(item)); radix_tree_replace_slot()
260 rcu_assign_pointer(*pslot, item); radix_tree_replace_slot()
302 unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item);
/linux-4.4.14/drivers/target/iscsi/
H A Discsi_target_stat.c52 static struct iscsi_tiqn *iscsi_instance_tiqn(struct config_item *item) iscsi_instance_tiqn() argument
54 struct iscsi_wwn_stat_grps *igrps = container_of(to_config_group(item), iscsi_instance_tiqn()
59 static ssize_t iscsi_stat_instance_inst_show(struct config_item *item, iscsi_stat_instance_inst_show() argument
63 iscsi_instance_tiqn(item)->tiqn_index); iscsi_stat_instance_inst_show()
66 static ssize_t iscsi_stat_instance_min_ver_show(struct config_item *item, iscsi_stat_instance_min_ver_show() argument
72 static ssize_t iscsi_stat_instance_max_ver_show(struct config_item *item, iscsi_stat_instance_max_ver_show() argument
78 static ssize_t iscsi_stat_instance_portals_show(struct config_item *item, iscsi_stat_instance_portals_show() argument
82 iscsi_instance_tiqn(item)->tiqn_num_tpg_nps); iscsi_stat_instance_portals_show()
85 static ssize_t iscsi_stat_instance_nodes_show(struct config_item *item, iscsi_stat_instance_nodes_show() argument
91 static ssize_t iscsi_stat_instance_sessions_show(struct config_item *item, iscsi_stat_instance_sessions_show() argument
95 iscsi_instance_tiqn(item)->tiqn_nsessions); iscsi_stat_instance_sessions_show()
98 static ssize_t iscsi_stat_instance_fail_sess_show(struct config_item *item, iscsi_stat_instance_fail_sess_show() argument
101 struct iscsi_tiqn *tiqn = iscsi_instance_tiqn(item); iscsi_stat_instance_fail_sess_show()
114 static ssize_t iscsi_stat_instance_fail_type_show(struct config_item *item, iscsi_stat_instance_fail_type_show() argument
117 struct iscsi_tiqn *tiqn = iscsi_instance_tiqn(item); iscsi_stat_instance_fail_type_show()
124 static ssize_t iscsi_stat_instance_fail_rem_name_show(struct config_item *item, iscsi_stat_instance_fail_rem_name_show() argument
127 struct iscsi_tiqn *tiqn = iscsi_instance_tiqn(item); iscsi_stat_instance_fail_rem_name_show()
135 static ssize_t iscsi_stat_instance_disc_time_show(struct config_item *item, iscsi_stat_instance_disc_time_show() argument
141 static ssize_t iscsi_stat_instance_description_show(struct config_item *item, iscsi_stat_instance_description_show() argument
147 static ssize_t iscsi_stat_instance_vendor_show(struct config_item *item, iscsi_stat_instance_vendor_show() argument
153 static ssize_t iscsi_stat_instance_version_show(struct config_item *item, iscsi_stat_instance_version_show() argument
198 static struct iscsi_tiqn *iscsi_sess_err_tiqn(struct config_item *item) iscsi_sess_err_tiqn() argument
200 struct iscsi_wwn_stat_grps *igrps = container_of(to_config_group(item), iscsi_sess_err_tiqn()
205 static ssize_t iscsi_stat_sess_err_inst_show(struct config_item *item, iscsi_stat_sess_err_inst_show() argument
209 iscsi_sess_err_tiqn(item)->tiqn_index); iscsi_stat_sess_err_inst_show()
212 static ssize_t iscsi_stat_sess_err_digest_errors_show(struct config_item *item, iscsi_stat_sess_err_digest_errors_show() argument
215 struct iscsi_tiqn *tiqn = iscsi_sess_err_tiqn(item); iscsi_stat_sess_err_digest_errors_show()
221 static ssize_t iscsi_stat_sess_err_cxn_errors_show(struct config_item *item, iscsi_stat_sess_err_cxn_errors_show() argument
224 struct iscsi_tiqn *tiqn = iscsi_sess_err_tiqn(item); iscsi_stat_sess_err_cxn_errors_show()
230 static ssize_t iscsi_stat_sess_err_format_errors_show(struct config_item *item, iscsi_stat_sess_err_format_errors_show() argument
233 struct iscsi_tiqn *tiqn = iscsi_sess_err_tiqn(item); iscsi_stat_sess_err_format_errors_show()
260 static struct iscsi_tiqn *iscsi_tgt_attr_tiqn(struct config_item *item) iscsi_tgt_attr_tiqn() argument
262 struct iscsi_wwn_stat_grps *igrps = container_of(to_config_group(item), iscsi_tgt_attr_tiqn()
267 static ssize_t iscsi_stat_tgt_attr_inst_show(struct config_item *item, iscsi_stat_tgt_attr_inst_show() argument
271 iscsi_tgt_attr_tiqn(item)->tiqn_index); iscsi_stat_tgt_attr_inst_show()
274 static ssize_t iscsi_stat_tgt_attr_indx_show(struct config_item *item, iscsi_stat_tgt_attr_indx_show() argument
280 static ssize_t iscsi_stat_tgt_attr_login_fails_show(struct config_item *item, iscsi_stat_tgt_attr_login_fails_show() argument
283 struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); iscsi_stat_tgt_attr_login_fails_show()
296 static ssize_t iscsi_stat_tgt_attr_last_fail_time_show(struct config_item *item, iscsi_stat_tgt_attr_last_fail_time_show() argument
299 struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); iscsi_stat_tgt_attr_last_fail_time_show()
312 static ssize_t iscsi_stat_tgt_attr_last_fail_type_show(struct config_item *item, iscsi_stat_tgt_attr_last_fail_type_show() argument
315 struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); iscsi_stat_tgt_attr_last_fail_type_show()
326 static ssize_t iscsi_stat_tgt_attr_fail_intr_name_show(struct config_item *item, iscsi_stat_tgt_attr_fail_intr_name_show() argument
329 struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); iscsi_stat_tgt_attr_fail_intr_name_show()
341 static ssize_t iscsi_stat_tgt_attr_fail_intr_addr_type_show(struct config_item *item, iscsi_stat_tgt_attr_fail_intr_addr_type_show() argument
344 struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); iscsi_stat_tgt_attr_fail_intr_addr_type_show()
358 static ssize_t iscsi_stat_tgt_attr_fail_intr_addr_show(struct config_item *item, iscsi_stat_tgt_attr_fail_intr_addr_show() argument
361 struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); iscsi_stat_tgt_attr_fail_intr_addr_show()
401 static struct iscsi_tiqn *iscsi_login_stat_tiqn(struct config_item *item) iscsi_login_stat_tiqn() argument
403 struct iscsi_wwn_stat_grps *igrps = container_of(to_config_group(item), iscsi_login_stat_tiqn()
408 static ssize_t iscsi_stat_login_inst_show(struct config_item *item, char *page) iscsi_stat_login_inst_show() argument
411 iscsi_login_stat_tiqn(item)->tiqn_index); iscsi_stat_login_inst_show()
414 static ssize_t iscsi_stat_login_indx_show(struct config_item *item, iscsi_stat_login_indx_show() argument
420 static ssize_t iscsi_stat_login_accepts_show(struct config_item *item, iscsi_stat_login_accepts_show() argument
423 struct iscsi_tiqn *tiqn = iscsi_login_stat_tiqn(item); iscsi_stat_login_accepts_show()
434 static ssize_t iscsi_stat_login_other_fails_show(struct config_item *item, iscsi_stat_login_other_fails_show() argument
437 struct iscsi_tiqn *tiqn = iscsi_login_stat_tiqn(item); iscsi_stat_login_other_fails_show()
448 static ssize_t iscsi_stat_login_redirects_show(struct config_item *item, iscsi_stat_login_redirects_show() argument
451 struct iscsi_tiqn *tiqn = iscsi_login_stat_tiqn(item); iscsi_stat_login_redirects_show()
462 static ssize_t iscsi_stat_login_authorize_fails_show(struct config_item *item, iscsi_stat_login_authorize_fails_show() argument
465 struct iscsi_tiqn *tiqn = iscsi_login_stat_tiqn(item); iscsi_stat_login_authorize_fails_show()
477 struct config_item *item, char *page) iscsi_stat_login_authenticate_fails_show()
479 struct iscsi_tiqn *tiqn = iscsi_login_stat_tiqn(item); iscsi_stat_login_authenticate_fails_show()
490 static ssize_t iscsi_stat_login_negotiate_fails_show(struct config_item *item, iscsi_stat_login_negotiate_fails_show() argument
493 struct iscsi_tiqn *tiqn = iscsi_login_stat_tiqn(item); iscsi_stat_login_negotiate_fails_show()
533 static struct iscsi_tiqn *iscsi_logout_stat_tiqn(struct config_item *item) iscsi_logout_stat_tiqn() argument
535 struct iscsi_wwn_stat_grps *igrps = container_of(to_config_group(item), iscsi_logout_stat_tiqn()
540 static ssize_t iscsi_stat_logout_inst_show(struct config_item *item, char *page) iscsi_stat_logout_inst_show() argument
543 iscsi_logout_stat_tiqn(item)->tiqn_index); iscsi_stat_logout_inst_show()
546 static ssize_t iscsi_stat_logout_indx_show(struct config_item *item, char *page) iscsi_stat_logout_indx_show() argument
551 static ssize_t iscsi_stat_logout_normal_logouts_show(struct config_item *item, iscsi_stat_logout_normal_logouts_show() argument
554 struct iscsi_tiqn *tiqn = iscsi_logout_stat_tiqn(item); iscsi_stat_logout_normal_logouts_show()
560 static ssize_t iscsi_stat_logout_abnormal_logouts_show(struct config_item *item, iscsi_stat_logout_abnormal_logouts_show() argument
563 struct iscsi_tiqn *tiqn = iscsi_logout_stat_tiqn(item); iscsi_stat_logout_abnormal_logouts_show()
590 static struct iscsi_node_acl *iscsi_stat_nacl(struct config_item *item) iscsi_stat_nacl() argument
592 struct iscsi_node_stat_grps *igrps = container_of(to_config_group(item), iscsi_stat_nacl()
597 static ssize_t iscsi_stat_sess_inst_show(struct config_item *item, char *page) iscsi_stat_sess_inst_show() argument
599 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_inst_show()
607 static ssize_t iscsi_stat_sess_node_show(struct config_item *item, char *page) iscsi_stat_sess_node_show() argument
609 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_node_show()
628 static ssize_t iscsi_stat_sess_indx_show(struct config_item *item, char *page) iscsi_stat_sess_indx_show() argument
630 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_indx_show()
649 static ssize_t iscsi_stat_sess_cmd_pdus_show(struct config_item *item, iscsi_stat_sess_cmd_pdus_show() argument
652 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_cmd_pdus_show()
671 static ssize_t iscsi_stat_sess_rsp_pdus_show(struct config_item *item, iscsi_stat_sess_rsp_pdus_show() argument
674 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_rsp_pdus_show()
693 static ssize_t iscsi_stat_sess_txdata_octs_show(struct config_item *item, iscsi_stat_sess_txdata_octs_show() argument
696 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_txdata_octs_show()
715 static ssize_t iscsi_stat_sess_rxdata_octs_show(struct config_item *item, iscsi_stat_sess_rxdata_octs_show() argument
718 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_rxdata_octs_show()
737 static ssize_t iscsi_stat_sess_conn_digest_errors_show(struct config_item *item, iscsi_stat_sess_conn_digest_errors_show() argument
740 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_conn_digest_errors_show()
760 struct config_item *item, char *page) iscsi_stat_sess_conn_timeout_errors_show()
762 struct iscsi_node_acl *acl = iscsi_stat_nacl(item); iscsi_stat_sess_conn_timeout_errors_show()
476 iscsi_stat_login_authenticate_fails_show( struct config_item *item, char *page) iscsi_stat_login_authenticate_fails_show() argument
759 iscsi_stat_sess_conn_timeout_errors_show( struct config_item *item, char *page) iscsi_stat_sess_conn_timeout_errors_show() argument
H A Discsi_target_configfs.c41 static inline struct iscsi_tpg_np *to_iscsi_tpg_np(struct config_item *item) to_iscsi_tpg_np() argument
43 return container_of(to_tpg_np(item), struct iscsi_tpg_np, se_tpg_np); to_iscsi_tpg_np()
46 static ssize_t lio_target_np_sctp_show(struct config_item *item, char *page) lio_target_np_sctp_show() argument
48 struct iscsi_tpg_np *tpg_np = to_iscsi_tpg_np(item); lio_target_np_sctp_show()
61 static ssize_t lio_target_np_sctp_store(struct config_item *item, lio_target_np_sctp_store() argument
64 struct iscsi_tpg_np *tpg_np = to_iscsi_tpg_np(item); lio_target_np_sctp_store()
114 static ssize_t lio_target_np_iser_show(struct config_item *item, char *page) lio_target_np_iser_show() argument
116 struct iscsi_tpg_np *tpg_np = to_iscsi_tpg_np(item); lio_target_np_iser_show()
129 static ssize_t lio_target_np_iser_store(struct config_item *item, lio_target_np_iser_store() argument
132 struct iscsi_tpg_np *tpg_np = to_iscsi_tpg_np(item); lio_target_np_iser_store()
349 static ssize_t iscsi_nacl_attrib_##name##_show(struct config_item *item,\
352 struct se_node_acl *se_nacl = attrib_to_nacl(item); \
359 static ssize_t iscsi_nacl_attrib_##name##_store(struct config_item *item,\
362 struct se_node_acl *se_nacl = attrib_to_nacl(item); \
445 static ssize_t iscsi_nacl_auth_##name##_show(struct config_item *item, \
448 struct se_node_acl *nacl = auth_to_nacl(item); \
452 static ssize_t iscsi_nacl_auth_##name##_store(struct config_item *item, \
455 struct se_node_acl *nacl = auth_to_nacl(item); \
485 static ssize_t iscsi_nacl_auth_##name##_show(struct config_item *item, \
488 struct se_node_acl *nacl = auth_to_nacl(item); \
511 static ssize_t iscsi_nacl_param_##name##_show(struct config_item *item, \
514 struct se_node_acl *se_nacl = param_to_nacl(item); \
567 static ssize_t lio_target_nacl_info_show(struct config_item *item, char *page) lio_target_nacl_info_show() argument
569 struct se_node_acl *se_nacl = acl_to_nacl(item); lio_target_nacl_info_show()
684 static ssize_t lio_target_nacl_cmdsn_depth_show(struct config_item *item, lio_target_nacl_cmdsn_depth_show() argument
687 return sprintf(page, "%u\n", acl_to_nacl(item)->queue_depth); lio_target_nacl_cmdsn_depth_show()
690 static ssize_t lio_target_nacl_cmdsn_depth_store(struct config_item *item, lio_target_nacl_cmdsn_depth_store() argument
693 struct se_node_acl *se_nacl = acl_to_nacl(item); lio_target_nacl_cmdsn_depth_store()
743 static ssize_t lio_target_nacl_tag_show(struct config_item *item, char *page) lio_target_nacl_tag_show() argument
745 return snprintf(page, PAGE_SIZE, "%s", acl_to_nacl(item)->acl_tag); lio_target_nacl_tag_show()
748 static ssize_t lio_target_nacl_tag_store(struct config_item *item, lio_target_nacl_tag_store() argument
751 struct se_node_acl *se_nacl = acl_to_nacl(item); lio_target_nacl_tag_store()
818 static ssize_t iscsi_tpg_attrib_##name##_show(struct config_item *item, \
821 struct se_portal_group *se_tpg = attrib_to_tpg(item); \
834 static ssize_t iscsi_tpg_attrib_##name##_store(struct config_item *item,\
837 struct se_portal_group *se_tpg = attrib_to_tpg(item); \
937 static ssize_t iscsi_tpg_auth_##name##_show(struct config_item *item, \
940 return __iscsi_tpg_auth_##name##_show(auth_to_tpg(item), page); \
943 static ssize_t iscsi_tpg_auth_##name##_store(struct config_item *item, \
946 return __iscsi_tpg_auth_##name##_store(auth_to_tpg(item), page, count); \
973 static ssize_t iscsi_tpg_auth_##name##_show(struct config_item *item, \
976 return __iscsi_tpg_auth_##name##_show(auth_to_tpg(item), page); \
996 static ssize_t iscsi_tpg_param_##name##_show(struct config_item *item, \
999 struct se_portal_group *se_tpg = param_to_tpg(item); \
1019 static ssize_t iscsi_tpg_param_##name##_store(struct config_item *item, \
1022 struct se_portal_group *se_tpg = param_to_tpg(item); \
1105 static ssize_t lio_target_tpg_enable_show(struct config_item *item, char *page) lio_target_tpg_enable_show() argument
1107 struct se_portal_group *se_tpg = to_tpg(item); lio_target_tpg_enable_show()
1120 static ssize_t lio_target_tpg_enable_store(struct config_item *item, lio_target_tpg_enable_store() argument
1123 struct se_portal_group *se_tpg = to_tpg(item); lio_target_tpg_enable_store()
1162 static ssize_t lio_target_tpg_dynamic_sessions_show(struct config_item *item, lio_target_tpg_dynamic_sessions_show() argument
1165 return target_show_dynamic_sessions(to_tpg(item), page); lio_target_tpg_dynamic_sessions_show()
1248 static ssize_t lio_target_wwn_lio_version_show(struct config_item *item, lio_target_wwn_lio_version_show() argument
1336 static ssize_t iscsi_disc_##name##_show(struct config_item *item, char *page) \
1341 static ssize_t iscsi_disc_##name##_store(struct config_item *item, \
1357 static ssize_t iscsi_disc_##name##_show(struct config_item *item, char *page) \
1367 static ssize_t iscsi_disc_enforce_discovery_auth_show(struct config_item *item, iscsi_disc_enforce_discovery_auth_show() argument
1375 static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item, iscsi_disc_enforce_discovery_auth_store() argument
/linux-4.4.14/drivers/usb/gadget/function/
H A Du_ether_configfs.h20 static void _f_##_attr_release(struct config_item *item) \
22 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
32 static ssize_t _f_##_opts_dev_addr_show(struct config_item *item, \
35 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
45 static ssize_t _f_##_opts_dev_addr_store(struct config_item *item, \
48 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
67 static ssize_t _f_##_opts_host_addr_show(struct config_item *item, \
70 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
80 static ssize_t _f_##_opts_host_addr_store(struct config_item *item, \
83 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
102 static ssize_t _f_##_opts_qmult_show(struct config_item *item, \
105 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
114 static ssize_t _f_##_opts_qmult_store(struct config_item *item, \
117 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
141 static ssize_t _f_##_opts_ifname_show(struct config_item *item, \
144 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
H A Duvc_configfs.c37 static inline struct f_uvc_opts *to_f_uvc_opts(struct config_item *item);
43 struct config_item item; member in struct:uvcg_control_header
48 static struct uvcg_control_header *to_uvcg_control_header(struct config_item *item) to_uvcg_control_header() argument
50 return container_of(item, struct uvcg_control_header, item); to_uvcg_control_header()
55 struct config_item *item, char *page) \
57 struct uvcg_control_header *ch = to_uvcg_control_header(item); \
60 struct mutex *su_mutex = &ch->item.ci_group->cg_subsys->su_mutex;\
65 opts_item = ch->item.ci_parent->ci_parent->ci_parent; \
77 uvcg_control_header_##cname##_store(struct config_item *item, \
80 struct uvcg_control_header *ch = to_uvcg_control_header(item); \
83 struct mutex *su_mutex = &ch->item.ci_group->cg_subsys->su_mutex;\
89 opts_item = ch->item.ci_parent->ci_parent->ci_parent; \
150 config_item_init_type_name(&h->item, name, &uvcg_control_header_type); uvcg_control_header_make()
152 return &h->item; uvcg_control_header_make()
156 struct config_item *item) uvcg_control_header_drop()
158 struct uvcg_control_header *h = to_uvcg_control_header(item); uvcg_control_header_drop()
184 *to_uvcg_default_processing(struct config_item *item) to_uvcg_default_processing() argument
186 return container_of(to_config_group(item), to_uvcg_default_processing()
192 struct config_item *item, char *page) \
194 struct uvcg_default_processing *dp = to_uvcg_default_processing(item); \
229 struct config_item *item, char *page) uvcg_default_processing_bm_controls_show()
231 struct uvcg_default_processing *dp = to_uvcg_default_processing(item); uvcg_default_processing_bm_controls_show()
295 *to_uvcg_default_camera(struct config_item *item) to_uvcg_default_camera() argument
297 return container_of(to_config_group(item), to_uvcg_default_camera()
303 struct config_item *item, char *page) \
305 struct uvcg_default_camera *dc = to_uvcg_default_camera(item); \
348 struct config_item *item, char *page) uvcg_default_camera_bm_controls_show()
350 struct uvcg_default_camera *dc = to_uvcg_default_camera(item); uvcg_default_camera_bm_controls_show()
417 *to_uvcg_default_output(struct config_item *item) to_uvcg_default_output() argument
419 return container_of(to_config_group(item), to_uvcg_default_output()
425 struct config_item *item, char *page) \
427 struct uvcg_default_output *dout = to_uvcg_default_output(item); \
682 static struct uvcg_format *to_uvcg_format(struct config_item *item) to_uvcg_format() argument
684 return container_of(to_config_group(item), struct uvcg_format, group); to_uvcg_format()
752 struct config_item item; member in struct:uvcg_streaming_header
759 static struct uvcg_streaming_header *to_uvcg_streaming_header(struct config_item *item) to_uvcg_streaming_header() argument
761 return container_of(item, struct uvcg_streaming_header, item); to_uvcg_streaming_header()
860 struct config_item *item, char *page) \
862 struct uvcg_streaming_header *sh = to_uvcg_streaming_header(item); \
865 struct mutex *su_mutex = &sh->item.ci_group->cg_subsys->su_mutex;\
870 opts_item = sh->item.ci_parent->ci_parent->ci_parent; \
926 config_item_init_type_name(&h->item, name, &uvcg_streaming_header_type); uvcg_streaming_header_make()
928 return &h->item; uvcg_streaming_header_make()
932 struct config_item *item) uvcg_streaming_header_drop()
934 struct uvcg_streaming_header *h = to_uvcg_streaming_header(item); uvcg_streaming_header_drop()
972 struct config_item item; member in struct:uvcg_frame
975 static struct uvcg_frame *to_uvcg_frame(struct config_item *item) to_uvcg_frame() argument
977 return container_of(item, struct uvcg_frame, item); to_uvcg_frame()
981 static ssize_t uvcg_frame_##cname##_show(struct config_item *item, char *page)\
983 struct uvcg_frame *f = to_uvcg_frame(item); \
986 struct mutex *su_mutex = &f->item.ci_group->cg_subsys->su_mutex;\
991 opts_item = f->item.ci_parent->ci_parent->ci_parent->ci_parent; \
1002 static ssize_t uvcg_frame_##cname##_store(struct config_item *item, \
1005 struct uvcg_frame *f = to_uvcg_frame(item); \
1009 struct mutex *su_mutex = &f->item.ci_group->cg_subsys->su_mutex;\
1019 opts_item = f->item.ci_parent->ci_parent->ci_parent->ci_parent; \
1021 fmt = to_uvcg_format(f->item.ci_parent); \
1056 static ssize_t uvcg_frame_dw_frame_interval_show(struct config_item *item, uvcg_frame_dw_frame_interval_show() argument
1059 struct uvcg_frame *frm = to_uvcg_frame(item); uvcg_frame_dw_frame_interval_show()
1062 struct mutex *su_mutex = &frm->item.ci_group->cg_subsys->su_mutex; uvcg_frame_dw_frame_interval_show()
1068 opts_item = frm->item.ci_parent->ci_parent->ci_parent->ci_parent; uvcg_frame_dw_frame_interval_show()
1134 static ssize_t uvcg_frame_dw_frame_interval_store(struct config_item *item, uvcg_frame_dw_frame_interval_store() argument
1137 struct uvcg_frame *ch = to_uvcg_frame(item); uvcg_frame_dw_frame_interval_store()
1141 struct mutex *su_mutex = &ch->item.ci_group->cg_subsys->su_mutex; uvcg_frame_dw_frame_interval_store()
1147 opts_item = ch->item.ci_parent->ci_parent->ci_parent->ci_parent; uvcg_frame_dw_frame_interval_store()
1149 fmt = to_uvcg_format(ch->item.ci_parent); uvcg_frame_dw_frame_interval_store()
1243 config_item_init_type_name(&h->item, name, &uvcg_frame_type); uvcg_frame_make()
1245 return &h->item; uvcg_frame_make()
1248 static void uvcg_frame_drop(struct config_group *group, struct config_item *item) uvcg_frame_drop() argument
1250 struct uvcg_frame *h = to_uvcg_frame(item); uvcg_frame_drop()
1271 static struct uvcg_uncompressed *to_uvcg_uncompressed(struct config_item *item) to_uvcg_uncompressed() argument
1274 container_of(to_config_group(item), struct uvcg_format, group), to_uvcg_uncompressed()
1283 static ssize_t uvcg_uncompressed_guid_format_show(struct config_item *item, uvcg_uncompressed_guid_format_show() argument
1286 struct uvcg_uncompressed *ch = to_uvcg_uncompressed(item); uvcg_uncompressed_guid_format_show()
1305 static ssize_t uvcg_uncompressed_guid_format_store(struct config_item *item, uvcg_uncompressed_guid_format_store() argument
1308 struct uvcg_uncompressed *ch = to_uvcg_uncompressed(item); uvcg_uncompressed_guid_format_store()
1339 struct config_item *item, char *page) \
1341 struct uvcg_uncompressed *u = to_uvcg_uncompressed(item); \
1364 struct config_item *item, char *page) \
1366 struct uvcg_uncompressed *u = to_uvcg_uncompressed(item); \
1386 uvcg_uncompressed_##cname##_store(struct config_item *item, \
1389 struct uvcg_uncompressed *u = to_uvcg_uncompressed(item); \
1440 uvcg_uncompressed_bma_controls_show(struct config_item *item, char *page) uvcg_uncompressed_bma_controls_show() argument
1442 struct uvcg_uncompressed *unc = to_uvcg_uncompressed(item); uvcg_uncompressed_bma_controls_show()
1447 uvcg_uncompressed_bma_controls_store(struct config_item *item, uvcg_uncompressed_bma_controls_store() argument
1450 struct uvcg_uncompressed *unc = to_uvcg_uncompressed(item); uvcg_uncompressed_bma_controls_store()
1505 struct config_item *item) uvcg_uncompressed_drop()
1507 struct uvcg_uncompressed *h = to_uvcg_uncompressed(item); uvcg_uncompressed_drop()
1528 static struct uvcg_mjpeg *to_uvcg_mjpeg(struct config_item *item) to_uvcg_mjpeg() argument
1531 container_of(to_config_group(item), struct uvcg_format, group), to_uvcg_mjpeg()
1541 static ssize_t uvcg_mjpeg_##cname##_show(struct config_item *item, char *page)\
1543 struct uvcg_mjpeg *u = to_uvcg_mjpeg(item); \
1565 static ssize_t uvcg_mjpeg_##cname##_show(struct config_item *item, char *page)\
1567 struct uvcg_mjpeg *u = to_uvcg_mjpeg(item); \
1587 uvcg_mjpeg_##cname##_store(struct config_item *item, \
1590 struct uvcg_mjpeg *u = to_uvcg_mjpeg(item); \
1641 uvcg_mjpeg_bma_controls_show(struct config_item *item, char *page) uvcg_mjpeg_bma_controls_show() argument
1643 struct uvcg_mjpeg *u = to_uvcg_mjpeg(item); uvcg_mjpeg_bma_controls_show()
1648 uvcg_mjpeg_bma_controls_store(struct config_item *item, uvcg_mjpeg_bma_controls_store() argument
1651 struct uvcg_mjpeg *u = to_uvcg_mjpeg(item); uvcg_mjpeg_bma_controls_store()
1699 struct config_item *item) uvcg_mjpeg_drop()
1701 struct uvcg_mjpeg *h = to_uvcg_mjpeg(item); uvcg_mjpeg_drop()
1722 *to_uvcg_default_color_matching(struct config_item *item) to_uvcg_default_color_matching() argument
1724 return container_of(to_config_group(item), to_uvcg_default_color_matching()
1730 struct config_item *item, char *page) \
1733 to_uvcg_default_color_matching(item); \
1852 struct config_item *item; __uvcg_iter_strm_cls() local
1868 list_for_each_entry(item, &grp->cg_children, ci_entry) { __uvcg_iter_strm_cls()
1869 frm = to_uvcg_frame(item); __uvcg_iter_strm_cls()
2188 static inline struct f_uvc_opts *to_f_uvc_opts(struct config_item *item) to_f_uvc_opts() argument
2190 return container_of(to_config_group(item), struct f_uvc_opts, to_f_uvc_opts()
2194 static void uvc_attr_release(struct config_item *item) uvc_attr_release() argument
2196 struct f_uvc_opts *opts = to_f_uvc_opts(item); uvc_attr_release()
2207 struct config_item *item, char *page) \
2209 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2220 f_uvc_opts_##cname##_store(struct config_item *item, \
2223 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
155 uvcg_control_header_drop(struct config_group *group, struct config_item *item) uvcg_control_header_drop() argument
228 uvcg_default_processing_bm_controls_show( struct config_item *item, char *page) uvcg_default_processing_bm_controls_show() argument
347 uvcg_default_camera_bm_controls_show( struct config_item *item, char *page) uvcg_default_camera_bm_controls_show() argument
931 uvcg_streaming_header_drop(struct config_group *group, struct config_item *item) uvcg_streaming_header_drop() argument
1504 uvcg_uncompressed_drop(struct config_group *group, struct config_item *item) uvcg_uncompressed_drop() argument
1698 uvcg_mjpeg_drop(struct config_group *group, struct config_item *item) uvcg_mjpeg_drop() argument
H A Df_sourcesink.c886 static inline struct f_ss_opts *to_f_ss_opts(struct config_item *item) to_f_ss_opts() argument
888 return container_of(to_config_group(item), struct f_ss_opts, to_f_ss_opts()
892 static void ss_attr_release(struct config_item *item) ss_attr_release() argument
894 struct f_ss_opts *ss_opts = to_f_ss_opts(item); ss_attr_release()
903 static ssize_t f_ss_opts_pattern_show(struct config_item *item, char *page) f_ss_opts_pattern_show() argument
905 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_pattern_show()
915 static ssize_t f_ss_opts_pattern_store(struct config_item *item, f_ss_opts_pattern_store() argument
918 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_pattern_store()
946 static ssize_t f_ss_opts_isoc_interval_show(struct config_item *item, char *page) f_ss_opts_isoc_interval_show() argument
948 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_interval_show()
958 static ssize_t f_ss_opts_isoc_interval_store(struct config_item *item, f_ss_opts_isoc_interval_store() argument
961 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_interval_store()
989 static ssize_t f_ss_opts_isoc_maxpacket_show(struct config_item *item, char *page) f_ss_opts_isoc_maxpacket_show() argument
991 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_maxpacket_show()
1001 static ssize_t f_ss_opts_isoc_maxpacket_store(struct config_item *item, f_ss_opts_isoc_maxpacket_store() argument
1004 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_maxpacket_store()
1032 static ssize_t f_ss_opts_isoc_mult_show(struct config_item *item, char *page) f_ss_opts_isoc_mult_show() argument
1034 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_mult_show()
1044 static ssize_t f_ss_opts_isoc_mult_store(struct config_item *item, f_ss_opts_isoc_mult_store() argument
1047 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_mult_store()
1075 static ssize_t f_ss_opts_isoc_maxburst_show(struct config_item *item, char *page) f_ss_opts_isoc_maxburst_show() argument
1077 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_maxburst_show()
1087 static ssize_t f_ss_opts_isoc_maxburst_store(struct config_item *item, f_ss_opts_isoc_maxburst_store() argument
1090 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_isoc_maxburst_store()
1118 static ssize_t f_ss_opts_bulk_buflen_show(struct config_item *item, char *page) f_ss_opts_bulk_buflen_show() argument
1120 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_bulk_buflen_show()
1130 static ssize_t f_ss_opts_bulk_buflen_store(struct config_item *item, f_ss_opts_bulk_buflen_store() argument
1133 struct f_ss_opts *opts = to_f_ss_opts(item); f_ss_opts_bulk_buflen_store()
H A Df_loopback.c462 static inline struct f_lb_opts *to_f_lb_opts(struct config_item *item) to_f_lb_opts() argument
464 return container_of(to_config_group(item), struct f_lb_opts, to_f_lb_opts()
468 static void lb_attr_release(struct config_item *item) lb_attr_release() argument
470 struct f_lb_opts *lb_opts = to_f_lb_opts(item); lb_attr_release()
479 static ssize_t f_lb_opts_qlen_show(struct config_item *item, char *page) f_lb_opts_qlen_show() argument
481 struct f_lb_opts *opts = to_f_lb_opts(item); f_lb_opts_qlen_show()
491 static ssize_t f_lb_opts_qlen_store(struct config_item *item, f_lb_opts_qlen_store() argument
494 struct f_lb_opts *opts = to_f_lb_opts(item); f_lb_opts_qlen_store()
517 static ssize_t f_lb_opts_bulk_buflen_show(struct config_item *item, char *page) f_lb_opts_bulk_buflen_show() argument
519 struct f_lb_opts *opts = to_f_lb_opts(item); f_lb_opts_bulk_buflen_show()
529 static ssize_t f_lb_opts_bulk_buflen_store(struct config_item *item, f_lb_opts_bulk_buflen_store() argument
532 struct f_lb_opts *opts = to_f_lb_opts(item); f_lb_opts_bulk_buflen_store()
H A Df_serial.c255 static inline struct f_serial_opts *to_f_serial_opts(struct config_item *item) to_f_serial_opts() argument
257 return container_of(to_config_group(item), struct f_serial_opts, to_f_serial_opts()
261 static void serial_attr_release(struct config_item *item) serial_attr_release() argument
263 struct f_serial_opts *opts = to_f_serial_opts(item); serial_attr_release()
272 static ssize_t f_serial_port_num_show(struct config_item *item, char *page) f_serial_port_num_show() argument
274 return sprintf(page, "%u\n", to_f_serial_opts(item)->port_num); f_serial_port_num_show()
H A Df_hid.c702 static inline struct f_hid_opts *to_f_hid_opts(struct config_item *item) to_f_hid_opts() argument
704 return container_of(to_config_group(item), struct f_hid_opts, to_f_hid_opts()
708 static void hid_attr_release(struct config_item *item) hid_attr_release() argument
710 struct f_hid_opts *opts = to_f_hid_opts(item); hid_attr_release()
720 static ssize_t f_hid_opts_##name##_show(struct config_item *item, char *page)\
722 struct f_hid_opts *opts = to_f_hid_opts(item); \
732 static ssize_t f_hid_opts_##name##_store(struct config_item *item, \
735 struct f_hid_opts *opts = to_f_hid_opts(item); \
767 static ssize_t f_hid_opts_report_desc_show(struct config_item *item, char *page) f_hid_opts_report_desc_show() argument
769 struct f_hid_opts *opts = to_f_hid_opts(item); f_hid_opts_report_desc_show()
780 static ssize_t f_hid_opts_report_desc_store(struct config_item *item, f_hid_opts_report_desc_store() argument
783 struct f_hid_opts *opts = to_f_hid_opts(item); f_hid_opts_report_desc_store()
H A Df_uac1.c766 static inline struct f_uac1_opts *to_f_uac1_opts(struct config_item *item) to_f_uac1_opts() argument
768 return container_of(to_config_group(item), struct f_uac1_opts, to_f_uac1_opts()
772 static void f_uac1_attr_release(struct config_item *item) f_uac1_attr_release() argument
774 struct f_uac1_opts *opts = to_f_uac1_opts(item); f_uac1_attr_release()
784 static ssize_t f_uac1_opts_##name##_show(struct config_item *item, \
787 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
797 static ssize_t f_uac1_opts_##name##_store(struct config_item *item, \
800 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
829 static ssize_t f_uac1_opts_##name##_show(struct config_item *item, \
832 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
842 static ssize_t f_uac1_opts_##name##_store(struct config_item *item, \
845 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
H A Df_obex.c384 static inline struct f_serial_opts *to_f_serial_opts(struct config_item *item) to_f_serial_opts() argument
386 return container_of(to_config_group(item), struct f_serial_opts, to_f_serial_opts()
390 static void obex_attr_release(struct config_item *item) obex_attr_release() argument
392 struct f_serial_opts *opts = to_f_serial_opts(item); obex_attr_release()
401 static ssize_t f_obex_port_num_show(struct config_item *item, char *page) f_obex_port_num_show() argument
403 return sprintf(page, "%u\n", to_f_serial_opts(item)->port_num); f_obex_port_num_show()
H A Df_mass_storage.c3126 static inline struct fsg_lun_opts *to_fsg_lun_opts(struct config_item *item) to_fsg_lun_opts() argument
3128 return container_of(to_config_group(item), struct fsg_lun_opts, group); to_fsg_lun_opts()
3131 static inline struct fsg_opts *to_fsg_opts(struct config_item *item) to_fsg_opts() argument
3133 return container_of(to_config_group(item), struct fsg_opts, to_fsg_opts()
3137 static void fsg_lun_attr_release(struct config_item *item) fsg_lun_attr_release() argument
3141 lun_opts = to_fsg_lun_opts(item); fsg_lun_attr_release()
3149 static ssize_t fsg_lun_opts_file_show(struct config_item *item, char *page) fsg_lun_opts_file_show() argument
3151 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); fsg_lun_opts_file_show()
3157 static ssize_t fsg_lun_opts_file_store(struct config_item *item, fsg_lun_opts_file_store() argument
3160 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); fsg_lun_opts_file_store()
3168 static ssize_t fsg_lun_opts_ro_show(struct config_item *item, char *page) fsg_lun_opts_ro_show() argument
3170 return fsg_show_ro(to_fsg_lun_opts(item)->lun, page); fsg_lun_opts_ro_show()
3173 static ssize_t fsg_lun_opts_ro_store(struct config_item *item, fsg_lun_opts_ro_store() argument
3176 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); fsg_lun_opts_ro_store()
3184 static ssize_t fsg_lun_opts_removable_show(struct config_item *item, fsg_lun_opts_removable_show() argument
3187 return fsg_show_removable(to_fsg_lun_opts(item)->lun, page); fsg_lun_opts_removable_show()
3190 static ssize_t fsg_lun_opts_removable_store(struct config_item *item, fsg_lun_opts_removable_store() argument
3193 return fsg_store_removable(to_fsg_lun_opts(item)->lun, page, len); fsg_lun_opts_removable_store()
3198 static ssize_t fsg_lun_opts_cdrom_show(struct config_item *item, char *page) fsg_lun_opts_cdrom_show() argument
3200 return fsg_show_cdrom(to_fsg_lun_opts(item)->lun, page); fsg_lun_opts_cdrom_show()
3203 static ssize_t fsg_lun_opts_cdrom_store(struct config_item *item, fsg_lun_opts_cdrom_store() argument
3206 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); fsg_lun_opts_cdrom_store()
3215 static ssize_t fsg_lun_opts_nofua_show(struct config_item *item, char *page) fsg_lun_opts_nofua_show() argument
3217 return fsg_show_nofua(to_fsg_lun_opts(item)->lun, page); fsg_lun_opts_nofua_show()
3220 static ssize_t fsg_lun_opts_nofua_store(struct config_item *item, fsg_lun_opts_nofua_store() argument
3223 return fsg_store_nofua(to_fsg_lun_opts(item)->lun, page, len); fsg_lun_opts_nofua_store()
3301 static void fsg_lun_drop(struct config_group *group, struct config_item *item) fsg_lun_drop() argument
3306 lun_opts = to_fsg_lun_opts(item); fsg_lun_drop()
3322 config_item_put(item); fsg_lun_drop()
3325 static void fsg_attr_release(struct config_item *item) fsg_attr_release() argument
3327 struct fsg_opts *opts = to_fsg_opts(item); fsg_attr_release()
3336 static ssize_t fsg_opts_stall_show(struct config_item *item, char *page) fsg_opts_stall_show() argument
3338 struct fsg_opts *opts = to_fsg_opts(item); fsg_opts_stall_show()
3348 static ssize_t fsg_opts_stall_store(struct config_item *item, const char *page, fsg_opts_stall_store() argument
3351 struct fsg_opts *opts = to_fsg_opts(item); fsg_opts_stall_store()
3376 static ssize_t fsg_opts_num_buffers_show(struct config_item *item, char *page) fsg_opts_num_buffers_show() argument
3378 struct fsg_opts *opts = to_fsg_opts(item); fsg_opts_num_buffers_show()
3388 static ssize_t fsg_opts_num_buffers_store(struct config_item *item, fsg_opts_num_buffers_store() argument
3391 struct fsg_opts *opts = to_fsg_opts(item); fsg_opts_num_buffers_store()
H A Df_phonet.c580 static inline struct f_phonet_opts *to_f_phonet_opts(struct config_item *item) to_f_phonet_opts() argument
582 return container_of(to_config_group(item), struct f_phonet_opts, to_f_phonet_opts()
586 static void phonet_attr_release(struct config_item *item) phonet_attr_release() argument
588 struct f_phonet_opts *opts = to_f_phonet_opts(item); phonet_attr_release()
597 static ssize_t f_phonet_ifname_show(struct config_item *item, char *page) f_phonet_ifname_show() argument
599 return gether_get_ifname(to_f_phonet_opts(item)->net, page, PAGE_SIZE); f_phonet_ifname_show()
H A Df_midi.c900 static inline struct f_midi_opts *to_f_midi_opts(struct config_item *item) to_f_midi_opts() argument
902 return container_of(to_config_group(item), struct f_midi_opts, to_f_midi_opts()
906 static void midi_attr_release(struct config_item *item) midi_attr_release() argument
908 struct f_midi_opts *opts = to_f_midi_opts(item); midi_attr_release()
918 static ssize_t f_midi_opts_##name##_show(struct config_item *item, char *page) \
920 struct f_midi_opts *opts = to_f_midi_opts(item); \
930 static ssize_t f_midi_opts_##name##_store(struct config_item *item, \
933 struct f_midi_opts *opts = to_f_midi_opts(item); \
967 static ssize_t f_midi_opts_id_show(struct config_item *item, char *page) f_midi_opts_id_show() argument
969 struct f_midi_opts *opts = to_f_midi_opts(item); f_midi_opts_id_show()
985 static ssize_t f_midi_opts_id_store(struct config_item *item, f_midi_opts_id_store() argument
988 struct f_midi_opts *opts = to_f_midi_opts(item); f_midi_opts_id_store()
H A Df_printer.c1143 *to_f_printer_opts(struct config_item *item) to_f_printer_opts() argument
1145 return container_of(to_config_group(item), struct f_printer_opts, to_f_printer_opts()
1149 static void printer_attr_release(struct config_item *item) printer_attr_release() argument
1151 struct f_printer_opts *opts = to_f_printer_opts(item); printer_attr_release()
1160 static ssize_t f_printer_opts_pnp_string_show(struct config_item *item, f_printer_opts_pnp_string_show() argument
1163 struct f_printer_opts *opts = to_f_printer_opts(item); f_printer_opts_pnp_string_show()
1173 static ssize_t f_printer_opts_pnp_string_store(struct config_item *item, f_printer_opts_pnp_string_store() argument
1176 struct f_printer_opts *opts = to_f_printer_opts(item); f_printer_opts_pnp_string_store()
1191 static ssize_t f_printer_opts_q_len_show(struct config_item *item, f_printer_opts_q_len_show() argument
1194 struct f_printer_opts *opts = to_f_printer_opts(item); f_printer_opts_q_len_show()
1204 static ssize_t f_printer_opts_q_len_store(struct config_item *item, f_printer_opts_q_len_store() argument
1207 struct f_printer_opts *opts = to_f_printer_opts(item); f_printer_opts_q_len_store()
/linux-4.4.14/fs/nfs/
H A Ddns_resolve.c105 struct nfs_dns_ent *item; nfs_dns_ent_put() local
107 item = container_of(ref, struct nfs_dns_ent, h.ref); nfs_dns_ent_put()
108 kfree(item->hostname); nfs_dns_ent_put()
109 kfree(item); nfs_dns_ent_put()
114 struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); nfs_dns_ent_alloc() local
116 if (item != NULL) { nfs_dns_ent_alloc()
117 item->hostname = NULL; nfs_dns_ent_alloc()
118 item->namelen = 0; nfs_dns_ent_alloc()
119 item->addrlen = 0; nfs_dns_ent_alloc()
120 return &item->h; nfs_dns_ent_alloc()
169 struct nfs_dns_ent *item; nfs_dns_show() local
176 item = container_of(h, struct nfs_dns_ent, h); nfs_dns_show()
177 ttl = item->h.expiry_time - seconds_since_boot(); nfs_dns_show()
184 rpc_ntop((struct sockaddr *)&item->addr, buf, sizeof(buf)); nfs_dns_show()
188 seq_printf(m, "%15s %ld\n", item->hostname, ttl); nfs_dns_show()
222 struct nfs_dns_ent key, *item; nfs_dns_parse() local
253 item = nfs_dns_lookup(cd, &key); nfs_dns_parse()
254 if (item == NULL) nfs_dns_parse()
260 item = nfs_dns_update(cd, &key, item); nfs_dns_parse()
261 if (item == NULL) nfs_dns_parse()
265 cache_put(&item->h, cd); nfs_dns_parse()
272 struct nfs_dns_ent **item, do_cache_lookup()
277 *item = nfs_dns_lookup(cd, key); do_cache_lookup()
278 if (*item) { do_cache_lookup()
279 ret = cache_check(cd, &(*item)->h, &dreq->req); do_cache_lookup()
281 *item = NULL; do_cache_lookup()
288 struct nfs_dns_ent **item) do_cache_lookup_nowait()
292 *item = nfs_dns_lookup(cd, key); do_cache_lookup_nowait()
293 if (!*item) do_cache_lookup_nowait()
296 if (!test_bit(CACHE_VALID, &(*item)->h.flags) do_cache_lookup_nowait()
297 || (*item)->h.expiry_time < seconds_since_boot() do_cache_lookup_nowait()
298 || cd->flush_time > (*item)->h.last_refresh) do_cache_lookup_nowait()
301 if (test_bit(CACHE_NEGATIVE, &(*item)->h.flags)) do_cache_lookup_nowait()
305 cache_put(&(*item)->h, cd); do_cache_lookup_nowait()
307 *item = NULL; do_cache_lookup_nowait()
313 struct nfs_dns_ent **item) do_cache_lookup_wait()
321 ret = do_cache_lookup(cd, key, item, dreq); do_cache_lookup_wait()
325 ret = do_cache_lookup_nowait(cd, key, item); do_cache_lookup_wait()
339 struct nfs_dns_ent *item = NULL; nfs_dns_resolve_name() local
343 ret = do_cache_lookup_wait(nn->nfs_dns_resolve, &key, &item); nfs_dns_resolve_name()
345 if (salen >= item->addrlen) { nfs_dns_resolve_name()
346 memcpy(sa, &item->addr, item->addrlen); nfs_dns_resolve_name()
347 ret = item->addrlen; nfs_dns_resolve_name()
350 cache_put(&item->h, nn->nfs_dns_resolve); nfs_dns_resolve_name()
270 do_cache_lookup(struct cache_detail *cd, struct nfs_dns_ent *key, struct nfs_dns_ent **item, struct nfs_cache_defer_req *dreq) do_cache_lookup() argument
286 do_cache_lookup_nowait(struct cache_detail *cd, struct nfs_dns_ent *key, struct nfs_dns_ent **item) do_cache_lookup_nowait() argument
311 do_cache_lookup_wait(struct cache_detail *cd, struct nfs_dns_ent *key, struct nfs_dns_ent **item) do_cache_lookup_wait() argument
/linux-4.4.14/drivers/target/
H A Dtarget_core_stat.c57 static struct se_device *to_stat_dev(struct config_item *item) to_stat_dev() argument
59 struct se_dev_stat_grps *sgrps = container_of(to_config_group(item), to_stat_dev()
64 static ssize_t target_stat_inst_show(struct config_item *item, char *page) target_stat_inst_show() argument
66 struct se_hba *hba = to_stat_dev(item)->se_hba; target_stat_inst_show()
71 static ssize_t target_stat_indx_show(struct config_item *item, char *page) target_stat_indx_show() argument
73 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->dev_index); target_stat_indx_show()
76 static ssize_t target_stat_role_show(struct config_item *item, char *page) target_stat_role_show() argument
81 static ssize_t target_stat_ports_show(struct config_item *item, char *page) target_stat_ports_show() argument
83 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->export_count); target_stat_ports_show()
107 static struct se_device *to_stat_tgt_dev(struct config_item *item) to_stat_tgt_dev() argument
109 struct se_dev_stat_grps *sgrps = container_of(to_config_group(item), to_stat_tgt_dev()
114 static ssize_t target_stat_tgt_inst_show(struct config_item *item, char *page) target_stat_tgt_inst_show() argument
116 struct se_hba *hba = to_stat_tgt_dev(item)->se_hba; target_stat_tgt_inst_show()
121 static ssize_t target_stat_tgt_indx_show(struct config_item *item, char *page) target_stat_tgt_indx_show() argument
123 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_tgt_dev(item)->dev_index); target_stat_tgt_indx_show()
126 static ssize_t target_stat_tgt_num_lus_show(struct config_item *item, target_stat_tgt_num_lus_show() argument
132 static ssize_t target_stat_tgt_status_show(struct config_item *item, target_stat_tgt_status_show() argument
135 if (to_stat_tgt_dev(item)->export_count) target_stat_tgt_status_show()
141 static ssize_t target_stat_tgt_non_access_lus_show(struct config_item *item, target_stat_tgt_non_access_lus_show() argument
146 if (to_stat_tgt_dev(item)->export_count) target_stat_tgt_non_access_lus_show()
154 static ssize_t target_stat_tgt_resets_show(struct config_item *item, target_stat_tgt_resets_show() argument
158 atomic_long_read(&to_stat_tgt_dev(item)->num_resets)); target_stat_tgt_resets_show()
187 static struct se_device *to_stat_lu_dev(struct config_item *item) to_stat_lu_dev() argument
189 struct se_dev_stat_grps *sgrps = container_of(to_config_group(item), to_stat_lu_dev()
194 static ssize_t target_stat_lu_inst_show(struct config_item *item, char *page) target_stat_lu_inst_show() argument
196 struct se_hba *hba = to_stat_lu_dev(item)->se_hba; target_stat_lu_inst_show()
201 static ssize_t target_stat_lu_dev_show(struct config_item *item, char *page) target_stat_lu_dev_show() argument
204 to_stat_lu_dev(item)->dev_index); target_stat_lu_dev_show()
207 static ssize_t target_stat_lu_indx_show(struct config_item *item, char *page) target_stat_lu_indx_show() argument
212 static ssize_t target_stat_lu_lun_show(struct config_item *item, char *page) target_stat_lu_lun_show() argument
218 static ssize_t target_stat_lu_lu_name_show(struct config_item *item, char *page) target_stat_lu_lu_name_show() argument
220 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_lu_name_show()
228 static ssize_t target_stat_lu_vend_show(struct config_item *item, char *page) target_stat_lu_vend_show() argument
230 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_vend_show()
242 static ssize_t target_stat_lu_prod_show(struct config_item *item, char *page) target_stat_lu_prod_show() argument
244 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_prod_show()
256 static ssize_t target_stat_lu_rev_show(struct config_item *item, char *page) target_stat_lu_rev_show() argument
258 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_rev_show()
270 static ssize_t target_stat_lu_dev_type_show(struct config_item *item, char *page) target_stat_lu_dev_type_show() argument
272 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_dev_type_show()
279 static ssize_t target_stat_lu_status_show(struct config_item *item, char *page) target_stat_lu_status_show() argument
281 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_status_show()
288 static ssize_t target_stat_lu_state_bit_show(struct config_item *item, target_stat_lu_state_bit_show() argument
295 static ssize_t target_stat_lu_num_cmds_show(struct config_item *item, target_stat_lu_num_cmds_show() argument
298 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_num_cmds_show()
305 static ssize_t target_stat_lu_read_mbytes_show(struct config_item *item, target_stat_lu_read_mbytes_show() argument
308 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_read_mbytes_show()
315 static ssize_t target_stat_lu_write_mbytes_show(struct config_item *item, target_stat_lu_write_mbytes_show() argument
318 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_write_mbytes_show()
325 static ssize_t target_stat_lu_resets_show(struct config_item *item, char *page) target_stat_lu_resets_show() argument
327 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_resets_show()
334 static ssize_t target_stat_lu_full_stat_show(struct config_item *item, target_stat_lu_full_stat_show() argument
341 static ssize_t target_stat_lu_hs_num_cmds_show(struct config_item *item, target_stat_lu_hs_num_cmds_show() argument
348 static ssize_t target_stat_lu_creation_time_show(struct config_item *item, target_stat_lu_creation_time_show() argument
351 struct se_device *dev = to_stat_lu_dev(item); target_stat_lu_creation_time_show()
429 static struct se_lun *to_stat_port(struct config_item *item) to_stat_port() argument
431 struct se_port_stat_grps *pgrps = container_of(to_config_group(item), to_stat_port()
436 static ssize_t target_stat_port_inst_show(struct config_item *item, char *page) target_stat_port_inst_show() argument
438 struct se_lun *lun = to_stat_port(item); target_stat_port_inst_show()
450 static ssize_t target_stat_port_dev_show(struct config_item *item, char *page) target_stat_port_dev_show() argument
452 struct se_lun *lun = to_stat_port(item); target_stat_port_dev_show()
464 static ssize_t target_stat_port_indx_show(struct config_item *item, char *page) target_stat_port_indx_show() argument
466 struct se_lun *lun = to_stat_port(item); target_stat_port_indx_show()
478 static ssize_t target_stat_port_role_show(struct config_item *item, char *page) target_stat_port_role_show() argument
480 struct se_lun *lun = to_stat_port(item); target_stat_port_role_show()
492 static ssize_t target_stat_port_busy_count_show(struct config_item *item, target_stat_port_busy_count_show() argument
495 struct se_lun *lun = to_stat_port(item); target_stat_port_busy_count_show()
532 static struct se_lun *to_stat_tgt_port(struct config_item *item) to_stat_tgt_port() argument
534 struct se_port_stat_grps *pgrps = container_of(to_config_group(item), to_stat_tgt_port()
539 static ssize_t target_stat_tgt_port_inst_show(struct config_item *item, target_stat_tgt_port_inst_show() argument
542 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_inst_show()
554 static ssize_t target_stat_tgt_port_dev_show(struct config_item *item, target_stat_tgt_port_dev_show() argument
557 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_dev_show()
569 static ssize_t target_stat_tgt_port_indx_show(struct config_item *item, target_stat_tgt_port_indx_show() argument
572 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_indx_show()
584 static ssize_t target_stat_tgt_port_name_show(struct config_item *item, target_stat_tgt_port_name_show() argument
587 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_name_show()
602 static ssize_t target_stat_tgt_port_port_index_show(struct config_item *item, target_stat_tgt_port_port_index_show() argument
605 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_port_index_show()
620 static ssize_t target_stat_tgt_port_in_cmds_show(struct config_item *item, target_stat_tgt_port_in_cmds_show() argument
623 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_in_cmds_show()
636 static ssize_t target_stat_tgt_port_write_mbytes_show(struct config_item *item, target_stat_tgt_port_write_mbytes_show() argument
639 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_write_mbytes_show()
652 static ssize_t target_stat_tgt_port_read_mbytes_show(struct config_item *item, target_stat_tgt_port_read_mbytes_show() argument
655 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_read_mbytes_show()
668 static ssize_t target_stat_tgt_port_hs_in_cmds_show(struct config_item *item, target_stat_tgt_port_hs_in_cmds_show() argument
671 struct se_lun *lun = to_stat_tgt_port(item); target_stat_tgt_port_hs_in_cmds_show()
716 static struct se_lun *to_transport_stat(struct config_item *item) to_transport_stat() argument
718 struct se_port_stat_grps *pgrps = container_of(to_config_group(item), to_transport_stat()
723 static ssize_t target_stat_transport_inst_show(struct config_item *item, target_stat_transport_inst_show() argument
726 struct se_lun *lun = to_transport_stat(item); target_stat_transport_inst_show()
738 static ssize_t target_stat_transport_device_show(struct config_item *item, target_stat_transport_device_show() argument
741 struct se_lun *lun = to_transport_stat(item); target_stat_transport_device_show()
757 static ssize_t target_stat_transport_indx_show(struct config_item *item, target_stat_transport_indx_show() argument
760 struct se_lun *lun = to_transport_stat(item); target_stat_transport_indx_show()
774 static ssize_t target_stat_transport_dev_name_show(struct config_item *item, target_stat_transport_dev_name_show() argument
777 struct se_lun *lun = to_transport_stat(item); target_stat_transport_dev_name_show()
840 static struct se_lun_acl *auth_to_lacl(struct config_item *item) auth_to_lacl() argument
842 struct se_ml_stat_grps *lgrps = container_of(to_config_group(item), auth_to_lacl()
847 static ssize_t target_stat_auth_inst_show(struct config_item *item, target_stat_auth_inst_show() argument
850 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_inst_show()
870 static ssize_t target_stat_auth_dev_show(struct config_item *item, target_stat_auth_dev_show() argument
873 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_dev_show()
892 static ssize_t target_stat_auth_port_show(struct config_item *item, target_stat_auth_port_show() argument
895 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_port_show()
914 static ssize_t target_stat_auth_indx_show(struct config_item *item, target_stat_auth_indx_show() argument
917 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_indx_show()
934 static ssize_t target_stat_auth_dev_or_port_show(struct config_item *item, target_stat_auth_dev_or_port_show() argument
937 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_dev_or_port_show()
954 static ssize_t target_stat_auth_intr_name_show(struct config_item *item, target_stat_auth_intr_name_show() argument
957 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_intr_name_show()
974 static ssize_t target_stat_auth_map_indx_show(struct config_item *item, target_stat_auth_map_indx_show() argument
977 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_map_indx_show()
994 static ssize_t target_stat_auth_att_count_show(struct config_item *item, target_stat_auth_att_count_show() argument
997 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_att_count_show()
1014 static ssize_t target_stat_auth_num_cmds_show(struct config_item *item, target_stat_auth_num_cmds_show() argument
1017 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_num_cmds_show()
1035 static ssize_t target_stat_auth_read_mbytes_show(struct config_item *item, target_stat_auth_read_mbytes_show() argument
1038 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_read_mbytes_show()
1056 static ssize_t target_stat_auth_write_mbytes_show(struct config_item *item, target_stat_auth_write_mbytes_show() argument
1059 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_write_mbytes_show()
1077 static ssize_t target_stat_auth_hs_num_cmds_show(struct config_item *item, target_stat_auth_hs_num_cmds_show() argument
1080 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_hs_num_cmds_show()
1097 static ssize_t target_stat_auth_creation_time_show(struct config_item *item, target_stat_auth_creation_time_show() argument
1100 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_creation_time_show()
1118 static ssize_t target_stat_auth_row_status_show(struct config_item *item, target_stat_auth_row_status_show() argument
1121 struct se_lun_acl *lacl = auth_to_lacl(item); target_stat_auth_row_status_show()
1180 static struct se_lun_acl *iport_to_lacl(struct config_item *item) iport_to_lacl() argument
1182 struct se_ml_stat_grps *lgrps = container_of(to_config_group(item), iport_to_lacl()
1187 static ssize_t target_stat_iport_inst_show(struct config_item *item, target_stat_iport_inst_show() argument
1190 struct se_lun_acl *lacl = iport_to_lacl(item); target_stat_iport_inst_show()
1210 static ssize_t target_stat_iport_dev_show(struct config_item *item, target_stat_iport_dev_show() argument
1213 struct se_lun_acl *lacl = iport_to_lacl(item); target_stat_iport_dev_show()
1232 static ssize_t target_stat_iport_port_show(struct config_item *item, target_stat_iport_port_show() argument
1235 struct se_lun_acl *lacl = iport_to_lacl(item); target_stat_iport_port_show()
1254 static ssize_t target_stat_iport_indx_show(struct config_item *item, target_stat_iport_indx_show() argument
1257 struct se_lun_acl *lacl = iport_to_lacl(item); target_stat_iport_indx_show()
1278 static ssize_t target_stat_iport_port_auth_indx_show(struct config_item *item, target_stat_iport_port_auth_indx_show() argument
1281 struct se_lun_acl *lacl = iport_to_lacl(item); target_stat_iport_port_auth_indx_show()
1298 static ssize_t target_stat_iport_port_ident_show(struct config_item *item, target_stat_iport_port_ident_show() argument
1301 struct se_lun_acl *lacl = iport_to_lacl(item); target_stat_iport_port_ident_show()
H A Dtarget_core_configfs.c84 item_to_hba(struct config_item *item) item_to_hba() argument
86 return container_of(to_config_group(item), struct se_hba, hba_group); item_to_hba()
92 static ssize_t target_core_item_version_show(struct config_item *item, target_core_item_version_show() argument
215 struct config_item *item) target_core_deregister_fabric()
218 to_config_group(item), struct target_fabric_configfs, tf_group); target_core_deregister_fabric()
224 " tf list\n", config_item_name(item)); target_core_deregister_fabric()
231 " %s\n", config_item_name(item)); target_core_deregister_fabric()
239 config_item_put(item); target_core_deregister_fabric()
248 * All item attributes appearing in /sys/kernel/target/ appear here.
273 int target_depend_item(struct config_item *item) target_depend_item() argument
275 return configfs_depend_item(&target_core_fabrics, item); target_depend_item()
279 void target_undepend_item(struct config_item *item) target_undepend_item() argument
281 return configfs_undepend_item(&target_core_fabrics, item); target_undepend_item()
461 static inline struct se_dev_attrib *to_attrib(struct config_item *item) to_attrib() argument
463 return container_of(to_config_group(item), struct se_dev_attrib, to_attrib()
469 static ssize_t _name##_show(struct config_item *item, char *page) \
471 return snprintf(page, PAGE_SIZE, "%u\n", to_attrib(item)->_name); \
505 static ssize_t _name##_store(struct config_item *item, const char *page,\
508 struct se_dev_attrib *da = to_attrib(item); \
526 static ssize_t _name##_store(struct config_item *item, const char *page, \
529 struct se_dev_attrib *da = to_attrib(item); \
547 static ssize_t _name##_store(struct config_item *item, const char *page,\
571 static ssize_t emulate_model_alias_store(struct config_item *item, emulate_model_alias_store() argument
574 struct se_dev_attrib *da = to_attrib(item); emulate_model_alias_store()
600 static ssize_t emulate_write_cache_store(struct config_item *item, emulate_write_cache_store() argument
603 struct se_dev_attrib *da = to_attrib(item); emulate_write_cache_store()
622 static ssize_t emulate_ua_intlck_ctrl_store(struct config_item *item, emulate_ua_intlck_ctrl_store() argument
625 struct se_dev_attrib *da = to_attrib(item); emulate_ua_intlck_ctrl_store()
650 static ssize_t emulate_tas_store(struct config_item *item, emulate_tas_store() argument
653 struct se_dev_attrib *da = to_attrib(item); emulate_tas_store()
674 static ssize_t emulate_tpu_store(struct config_item *item, emulate_tpu_store() argument
677 struct se_dev_attrib *da = to_attrib(item); emulate_tpu_store()
700 static ssize_t emulate_tpws_store(struct config_item *item, emulate_tpws_store() argument
703 struct se_dev_attrib *da = to_attrib(item); emulate_tpws_store()
726 static ssize_t pi_prot_type_store(struct config_item *item, pi_prot_type_store() argument
729 struct se_dev_attrib *da = to_attrib(item); pi_prot_type_store()
787 static ssize_t pi_prot_format_store(struct config_item *item, pi_prot_format_store() argument
790 struct se_dev_attrib *da = to_attrib(item); pi_prot_format_store()
825 static ssize_t force_pr_aptpl_store(struct config_item *item, force_pr_aptpl_store() argument
828 struct se_dev_attrib *da = to_attrib(item); force_pr_aptpl_store()
847 static ssize_t emulate_rest_reord_store(struct config_item *item, emulate_rest_reord_store() argument
850 struct se_dev_attrib *da = to_attrib(item); emulate_rest_reord_store()
872 static ssize_t queue_depth_store(struct config_item *item, queue_depth_store() argument
875 struct se_dev_attrib *da = to_attrib(item); queue_depth_store()
909 static ssize_t optimal_sectors_store(struct config_item *item, optimal_sectors_store() argument
912 struct se_dev_attrib *da = to_attrib(item); optimal_sectors_store()
939 static ssize_t block_size_store(struct config_item *item, block_size_store() argument
942 struct se_dev_attrib *da = to_attrib(item); block_size_store()
1062 static struct t10_wwn *to_t10_wwn(struct config_item *item) to_t10_wwn() argument
1064 return container_of(to_config_group(item), struct t10_wwn, t10_wwn_group); to_t10_wwn()
1070 static ssize_t target_wwn_vpd_unit_serial_show(struct config_item *item, target_wwn_vpd_unit_serial_show() argument
1074 &to_t10_wwn(item)->unit_serial[0]); target_wwn_vpd_unit_serial_show()
1077 static ssize_t target_wwn_vpd_unit_serial_store(struct config_item *item, target_wwn_vpd_unit_serial_store() argument
1080 struct t10_wwn *t10_wwn = to_t10_wwn(item); target_wwn_vpd_unit_serial_store()
1139 static ssize_t target_wwn_vpd_protocol_identifier_show(struct config_item *item, target_wwn_vpd_protocol_identifier_show() argument
1142 struct t10_wwn *t10_wwn = to_t10_wwn(item); target_wwn_vpd_protocol_identifier_show()
1170 static ssize_t target_wwn_##_name##_show(struct config_item *item, \
1173 struct t10_wwn *t10_wwn = to_t10_wwn(item); \
1234 static struct se_device *pr_to_dev(struct config_item *item) pr_to_dev() argument
1236 return container_of(to_config_group(item), struct se_device, pr_to_dev()
1279 static ssize_t target_pr_res_holder_show(struct config_item *item, char *page) target_pr_res_holder_show() argument
1281 struct se_device *dev = pr_to_dev(item); target_pr_res_holder_show()
1296 static ssize_t target_pr_res_pr_all_tgt_pts_show(struct config_item *item, target_pr_res_pr_all_tgt_pts_show() argument
1299 struct se_device *dev = pr_to_dev(item); target_pr_res_pr_all_tgt_pts_show()
1317 static ssize_t target_pr_res_pr_generation_show(struct config_item *item, target_pr_res_pr_generation_show() argument
1320 return sprintf(page, "0x%08x\n", pr_to_dev(item)->t10_pr.pr_generation); target_pr_res_pr_generation_show()
1324 static ssize_t target_pr_res_pr_holder_tg_port_show(struct config_item *item, target_pr_res_pr_holder_tg_port_show() argument
1327 struct se_device *dev = pr_to_dev(item); target_pr_res_pr_holder_tg_port_show()
1360 static ssize_t target_pr_res_pr_registered_i_pts_show(struct config_item *item, target_pr_res_pr_registered_i_pts_show() argument
1363 struct se_device *dev = pr_to_dev(item); target_pr_res_pr_registered_i_pts_show()
1401 static ssize_t target_pr_res_pr_type_show(struct config_item *item, char *page) target_pr_res_pr_type_show() argument
1403 struct se_device *dev = pr_to_dev(item); target_pr_res_pr_type_show()
1420 static ssize_t target_pr_res_type_show(struct config_item *item, char *page) target_pr_res_type_show() argument
1422 struct se_device *dev = pr_to_dev(item); target_pr_res_type_show()
1432 static ssize_t target_pr_res_aptpl_active_show(struct config_item *item, target_pr_res_aptpl_active_show() argument
1435 struct se_device *dev = pr_to_dev(item); target_pr_res_aptpl_active_show()
1444 static ssize_t target_pr_res_aptpl_metadata_show(struct config_item *item, target_pr_res_aptpl_metadata_show() argument
1447 struct se_device *dev = pr_to_dev(item); target_pr_res_aptpl_metadata_show()
1480 static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item, target_pr_res_aptpl_metadata_store() argument
1483 struct se_device *dev = pr_to_dev(item); target_pr_res_aptpl_metadata_store()
1694 static inline struct se_device *to_device(struct config_item *item) to_device() argument
1696 return container_of(to_config_group(item), struct se_device, dev_group); to_device()
1699 static ssize_t target_dev_info_show(struct config_item *item, char *page) target_dev_info_show() argument
1701 struct se_device *dev = to_device(item); target_dev_info_show()
1712 static ssize_t target_dev_control_store(struct config_item *item, target_dev_control_store() argument
1715 struct se_device *dev = to_device(item); target_dev_control_store()
1720 static ssize_t target_dev_alias_show(struct config_item *item, char *page) target_dev_alias_show() argument
1722 struct se_device *dev = to_device(item); target_dev_alias_show()
1730 static ssize_t target_dev_alias_store(struct config_item *item, target_dev_alias_store() argument
1733 struct se_device *dev = to_device(item); target_dev_alias_store()
1760 static ssize_t target_dev_udev_path_show(struct config_item *item, char *page) target_dev_udev_path_show() argument
1762 struct se_device *dev = to_device(item); target_dev_udev_path_show()
1770 static ssize_t target_dev_udev_path_store(struct config_item *item, target_dev_udev_path_store() argument
1773 struct se_device *dev = to_device(item); target_dev_udev_path_store()
1801 static ssize_t target_dev_enable_show(struct config_item *item, char *page) target_dev_enable_show() argument
1803 struct se_device *dev = to_device(item); target_dev_enable_show()
1808 static ssize_t target_dev_enable_store(struct config_item *item, target_dev_enable_store() argument
1811 struct se_device *dev = to_device(item); target_dev_enable_store()
1828 static ssize_t target_dev_alua_lu_gp_show(struct config_item *item, char *page) target_dev_alua_lu_gp_show() argument
1830 struct se_device *dev = to_device(item); target_dev_alua_lu_gp_show()
1852 static ssize_t target_dev_alua_lu_gp_store(struct config_item *item, target_dev_alua_lu_gp_store() argument
1855 struct se_device *dev = to_device(item); target_dev_alua_lu_gp_store()
1932 static ssize_t target_dev_lba_map_show(struct config_item *item, char *page) target_dev_lba_map_show() argument
1934 struct se_device *dev = to_device(item); target_dev_lba_map_show()
1977 static ssize_t target_dev_lba_map_store(struct config_item *item, target_dev_lba_map_store() argument
1980 struct se_device *dev = to_device(item); target_dev_lba_map_store()
2111 static void target_core_dev_release(struct config_item *item) target_core_dev_release() argument
2113 struct config_group *dev_cg = to_config_group(item); target_core_dev_release()
2131 static inline struct t10_alua_lu_gp *to_lu_gp(struct config_item *item) to_lu_gp() argument
2133 return container_of(to_config_group(item), struct t10_alua_lu_gp, to_lu_gp()
2137 static ssize_t target_lu_gp_lu_gp_id_show(struct config_item *item, char *page) target_lu_gp_lu_gp_id_show() argument
2139 struct t10_alua_lu_gp *lu_gp = to_lu_gp(item); target_lu_gp_lu_gp_id_show()
2146 static ssize_t target_lu_gp_lu_gp_id_store(struct config_item *item, target_lu_gp_lu_gp_id_store() argument
2149 struct t10_alua_lu_gp *lu_gp = to_lu_gp(item); target_lu_gp_lu_gp_id_store()
2178 static ssize_t target_lu_gp_members_show(struct config_item *item, char *page) target_lu_gp_members_show() argument
2180 struct t10_alua_lu_gp *lu_gp = to_lu_gp(item); target_lu_gp_members_show()
2221 static void target_core_alua_lu_gp_release(struct config_item *item) target_core_alua_lu_gp_release() argument
2223 struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item), target_core_alua_lu_gp_release()
2271 struct config_item *item) target_core_alua_drop_lu_gp()
2273 struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item), target_core_alua_drop_lu_gp()
2278 config_item_name(item), lu_gp->lu_gp_id); target_core_alua_drop_lu_gp()
2283 config_item_put(item); target_core_alua_drop_lu_gp()
2301 static inline struct t10_alua_tg_pt_gp *to_tg_pt_gp(struct config_item *item) to_tg_pt_gp() argument
2303 return container_of(to_config_group(item), struct t10_alua_tg_pt_gp, to_tg_pt_gp()
2307 static ssize_t target_tg_pt_gp_alua_access_state_show(struct config_item *item, target_tg_pt_gp_alua_access_state_show() argument
2311 atomic_read(&to_tg_pt_gp(item)->tg_pt_gp_alua_access_state)); target_tg_pt_gp_alua_access_state_show()
2314 static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item, target_tg_pt_gp_alua_access_state_store() argument
2317 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_alua_access_state_store()
2359 static ssize_t target_tg_pt_gp_alua_access_status_show(struct config_item *item, target_tg_pt_gp_alua_access_status_show() argument
2362 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_alua_access_status_show()
2368 struct config_item *item, const char *page, size_t count) target_tg_pt_gp_alua_access_status_store()
2370 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_alua_access_status_store()
2401 static ssize_t target_tg_pt_gp_alua_access_type_show(struct config_item *item, target_tg_pt_gp_alua_access_type_show() argument
2404 return core_alua_show_access_type(to_tg_pt_gp(item), page); target_tg_pt_gp_alua_access_type_show()
2407 static ssize_t target_tg_pt_gp_alua_access_type_store(struct config_item *item, target_tg_pt_gp_alua_access_type_store() argument
2410 return core_alua_store_access_type(to_tg_pt_gp(item), page, count); target_tg_pt_gp_alua_access_type_store()
2415 struct config_item *item, char *p) \
2417 struct t10_alua_tg_pt_gp *t = to_tg_pt_gp(item); \
2423 struct config_item *item, const char *p, size_t c) \
2425 struct t10_alua_tg_pt_gp *t = to_tg_pt_gp(item); \
2462 struct config_item *item, char *page) target_tg_pt_gp_alua_write_metadata_show()
2465 to_tg_pt_gp(item)->tg_pt_gp_write_metadata); target_tg_pt_gp_alua_write_metadata_show()
2469 struct config_item *item, const char *page, size_t count) target_tg_pt_gp_alua_write_metadata_store()
2471 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_alua_write_metadata_store()
2491 static ssize_t target_tg_pt_gp_nonop_delay_msecs_show(struct config_item *item, target_tg_pt_gp_nonop_delay_msecs_show() argument
2494 return core_alua_show_nonop_delay_msecs(to_tg_pt_gp(item), page); target_tg_pt_gp_nonop_delay_msecs_show()
2497 static ssize_t target_tg_pt_gp_nonop_delay_msecs_store(struct config_item *item, target_tg_pt_gp_nonop_delay_msecs_store() argument
2500 return core_alua_store_nonop_delay_msecs(to_tg_pt_gp(item), page, target_tg_pt_gp_nonop_delay_msecs_store()
2504 static ssize_t target_tg_pt_gp_trans_delay_msecs_show(struct config_item *item, target_tg_pt_gp_trans_delay_msecs_show() argument
2507 return core_alua_show_trans_delay_msecs(to_tg_pt_gp(item), page); target_tg_pt_gp_trans_delay_msecs_show()
2510 static ssize_t target_tg_pt_gp_trans_delay_msecs_store(struct config_item *item, target_tg_pt_gp_trans_delay_msecs_store() argument
2513 return core_alua_store_trans_delay_msecs(to_tg_pt_gp(item), page, target_tg_pt_gp_trans_delay_msecs_store()
2518 struct config_item *item, char *page) target_tg_pt_gp_implicit_trans_secs_show()
2520 return core_alua_show_implicit_trans_secs(to_tg_pt_gp(item), page); target_tg_pt_gp_implicit_trans_secs_show()
2524 struct config_item *item, const char *page, size_t count) target_tg_pt_gp_implicit_trans_secs_store()
2526 return core_alua_store_implicit_trans_secs(to_tg_pt_gp(item), page, target_tg_pt_gp_implicit_trans_secs_store()
2530 static ssize_t target_tg_pt_gp_preferred_show(struct config_item *item, target_tg_pt_gp_preferred_show() argument
2533 return core_alua_show_preferred_bit(to_tg_pt_gp(item), page); target_tg_pt_gp_preferred_show()
2536 static ssize_t target_tg_pt_gp_preferred_store(struct config_item *item, target_tg_pt_gp_preferred_store() argument
2539 return core_alua_store_preferred_bit(to_tg_pt_gp(item), page, count); target_tg_pt_gp_preferred_store()
2542 static ssize_t target_tg_pt_gp_tg_pt_gp_id_show(struct config_item *item, target_tg_pt_gp_tg_pt_gp_id_show() argument
2545 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_tg_pt_gp_id_show()
2552 static ssize_t target_tg_pt_gp_tg_pt_gp_id_store(struct config_item *item, target_tg_pt_gp_tg_pt_gp_id_store() argument
2555 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_tg_pt_gp_id_store()
2584 static ssize_t target_tg_pt_gp_members_show(struct config_item *item, target_tg_pt_gp_members_show() argument
2587 struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); target_tg_pt_gp_members_show()
2658 static void target_core_alua_tg_pt_gp_release(struct config_item *item) target_core_alua_tg_pt_gp_release() argument
2660 struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item), target_core_alua_tg_pt_gp_release()
2709 struct config_item *item) target_core_alua_drop_tg_pt_gp()
2711 struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item), target_core_alua_drop_tg_pt_gp()
2716 config_item_name(item), tg_pt_gp->tg_pt_gp_id); target_core_alua_drop_tg_pt_gp()
2721 config_item_put(item); target_core_alua_drop_tg_pt_gp()
2760 struct config_item *item) target_core_stat_rmdir()
2873 struct config_item *item) target_core_drop_subdev()
2875 struct config_group *dev_cg = to_config_group(item); target_core_drop_subdev()
2916 config_item_put(item); target_core_drop_subdev()
2926 static inline struct se_hba *to_hba(struct config_item *item) to_hba() argument
2928 return container_of(to_config_group(item), struct se_hba, hba_group); to_hba()
2931 static ssize_t target_hba_info_show(struct config_item *item, char *page) target_hba_info_show() argument
2933 struct se_hba *hba = to_hba(item); target_hba_info_show()
2940 static ssize_t target_hba_mode_show(struct config_item *item, char *page) target_hba_mode_show() argument
2942 struct se_hba *hba = to_hba(item); target_hba_mode_show()
2951 static ssize_t target_hba_mode_store(struct config_item *item, target_hba_mode_store() argument
2954 struct se_hba *hba = to_hba(item); target_hba_mode_store()
2986 static void target_core_hba_release(struct config_item *item) target_core_hba_release() argument
2988 struct se_hba *hba = container_of(to_config_group(item), target_core_hba_release()
3072 struct config_item *item) target_core_call_delhbafromtarget()
3078 config_item_put(item); target_core_call_delhbafromtarget()
3247 struct config_item *item; target_core_exit_configfs() local
3252 item = &lu_gp_cg->default_groups[i]->cg_item; target_core_exit_configfs()
3254 config_item_put(item); target_core_exit_configfs()
3261 item = &alua_cg->default_groups[i]->cg_item; target_core_exit_configfs()
3263 config_item_put(item); target_core_exit_configfs()
3270 item = &hba_cg->default_groups[i]->cg_item; target_core_exit_configfs()
3272 config_item_put(item); target_core_exit_configfs()
213 target_core_deregister_fabric( struct config_group *group, struct config_item *item) target_core_deregister_fabric() argument
2269 target_core_alua_drop_lu_gp( struct config_group *group, struct config_item *item) target_core_alua_drop_lu_gp() argument
2367 target_tg_pt_gp_alua_access_status_store( struct config_item *item, const char *page, size_t count) target_tg_pt_gp_alua_access_status_store() argument
2461 target_tg_pt_gp_alua_write_metadata_show( struct config_item *item, char *page) target_tg_pt_gp_alua_write_metadata_show() argument
2468 target_tg_pt_gp_alua_write_metadata_store( struct config_item *item, const char *page, size_t count) target_tg_pt_gp_alua_write_metadata_store() argument
2517 target_tg_pt_gp_implicit_trans_secs_show( struct config_item *item, char *page) target_tg_pt_gp_implicit_trans_secs_show() argument
2523 target_tg_pt_gp_implicit_trans_secs_store( struct config_item *item, const char *page, size_t count) target_tg_pt_gp_implicit_trans_secs_store() argument
2707 target_core_alua_drop_tg_pt_gp( struct config_group *group, struct config_item *item) target_core_alua_drop_tg_pt_gp() argument
2758 target_core_stat_rmdir( struct config_group *group, struct config_item *item) target_core_stat_rmdir() argument
2871 target_core_drop_subdev( struct config_group *group, struct config_item *item) target_core_drop_subdev() argument
3070 target_core_call_delhbafromtarget( struct config_group *group, struct config_item *item) target_core_call_delhbafromtarget() argument
H A Dtarget_core_fabric_configfs.c153 static struct se_lun_acl *item_to_lun_acl(struct config_item *item) item_to_lun_acl() argument
155 return container_of(to_config_group(item), struct se_lun_acl, item_to_lun_acl()
160 struct config_item *item, char *page) target_fabric_mappedlun_write_protect_show()
162 struct se_lun_acl *lacl = item_to_lun_acl(item); target_fabric_mappedlun_write_protect_show()
179 struct config_item *item, const char *page, size_t count) target_fabric_mappedlun_write_protect_store()
181 struct se_lun_acl *lacl = item_to_lun_acl(item); target_fabric_mappedlun_write_protect_store()
215 static void target_fabric_mappedlun_release(struct config_item *item) target_fabric_mappedlun_release() argument
217 struct se_lun_acl *lacl = container_of(to_config_group(item), target_fabric_mappedlun_release()
246 struct config_item *item) target_core_mappedlun_stat_rmdir()
356 struct config_item *item) target_fabric_drop_mappedlun()
358 struct se_lun_acl *lacl = container_of(to_config_group(item), target_fabric_drop_mappedlun()
380 config_item_put(item); target_fabric_drop_mappedlun()
383 static void target_fabric_nacl_base_release(struct config_item *item) target_fabric_nacl_base_release() argument
385 struct se_node_acl *se_nacl = container_of(to_config_group(item), target_fabric_nacl_base_release()
465 struct config_item *item) target_fabric_drop_nodeacl()
467 struct se_node_acl *se_nacl = container_of(to_config_group(item), target_fabric_drop_nodeacl()
482 config_item_put(item); target_fabric_drop_nodeacl()
496 static void target_fabric_np_base_release(struct config_item *item) target_fabric_np_base_release() argument
498 struct se_tpg_np *se_tpg_np = container_of(to_config_group(item), target_fabric_np_base_release()
543 struct config_item *item) target_fabric_drop_np()
548 config_item_put(item); target_fabric_drop_np()
562 static struct se_lun *item_to_lun(struct config_item *item) item_to_lun() argument
564 return container_of(to_config_group(item), struct se_lun, item_to_lun()
568 static ssize_t target_fabric_port_alua_tg_pt_gp_show(struct config_item *item, target_fabric_port_alua_tg_pt_gp_show() argument
571 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_gp_show()
579 static ssize_t target_fabric_port_alua_tg_pt_gp_store(struct config_item *item, target_fabric_port_alua_tg_pt_gp_store() argument
582 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_gp_store()
591 struct config_item *item, char *page) target_fabric_port_alua_tg_pt_offline_show()
593 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_offline_show()
602 struct config_item *item, const char *page, size_t count) target_fabric_port_alua_tg_pt_offline_store()
604 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_offline_store()
613 struct config_item *item, char *page) target_fabric_port_alua_tg_pt_status_show()
615 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_status_show()
624 struct config_item *item, const char *page, size_t count) target_fabric_port_alua_tg_pt_status_store()
626 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_status_store()
635 struct config_item *item, char *page) target_fabric_port_alua_tg_pt_write_md_show()
637 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_write_md_show()
646 struct config_item *item, const char *page, size_t count) target_fabric_port_alua_tg_pt_write_md_store()
648 struct se_lun *lun = item_to_lun(item); target_fabric_port_alua_tg_pt_write_md_store()
745 static void target_fabric_port_release(struct config_item *item) target_fabric_port_release() argument
747 struct se_lun *lun = container_of(to_config_group(item), target_fabric_port_release()
774 struct config_item *item) target_core_port_stat_rmdir()
847 struct config_item *item) target_fabric_drop_lun()
849 struct se_lun *lun = container_of(to_config_group(item), target_fabric_drop_lun()
871 config_item_put(item); target_fabric_drop_lun()
889 static void target_fabric_tpg_release(struct config_item *item) target_fabric_tpg_release() argument
891 struct se_portal_group *se_tpg = container_of(to_config_group(item), target_fabric_tpg_release()
957 struct config_item *item) target_fabric_drop_tpg()
959 struct se_portal_group *se_tpg = container_of(to_config_group(item), target_fabric_drop_tpg()
974 config_item_put(item); target_fabric_drop_tpg()
977 static void target_fabric_release_wwn(struct config_item *item) target_fabric_release_wwn() argument
979 struct se_wwn *wwn = container_of(to_config_group(item), target_fabric_release_wwn()
1045 struct config_item *item) target_fabric_drop_wwn()
1047 struct se_wwn *wwn = container_of(to_config_group(item), target_fabric_drop_wwn()
1059 config_item_put(item); target_fabric_drop_wwn()
159 target_fabric_mappedlun_write_protect_show( struct config_item *item, char *page) target_fabric_mappedlun_write_protect_show() argument
178 target_fabric_mappedlun_write_protect_store( struct config_item *item, const char *page, size_t count) target_fabric_mappedlun_write_protect_store() argument
244 target_core_mappedlun_stat_rmdir( struct config_group *group, struct config_item *item) target_core_mappedlun_stat_rmdir() argument
354 target_fabric_drop_mappedlun( struct config_group *group, struct config_item *item) target_fabric_drop_mappedlun() argument
463 target_fabric_drop_nodeacl( struct config_group *group, struct config_item *item) target_fabric_drop_nodeacl() argument
541 target_fabric_drop_np( struct config_group *group, struct config_item *item) target_fabric_drop_np() argument
590 target_fabric_port_alua_tg_pt_offline_show( struct config_item *item, char *page) target_fabric_port_alua_tg_pt_offline_show() argument
601 target_fabric_port_alua_tg_pt_offline_store( struct config_item *item, const char *page, size_t count) target_fabric_port_alua_tg_pt_offline_store() argument
612 target_fabric_port_alua_tg_pt_status_show( struct config_item *item, char *page) target_fabric_port_alua_tg_pt_status_show() argument
623 target_fabric_port_alua_tg_pt_status_store( struct config_item *item, const char *page, size_t count) target_fabric_port_alua_tg_pt_status_store() argument
634 target_fabric_port_alua_tg_pt_write_md_show( struct config_item *item, char *page) target_fabric_port_alua_tg_pt_write_md_show() argument
645 target_fabric_port_alua_tg_pt_write_md_store( struct config_item *item, const char *page, size_t count) target_fabric_port_alua_tg_pt_write_md_store() argument
772 target_core_port_stat_rmdir( struct config_group *group, struct config_item *item) target_core_port_stat_rmdir() argument
845 target_fabric_drop_lun( struct config_group *group, struct config_item *item) target_fabric_drop_lun() argument
955 target_fabric_drop_tpg( struct config_group *group, struct config_item *item) target_fabric_drop_tpg() argument
1043 target_fabric_drop_wwn( struct config_group *group, struct config_item *item) target_fabric_drop_wwn() argument
/linux-4.4.14/include/trace/
H A Dtrace_events.h8 * <type> <item>;
13 * The <type> <item> is created by the __field(type, item) macro or
15 * We simply do "type item;", and that will create the fields
70 #define __field(type, item) type item;
73 #define __field_ext(type, item, filter_type) type item;
76 #define __field_struct(type, item) type item;
79 #define __field_struct_ext(type, item, filter_type) type item;
82 #define __array(type, item, len) type item[len];
85 #define __dynamic_array(type, item, len) u32 __data_loc_##item;
88 #define __string(item, src) __dynamic_array(char, item, -1)
91 #define __bitmask(item, nr_bits) __dynamic_array(char, item, -1)
147 * The __dynamic_array() macro will create each u32 <item>, this is
149 * The size of an array is also encoded, in the higher 16 bits of <item>.
156 #define __field(type, item)
159 #define __field_ext(type, item, filter_type)
162 #define __field_struct(type, item)
165 #define __field_struct_ext(type, item, filter_type)
168 #define __array(type, item, len)
171 #define __dynamic_array(type, item, len) u32 item;
174 #define __string(item, src) __dynamic_array(char, item, -1)
177 #define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
358 #define __field_ext(type, item, filter_type) \
359 ret = trace_define_field(event_call, #type, #item, \
360 offsetof(typeof(field), item), \
361 sizeof(field.item), \
367 #define __field_struct_ext(type, item, filter_type) \
368 ret = trace_define_field(event_call, #type, #item, \
369 offsetof(typeof(field), item), \
370 sizeof(field.item), \
376 #define __field(type, item) __field_ext(type, item, FILTER_OTHER)
379 #define __field_struct(type, item) __field_struct_ext(type, item, FILTER_OTHER)
382 #define __array(type, item, len) \
386 ret = trace_define_field(event_call, type_str, #item, \
387 offsetof(typeof(field), item), \
388 sizeof(field.item), \
395 #define __dynamic_array(type, item, len) \
396 ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \
397 offsetof(typeof(field), __data_loc_##item), \
398 sizeof(field.__data_loc_##item), \
402 #define __string(item, src) __dynamic_array(char, item, -1)
405 #define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
437 #define __field(type, item)
440 #define __field_ext(type, item, filter_type)
443 #define __field_struct(type, item)
446 #define __field_struct_ext(type, item, filter_type)
449 #define __array(type, item, len)
452 #define __dynamic_array(type, item, len) \
454 __data_offsets->item = __data_size + \
456 __data_offsets->item |= __item_length << 16; \
460 #define __string(item, src) __dynamic_array(char, item, \
483 #define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, \
617 #define __field(type, item)
620 #define __field_struct(type, item)
623 #define __array(type, item, len)
626 #define __dynamic_array(type, item, len) \
627 __entry->__data_loc_##item = __data_offsets.item;
630 #define __string(item, src) __dynamic_array(char, item, -1)
637 #define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
/linux-4.4.14/samples/configfs/
H A Dconfigfs_sample.c55 static inline struct childless *to_childless(struct config_item *item) to_childless() argument
57 return item ? container_of(to_configfs_subsystem(to_config_group(item)), to_childless()
61 static ssize_t childless_showme_show(struct config_item *item, char *page) childless_showme_show() argument
63 struct childless *childless = to_childless(item); childless_showme_show()
72 static ssize_t childless_storeme_show(struct config_item *item, char *page) childless_storeme_show() argument
74 return sprintf(page, "%d\n", to_childless(item)->storeme); childless_storeme_show()
77 static ssize_t childless_storeme_store(struct config_item *item, childless_storeme_store() argument
80 struct childless *childless = to_childless(item); childless_storeme_store()
96 static ssize_t childless_description_show(struct config_item *item, char *page) childless_description_show() argument
147 struct config_item item; member in struct:simple_child
151 static inline struct simple_child *to_simple_child(struct config_item *item) to_simple_child() argument
153 return item ? container_of(item, struct simple_child, item) : NULL; to_simple_child()
156 static ssize_t simple_child_storeme_show(struct config_item *item, char *page) simple_child_storeme_show() argument
158 return sprintf(page, "%d\n", to_simple_child(item)->storeme); simple_child_storeme_show()
161 static ssize_t simple_child_storeme_store(struct config_item *item, simple_child_storeme_store() argument
164 struct simple_child *simple_child = to_simple_child(item); simple_child_storeme_store()
187 static void simple_child_release(struct config_item *item) simple_child_release() argument
189 kfree(to_simple_child(item)); simple_child_release()
207 static inline struct simple_children *to_simple_children(struct config_item *item) to_simple_children() argument
209 return item ? container_of(to_config_group(item), to_simple_children()
222 config_item_init_type_name(&simple_child->item, name, simple_children_make_item()
227 return &simple_child->item; simple_children_make_item()
230 static ssize_t simple_children_description_show(struct config_item *item, simple_children_description_show() argument
247 static void simple_children_release(struct config_item *item) simple_children_release() argument
249 kfree(to_simple_children(item)); simple_children_release()
309 static ssize_t group_children_description_show(struct config_item *item, group_children_description_show() argument
/linux-4.4.14/fs/reiserfs/
H A Dlbalance.c12 * copy copy_count entries from source directory item to dest buffer
13 * (creating new item if needed)
21 * either the number of target item, or if we must create a leaf_copy_dir_entries()
22 * new item, the number of the item we will create it next to leaf_copy_dir_entries()
28 int copy_records_len; /* length of all records in item to be copied */ leaf_copy_dir_entries()
33 RFALSE(!is_direntry_le_ih(ih), "vs-10000: item must be directory item"); leaf_copy_dir_entries()
59 * if there are no items in dest or the first/last item in leaf_copy_dir_entries()
60 * dest is not item of the same directory leaf_copy_dir_entries()
69 /* create new item in dest */ leaf_copy_dir_entries()
72 /* form item header */ leaf_copy_dir_entries()
75 /* calculate item len */ leaf_copy_dir_entries()
88 * item in this function leaf_copy_dir_entries()
92 * this item is not yet valid, but we leaf_copy_dir_entries()
101 /* insert item into dest buffer */ leaf_copy_dir_entries()
129 * (last_first == LAST_TO_FIRST) item or part of it or nothing
147 * if ( DEST is empty or first item of SOURCE and last item of leaf_copy_boundary_item()
149 * then there is no need to treat this item differently from the leaf_copy_boundary_item()
162 "vs-10010: item can not have empty length"); leaf_copy_boundary_item()
174 * copy part of the body of the first item of SOURCE leaf_copy_boundary_item()
175 * to the end of the body of the last item of the DEST leaf_copy_boundary_item()
177 * == -1 copy whole body; don't create new item header leaf_copy_boundary_item()
196 * merge first item (or its part) of src buffer with the last leaf_copy_boundary_item()
197 * item of dest buffer. Both are of the same file leaf_copy_boundary_item()
205 "vs-10030: merge to left: last unformatted node of non-last indirect item %h must have zerto free space", leaf_copy_boundary_item()
214 /* copy boundary item to right (last_first == LAST_TO_FIRST) */ leaf_copy_boundary_item()
217 * (DEST is empty or last item of SOURCE and first item of DEST leaf_copy_boundary_item()
230 * item body of SOURCE leaf_copy_boundary_item()
243 * copy part of the body of the last item of SOURCE to the leaf_copy_boundary_item()
244 * begin of the body of the first item of the DEST; part defined leaf_copy_boundary_item()
246 * change first item key of the DEST; don't create new item header leaf_copy_boundary_item()
250 "vs-10040: merge to right: last unformatted node of non-last indirect item must be filled entirely (%h)", leaf_copy_boundary_item()
254 /* bytes_or_entries = length of last item body of SOURCE */ leaf_copy_boundary_item()
261 /* change first item key of the DEST */ leaf_copy_boundary_item()
264 /* item becomes non-mergeable */ leaf_copy_boundary_item()
265 /* or mergeable if left item was */ leaf_copy_boundary_item()
268 /* merge to right only part of item */ leaf_copy_boundary_item()
274 /* change first item key of the DEST */ leaf_copy_boundary_item()
306 * from first-th item in src to tail of dest
308 * from first-th item in src to head of dest
342 * we will insert items before 0-th or nr-th item in dest buffer. leaf_copy_items_entirely()
347 /* location of head of first new item */ leaf_copy_items_entirely()
357 /* copy item headers */ leaf_copy_items_entirely()
363 /* location of unmovable item */ leaf_copy_items_entirely()
388 /* sizes, item number */ leaf_copy_items_entirely()
411 * This function splits the (liquid) item into two items (useful when
412 * shifting part of an item into another node.)
422 "vs-10170: bytes == - 1 means: do not split item"); leaf_item_bottle()
426 * if ( if item in position item_num in buffer SOURCE leaf_item_bottle()
427 * is directory item ) leaf_item_bottle()
437 * copy part of the body of the item number 'item_num' leaf_item_bottle()
439 * 'cpy_bytes'; create new item header; change old leaf_item_bottle()
447 "vs-10180: when whole indirect item is bottle to left neighbor, it must have free_space==0 (not %lu)", leaf_item_bottle()
453 "vs-10190: bad mergeability of item %h", ih); leaf_item_bottle()
460 * if ( if item in position item_num in buffer leaf_item_bottle()
461 * SOURCE is directory item ) leaf_item_bottle()
473 * copy part of the body of the item number 'item_num' leaf_item_bottle()
475 * 'cpy_bytes'; create new item header; leaf_item_bottle()
490 /* indirect item */ leaf_item_bottle()
492 "vs-10200: ih->ih_free_space must be 0 when indirect item will be appended"); leaf_item_bottle()
502 /* set item length */ leaf_item_bottle()
518 * items from SOURCE to DEST. From last item copy cpy_num bytes for regular
519 * item and cpy_num directory entries for directory item.
548 * copy the first item or it part or nothing to the end of leaf_copy_items()
572 * copy part of the item which number is leaf_copy_items()
587 * copy the last item or it part or nothing to the leaf_copy_items()
614 * copy part of the item which number is pos to leaf_copy_items()
712 * copy mov_num items and mov_bytes of the (mov_num-1)th item to
738 * Shift shift_num items (and shift_bytes of last shifted item if
781 "vs-10280: item must be mergeable"); leaf_shift_left()
821 * items in whole. Delete part of body of the first item. Part defined by
822 * del_bytes. Don't delete first item header
824 * items in whole. Delete part of body of the last item . Part defined by
825 * del_bytes. Don't delete last item header.
838 "10165: invalid number of first item to be deleted (%d) or " leaf_delete_items()
852 /* delete del_num items beginning from item in position first */ leaf_delete_items()
858 * item in position first leaf_delete_items()
863 * delete the part of the first item of the bh leaf_delete_items()
864 * do not delete item header leaf_delete_items()
873 * item in position first+1 leaf_delete_items()
880 /* the last item is directory */ leaf_delete_items()
883 * in this item leaf_delete_items()
887 /* len = body len of item */ leaf_delete_items()
891 * delete the part of the last item of the bh leaf_delete_items()
892 * do not delete item header leaf_delete_items()
900 /* insert item into the leaf node in position before */ leaf_insert_into_buf()
920 "vs-10170: not enough free space in block %z, new item %h", leaf_insert_into_buf()
923 "vs-10172: zero number == %d, item length == %d", leaf_insert_into_buf()
926 /* get item new item must be inserted before */ leaf_insert_into_buf()
929 /* prepare space for the body of new item */ leaf_insert_into_buf()
947 /* insert item header */ leaf_insert_into_buf()
957 /* sizes, free space, item number */ leaf_insert_into_buf()
975 * paste paste_size bytes to affected_item_num-th item.
976 * When item is a directory, this only prepare space for new entries
1010 /* item to be appended */ leaf_paste_in_buffer()
1034 /* paste data in the head of item */ leaf_paste_in_buffer()
1067 * cuts DEL_COUNT entries beginning from FROM-th entry. Directory item
1069 * necessary. Return value is size of removed part of directory item
1075 char *item; leaf_cut_entries() local
1083 * make sure that item is directory and there are enough entries to leaf_cut_entries()
1086 RFALSE(!is_direntry_le_ih(ih), "10180: item is not directory item"); leaf_cut_entries()
1088 "10185: item contains not enough entries: entry_count = %d, from = %d, to delete = %d", leaf_cut_entries()
1094 /* first byte of item */ leaf_cut_entries()
1095 item = bh->b_data + ih_location(ih); leaf_cut_entries()
1108 prev_record = item + prev_record_offset; leaf_cut_entries()
1131 prev_record, item + ih_item_len(ih) - prev_record); leaf_cut_entries()
1137 * when cut item is part of regular file
1141 * when cut item is part of directory
1158 /* item head of truncated item */ leaf_cut_from_buffer()
1167 "when 0-th enrty of item is cut, that item must be first in the node, not %d-th", leaf_cut_from_buffer()
1169 /* change item key by key of first entry in the item */ leaf_cut_from_buffer()
1173 /* item is direct or indirect */ leaf_cut_from_buffer()
1174 RFALSE(is_statdata_le_ih(ih), "10195: item is stat data"); leaf_cut_from_buffer()
1180 /* shift item body to left if cut is from the head of item */ leaf_cut_from_buffer()
1186 /* change key of item */ leaf_cut_from_buffer()
1203 /* location of the last item */ leaf_cut_from_buffer()
1206 /* location of the item, which is remaining at the same place */ leaf_cut_from_buffer()
1213 /* change item length */ leaf_cut_from_buffer()
1239 /* delete del_num items from buffer starting from the first'th item */ leaf_delete_items_entirely()
1273 /* location of unmovable item */ leaf_delete_items_entirely()
1283 /* delete item headers */ leaf_delete_items_entirely()
1286 /* change item location */ leaf_delete_items_entirely()
1292 /* sizes, item number */ leaf_delete_items_entirely()
1312 * before to item_num-th item
1322 char *item; leaf_paste_entries() local
1334 * make sure, that item is directory, and there are enough leaf_paste_entries()
1337 RFALSE(!is_direntry_le_ih(ih), "10225: item is not directory item"); leaf_paste_entries()
1342 /* first byte of dest item */ leaf_paste_entries()
1343 item = bh->b_data + ih_location(ih); leaf_paste_entries()
1350 item + leaf_paste_entries()
1370 item + (ih_item_len(ih) - paste_size) - insert_point); leaf_paste_entries()
1392 item)); leaf_paste_entries()
1395 /* change item key if necessary (when we paste before 0-th entry */ leaf_paste_entries()
1413 "directory item (%h) " leaf_paste_entries()
1419 "directory item (%h) " leaf_paste_entries()
H A Ditem_ops.c9 * this contains item handlers for old item types: sd, direct,
15 * explanation of each item handler method? -Hans
44 static void sd_print_item(struct item_head *ih, char *item) sd_print_item() argument
48 struct stat_data_v1 *sd = (struct stat_data_v1 *)item; sd_print_item()
55 struct stat_data *sd = (struct stat_data *)item; sd_print_item()
63 static void sd_check_item(struct item_head *ih, char *item) sd_check_item() argument
121 /* direct item functions */ direct_bytes_number()
142 static void direct_print_item(struct item_head *ih, char *item) direct_print_item() argument
149 printk("%c", item[j++]); direct_print_item()
153 static void direct_check_item(struct item_head *ih, char *item) direct_check_item() argument
212 /* indirect item functions */ indirect_bytes_number()
226 /* if it is not first item of the body, then it is mergeable */ indirect_is_left_mergeable()
234 /* printing of indirect item */ start_new_sequence()
268 static void indirect_print_item(struct item_head *ih, char *item) indirect_print_item() argument
275 unp = (__le32 *) item; indirect_print_item()
278 reiserfs_warning(NULL, "reiserfs-16102", "invalid item len"); indirect_print_item()
291 static void indirect_check_item(struct item_head *ih, char *item) indirect_check_item() argument
324 /* unit of indirect item is byte (yet) */ indirect_part_size()
330 /* unit of indirect item is byte (yet) */ indirect_unit_num()
380 static void direntry_print_item(struct item_head *ih, char *item) direntry_print_item() argument
391 deh = (struct reiserfs_de_head *)item; direntry_print_item()
397 name = item + deh_location(deh); direntry_print_item()
420 static void direntry_check_item(struct item_head *ih, char *item) direntry_check_item() argument
426 deh = (struct reiserfs_de_head *)item; direntry_check_item()
435 * function returns old entry number in directory item in real node
436 * using new entry number in virtual item in virtual node
445 /* cut or paste is applied to another item */ old_entry_num()
463 * item. Return space used by an item. FIXME: no control over
464 * consuming of space used by this item handler
485 /* virtual directory item have this amount of entry after */ direntry_create_vi()
505 /* compare total size of entries with item length */ direntry_create_vi()
519 "directory item", direntry_create_vi()
643 /* Error catching functions to catch errors caused by incorrect item types. */ errcatch_bytes_number()
647 "Invalid item type observed, run fsck ASAP"); errcatch_bytes_number()
654 "Invalid item type observed, run fsck ASAP"); errcatch_decrement_key()
661 "Invalid item type observed, run fsck ASAP"); errcatch_is_left_mergeable()
665 static void errcatch_print_item(struct item_head *ih, char *item) errcatch_print_item() argument
668 "Invalid item type observed, run fsck ASAP"); errcatch_print_item()
671 static void errcatch_check_item(struct item_head *ih, char *item) errcatch_check_item() argument
674 "Invalid item type observed, run fsck ASAP"); errcatch_check_item()
682 "Invalid item type observed, run fsck ASAP"); errcatch_create_vi()
695 "Invalid item type observed, run fsck ASAP"); errcatch_check_left()
702 "Invalid item type observed, run fsck ASAP"); errcatch_check_right()
709 "Invalid item type observed, run fsck ASAP"); errcatch_part_size()
716 "Invalid item type observed, run fsck ASAP"); errcatch_unit_num()
723 "Invalid item type observed, run fsck ASAP"); errcatch_print_vi()
H A Dstree.c28 /* to get item head in le form */ copy_item_head()
139 * Search for an item in the array by the item key *
145 * For those not familiar with binary search: lbound is the leftmost item
146 * that it could be, rbound the rightmost item that it could be. We examine
147 * the item halfway between lbound and rbound, and that tells us either
154 const void *base, /* First item in the array. */ bin_search()
160 * specifically to the array of item headers in a bin_search()
161 * node, width is actually the item header size bin_search()
162 * not the item size. bin_search()
407 /* item number is too big or too small */ is_leaf()
426 /* check tables of item heads */ is_leaf()
432 "wrong item type for item %h", is_leaf()
439 "item location seems wrong: %h", is_leaf()
446 "item length seems wrong: %h", is_leaf()
452 "item location seems wrong " is_leaf()
570 * bin_search will find the position of the item which has key either
577 * search_by_key - search for key (and item) in stree
758 * item has been found, so we choose the pointer which search_by_key()
765 * if item was not found we choose the position which is to search_by_key()
766 * the left of the found item. This requires no code, search_by_key()
814 * Form the path to an item and position in this item which contains
815 * file byte defined by key. If there is no such item
816 * corresponding to the key, we point the path to the item with
818 * past the last entry/byte in the item. If searching for entry in a
819 * directory item, and it is not found, *pos_in_item is set to one
849 /* If item is found. */ search_for_position_by_key()
859 "PAP-5165: item length equals zero"); search_for_position_by_key()
868 /* Item is not found. Set path to the previous item. */ search_for_position_by_key()
882 /* Needed byte is contained in the item pointed to by the path. */ search_for_position_by_key()
893 * Needed byte is not contained in the item pointed to by the search_for_position_by_key()
894 * path. Set pos_in_item out of the item. search_for_position_by_key()
905 /* Compare given item and item pointed to by the path. */ comp_items()
919 /* we need only to know, whether it is the same item */ comp_items()
930 /* prepare for delete or cut of direct item */ prepare_for_direct_item()
939 /* item has to be deleted */ prepare_for_direct_item()
949 return M_DELETE; /* Delete this item. */ prepare_for_direct_item()
951 /* Calculate first position and size for cutting from item. */ prepare_for_direct_item()
955 return M_CUT; /* Cut from this item. */ prepare_for_direct_item()
962 return M_DELETE; /* Delete this item. */ prepare_for_direct_item()
965 /* Calculate first position and size for cutting from item. */ prepare_for_direct_item()
969 return M_CUT; /* Cut from this item. */ prepare_for_direct_item()
981 "PAP-5220: incorrect empty directory item (%h)", le_ih); prepare_for_direntry_item()
983 /* Delete the directory item containing "." and ".." entry. */ prepare_for_direntry_item()
989 * Delete the directory item such as there is one record only prepare_for_direntry_item()
990 * in this item prepare_for_direntry_item()
996 /* Cut one record from the directory item. */ prepare_for_direntry_item()
1006 * If the path points to a directory or direct item, calculate mode
1008 * If the path points to an indirect item, remove some number of its
1010 * In case of file truncate calculate whether this item must be
1011 * deleted/truncated or last unformatted node of this item will be
1012 * converted to a direct item.
1037 /* Stat_data item. */ prepare_for_delete_or_cut()
1047 /* Directory item. */ prepare_for_delete_or_cut()
1053 /* Direct item. */ prepare_for_delete_or_cut()
1058 /* Case of an indirect item. */ prepare_for_delete_or_cut()
1137 * direct item? prepare_for_delete_or_cut()
1189 void padd_item(char *item, int total_length, int length) padd_item() argument
1194 item[--i] = 0; padd_item()
1226 * Delete object item.
1228 * path - path to the deleted item
1229 * item_key - key to search for the deleted item
1296 /* reiserfs_delete_item returns item length when success */ reiserfs_delete_item()
1327 * the only thing we really care about is the direct item's reiserfs_delete_item()
1385 /* this deletes item which never gets split */ reiserfs_delete_solid_item()
1414 * space to insert '..' item into the reiserfs_delete_solid_item()
1446 * Should we count quota for item? (we don't reiserfs_delete_solid_item()
1483 /* for directory this deletes item containing "." and ".." */ reiserfs_delete_object()
1575 * item successesfully, but there were no disk space to cut unfm
1577 * direct item(s)
1597 "found invalid item"); indirect_to_direct_roll_back()
1608 "vs-5617: there was tail %d bytes, removed item length %d bytes", indirect_to_direct_roll_back()
1620 /* (Truncate or cut entry) or delete object item. Returns < 0 on failure */ reiserfs_cut_from_item()
1652 * Repeat this loop until we either cut the item without needing reiserfs_cut_from_item()
1658 * be cut, and size to be cut. In case of the indirect item reiserfs_cut_from_item()
1669 * convert last unformatted node to direct item or reiserfs_cut_from_item()
1695 * inserting the new direct item. Now we are reiserfs_cut_from_item()
1711 reiserfs_panic(sb, "PAP-5580", "item to " reiserfs_cut_from_item()
1735 reiserfs_warning(sb, "PAP-5610", "item %K not found", reiserfs_cut_from_item()
1746 * able to cut item reiserfs_cut_from_item()
1761 /* Calculate number of bytes that need to be cut from the item. */ reiserfs_cut_from_item()
1773 * item. reiserfs_cut_from_item()
1794 * of the item reiserfs_cut_from_item()
1798 "item must be indirect %h", le_ih); reiserfs_cut_from_item()
1803 "item %h being deleted must be of " reiserfs_cut_from_item()
1815 * item is direct item of this file reiserfs_cut_from_item()
1871 INITIALIZE_PATH(s_search_path); /* Path to the current object item. */ reiserfs_do_truncate()
1872 struct item_head *p_le_ih; /* Pointer to an item header. */ reiserfs_do_truncate()
1874 /* Key to search for a previous file item. */ reiserfs_do_truncate()
1932 * this may mismatch with real file size: if last direct item reiserfs_do_truncate()
1949 /* Update key to search for the last file item. */ reiserfs_do_truncate()
1953 /* Cut or delete file item. */ reiserfs_do_truncate()
1968 /* Change key to search the last file item. */ reiserfs_do_truncate()
1975 * file item is presented in the tree. reiserfs_do_truncate()
2040 reiserfs_panic(NULL, "PAP-5720", "found direct item " check_research_for_paste()
2053 "item (%h) or position (%d) does not " check_research_for_paste()
2061 * Paste bytes to the existing item.
2062 * Returns bytes number pasted into the item.
2065 /* Path to the pasted item. */ reiserfs_paste_into_item()
2067 /* Key to search for the needed item. */ reiserfs_paste_into_item()
2069 /* Inode item belongs to */ reiserfs_paste_into_item()
2161 * Insert new item into the buffer at the path.
2163 * path - path to the inserted item
2164 * ih - pointer to the item header to insert
2179 if (inode) { /* Do we count quotas for item? */ reiserfs_insert_item()
2198 * written but appropriate stat item isn't inserted yet... reiserfs_insert_item()
H A Dtail_conversion.c21 * path points to first direct item of the file regardless of how many of
33 /* Key to search for the last byte of the converted item. */ direct2indirect()
37 * new indirect item to be inserted or key direct2indirect()
78 /* Insert new indirect item. */ direct2indirect()
86 /* Paste into last indirect item of an object. */ direct2indirect()
112 * last item of the file direct2indirect()
117 "direct item (%K) not found", &end_key); direct2indirect()
120 "vs-14055: direct item expected(%K), found %h", direct2indirect()
195 * reads tail through page cache, insert direct item. When direct item
203 struct treepath *path, /* path to the indirect item. */ indirect2direct()
224 /* store item head path points to. */ indirect2direct()
247 /* re-search indirect item */ indirect2direct()
251 "item to be converted %K does not exist", indirect2direct()
264 /* Set direct item header to insert. */ indirect2direct()
281 /* Insert tail as new direct item in the tree */ indirect2direct()
286 * to the direct item. In this case we used to adjust indirect2direct()
307 * We have inserted new direct item and must remove last indirect2direct()
312 /* we store position of first direct item in the in-core inode */ indirect2direct()
H A Ddo_balan.c108 /* cut item in S[0] */ balance_leaf_when_delete_cut()
142 "length of item"); balance_leaf_when_delete_cut()
208 "PAP-12050: rnum(%d) and lnum(%d) and item " balance_leaf_when_delete_left()
257 /* Delete or truncate the item */ balance_leaf_when_delete()
299 /* part of new item falls into L[0] */ balance_leaf_insert_left()
305 /* Calculate item length to insert to S[0] */ balance_leaf_insert_left()
308 /* Calculate and check item length to insert to L[0] */ balance_leaf_insert_left()
315 /* Insert new item into L[0] */ balance_leaf_insert_left()
323 * Calculate key component, item length and body to balance_leaf_insert_left()
343 /* new item in whole falls into L[0] */ balance_leaf_insert_left()
347 /* Insert new item into L[0] */ balance_leaf_insert_left()
367 /* directory item */ balance_leaf_paste_left_shift_dirent()
375 * Shift lbytes - 1 entries from given directory item balance_leaf_paste_left_shift_dirent()
384 /* Append given directory entry to directory item */ balance_leaf_paste_left_shift_dirent()
396 * when we have merge directory item, pos_in_item balance_leaf_paste_left_shift_dirent()
407 /* new directory item doesn't fall into L[0] */ balance_leaf_paste_left_shift_dirent()
410 * directory entries from directory item number lnum[0] balance_leaf_paste_left_shift_dirent()
415 /* Calculate new position to append in item body */ balance_leaf_paste_left_shift_dirent()
441 /* appended item will be in L[0] in whole */ balance_leaf_paste_left_shift()
453 * to the last item of L[h] balance_leaf_paste_left_shift()
469 /* Append to body of item in L[0] */ balance_leaf_paste_left_shift()
476 * 0-th item in S0 can be only of DIRECT type balance_leaf_paste_left_shift()
482 "PAP-12106: item length must be 0"); balance_leaf_paste_left_shift()
491 /* update key of first item in S0 */ balance_leaf_paste_left_shift()
500 * Calculate new body, position in item and balance_leaf_paste_left_shift()
515 "PAP-12120: item must be merge-able with left " balance_leaf_paste_left_shift()
516 "neighboring item"); balance_leaf_paste_left_shift()
518 /* only part of the appended item will be in L[0] */ balance_leaf_paste_left_shift()
520 /* Calculate position in item for append in S[0] */ balance_leaf_paste_left_shift()
529 * Shift lbytes - 1 byte from item number lnum[0] balance_leaf_paste_left_shift()
537 /* appended item will be in L[0] in whole */ balance_leaf_paste_left_whole()
548 /* if we paste into first item of S[0] and it is left mergable */ balance_leaf_paste_left_whole()
553 * last item in L[0] balance_leaf_paste_left_whole()
564 * Shift lbytes - 1 byte from item number lnum[0] balance_leaf_paste_left_whole()
568 /* Append to body of item in L[0] */ balance_leaf_paste_left_whole()
573 /* if appended item is directory, paste entry */ balance_leaf_paste_left_whole()
582 * if appended item is indirect item, put unformatted node balance_leaf_paste_left_whole()
596 /* we must shift the part of the appended item */ balance_leaf_paste_left()
612 /* new item or it part falls to L[0], shift it too */ balance_leaf_left()
621 /* new item doesn't fall into L[0] */ balance_leaf_left()
637 /* new item or part of it doesn't fall into R[0] */ balance_leaf_insert_right()
643 /* new item or its part falls to R[0] */ balance_leaf_insert_right()
645 /* part of new item falls into R[0] */ balance_leaf_insert_right()
656 /* Remember key component and item length */ balance_leaf_insert_right()
661 * Calculate key component and item length to insert balance_leaf_insert_right()
671 /* Insert part of the item into R[0] */ balance_leaf_insert_right()
689 * Calculate key component and item length to balance_leaf_insert_right()
698 /* whole new item falls into R[0] */ balance_leaf_insert_right()
703 /* Insert new item into R[0] */ balance_leaf_insert_right()
739 * item number rnum[0] balance_leaf_paste_right_shift_dirent()
743 /* Paste given directory entry to directory item */ balance_leaf_paste_right_shift_dirent()
777 /* we append to directory item */ balance_leaf_paste_right_shift()
787 * from appended item balance_leaf_paste_right_shift()
857 /* append item in R[0] */ balance_leaf_paste_right_whole()
865 /* paste new entry, if item is directory item */ balance_leaf_paste_right_whole()
876 "PAP-12165: directory item must be first " balance_leaf_paste_right_whole()
877 "item of node when pasting is in 0th position"); balance_leaf_paste_right_whole()
896 /* new item doesn't fall into R[0] */ balance_leaf_paste_right()
902 /* pasted item or part of it falls to R[0] */ balance_leaf_paste_right()
905 /* we must shift the part of the appended item */ balance_leaf_paste_right()
908 /* pasted item in whole falls into R[0] */ balance_leaf_paste_right()
940 /* new item or it part don't falls into S_new[i] */ balance_leaf_new_nodes_insert()
947 /* new item or it's part falls to first new node S_new[i] */ balance_leaf_new_nodes_insert()
949 /* part of new item falls into S_new[i] */ balance_leaf_new_nodes_insert()
959 /* Remember key component and item length */ balance_leaf_new_nodes_insert()
965 * Calculate key component and item length to insert balance_leaf_new_nodes_insert()
977 /* Insert part of the item into S_new[i] before 0-th item */ balance_leaf_new_nodes_insert()
994 * Calculate key component and item length to balance_leaf_new_nodes_insert()
1001 /* whole new item falls into S_new[i] */ balance_leaf_new_nodes_insert()
1005 * (sbytes[i] of split item) balance_leaf_new_nodes_insert()
1010 /* Insert new item into S_new[i] */ balance_leaf_new_nodes_insert()
1019 /* we append to directory item */ balance_leaf_new_nodes_paste_dirent()
1045 * from directory item number snum[i] balance_leaf_new_nodes_paste_dirent()
1052 * directory item balance_leaf_new_nodes_paste_dirent()
1102 "PAP-12225: item too short or insert_size <= 0"); balance_leaf_new_nodes_paste_shift()
1105 * Calculate number of bytes which must be shifted from appended item balance_leaf_new_nodes_paste_shift()
1180 /* paste into item */ balance_leaf_new_nodes_paste_whole()
1194 /* if we paste to indirect item update ih_free_space */ balance_leaf_new_nodes_paste_whole()
1211 /* pasted item doesn't fall into S_new[i] */ balance_leaf_new_nodes_paste()
1218 /* pasted item or part if it falls to S_new[i] */ balance_leaf_new_nodes_paste()
1221 /* we must shift part of the appended item */ balance_leaf_new_nodes_paste()
1225 /* item falls wholly into S_new[i] */ balance_leaf_new_nodes_paste()
1362 * if the affected item was not wholly shifted then we
1364 * of the affected item which remains in S
1382 * @ih: item header of inserted item (little endian)
1383 * @body: body of inserted item or bytes to paste
1413 * for indirect item pos_in_item is measured in unformatted node balance_leaf()
1423 /* Calculate new item position */ balance_leaf()
1844 * @ih: item header of inserted item
1845 * @body: body of inserted item or bytes to paste
1848 * Cut means delete part of an item (includes removing an entry from a
1851 * Delete means delete whole item.
1853 * Insert means add a new item into the tree.
H A Ddir.c94 * search the directory item, containing entry with reiserfs_readdir_inode()
114 /* we must have found item, that is item of this directory, */ reiserfs_readdir_inode()
116 "vs-9000: found item %h does not match to dir we readdir %K", reiserfs_readdir_inode()
119 "vs-9005 item_num == %d, item amount == %d", reiserfs_readdir_inode()
124 * in the item reiserfs_readdir_inode()
131 * go through all entries in the directory item beginning reiserfs_readdir_inode()
239 * item we went through is last item of node. Using right reiserfs_readdir_inode()
246 * that key of the last entry in the item reiserfs_readdir_inode()
278 * compose directory item containing "." and ".." entries (entries are
314 /* compose directory item containing "." and ".." entries */ make_empty_dir_item()
H A Dfix_node.c12 * To make any changes in the tree we find a node that contains item
13 * to be changed/deleted or position in the node we insert a new item
15 * will shift to left/right neighbor, or to a new node, where new item
18 * node S. (For instance if we are going to delete an item, virtual
20 * item sizes and types, mergeability of first and last items, sizes
21 * of all entries in directory item. We use this array of items when
28 * Takes item number in virtual node, returns number of item
39 "vs-8005: for INSERT mode and item number of inserted item"); old_item_num()
75 /* first virtual item */ create_virtual_node()
80 /* first item in the node */ create_virtual_node()
83 /* define the mergeability for 0-th item (if it is not being deleted) */ create_virtual_node()
101 /* get item number in source node */ create_virtual_node()
111 * FIXME: there is no check that item operation did not create_virtual_node()
131 /* virtual inserted item is not defined yet */ create_virtual_node()
136 "vs-8040: item header of inserted item is not specified"); create_virtual_node()
148 * check whether it is a mergeable item create_virtual_node()
165 * we delete last item and it could be merged create_virtual_node()
166 * with right neighbor's first item create_virtual_node()
173 * node contains more than 1 item, or item create_virtual_node()
174 * is not directory item, or this item create_virtual_node()
179 "rdkey %k, affected item==%d " create_virtual_node()
237 /* first item may be merge with last item in left neighbor */ check_left()
246 /* the item can be shifted entirely */ check_left()
252 /* the item cannot be shifted entirely, try to split it */ check_left()
255 * of the item body check_left()
258 /* cannot shift even a part of the current item */ check_left()
267 /* count partially shifted item */ check_left()
323 /* last item may be merge with first item in right neighbor */ check_right()
332 /* the item can be shifted entirely */ check_right()
340 * byte of the item body check_right()
343 /* cannot shift even a part of the current item */ check_right()
350 * R[0] can hold the header of the item and at least check_right()
357 /* count partially shifted item */ check_right()
368 * to - number of item, which are shifted to right neighbor entirely
369 * from_bytes - number of bytes of boundary item (or directory entries)
371 * to_bytes - number of bytes of boundary item (or directory entries)
385 /* position of item we start filling node from */ get_num_ver()
388 /* position of item we finish filling node by */ get_num_ver()
392 * number of first bytes (entries for directory) of start_item-th item get_num_ver()
398 * number of last bytes (entries for directory) of end_item-th item get_num_ver()
404 * these are positions in virtual item of items, that are split get_num_ver()
443 /* start from 'from'-th item */ get_num_ver()
448 /* last included item is the 'end_item'-th one */ get_num_ver()
450 /* do not count last 'end_bytes' units of 'end_item'-th item */ get_num_ver()
454 * go through all item beginning from the start_item-th item get_num_ver()
455 * and ending by the end_item-th item. Do not count first get_num_ver()
456 * 'start_bytes' units of 'start_item'-th item and last get_num_ver()
457 * 'end_bytes' of 'end_item'-th item get_num_ver()
465 /* get size of current item */ get_num_ver()
470 * of from-th item get_num_ver()
475 /* do not take in calculation tail part of last item */ get_num_ver()
479 /* if item fits into current node entierly */ get_num_ver()
488 * virtual item length is longer, than max size of item in get_num_ver()
489 * a node. It is impossible for direct item get_num_ver()
494 "direct item length is %d. It can not be longer than %d", get_num_ver()
509 * calculate number of item units which fit into node being get_num_ver()
539 /* continue from the same item with start_bytes != -1 */ get_num_ver()
574 "not directory or indirect item"); get_num_ver()
616 * item that is not not shifted entirely
618 * item that is not not shifted entirely
683 /* check whether we can divide 1 remaining item between neighbors */ is_leaf_removable()
685 /* get size of remaining item (in item units) */ is_leaf_removable()
715 /* there was only one item and it will be deleted */ are_leaves_removable()
719 "vs-8125: item number must be 1: it is %d", are_leaves_removable()
730 * directory item. But the item being deleted can are_leaves_removable()
732 * is item of the same directory. (But first item are_leaves_removable()
734 * of deleted item can be merged, so we can save are_leaves_removable()
745 "vs-8130: first directory item can not be removed until directory is not empty"); are_leaves_removable()
759 /* when we do not split item, lnum and rnum are numbers of entire items */
1010 /* call item specific function for this key */ decrement_key()
1273 * neighbors even when we insert or paste item.
1298 /* new item fits into node S[h] without any shifting */ can_node_be_removed()
1318 * inum item number in S[h];
1365 * 2 - shift only whole item to left ip_check_balance()
1409 /* and new item fits into node S[h] without any shifting */ ip_check_balance()
1420 * item that cannot be shifted from S[0] entirely (returned value) ip_check_balance()
1428 * item that cannot be shifted from S[0] entirely (returned value) ip_check_balance()
1482 /* new item fits into node S[h] without any shifting */ ip_check_balance()
1497 * neighbor (including splitting item) ip_check_balance()
1546 * most liquid item to be shifted are shifted to the left ip_check_balance()
1571 * liquid item to be shifted are shifted to the right neighbor, ip_check_balance()
1718 * inum item number in S[h];
1895 /* For internal nodes try to borrow item from a neighbor */ dc_check_balance_internal()
1922 * inum item number in S[h];
1941 /* the maximal item size */ dc_check_balance_leaf()
1956 maxsize = MAX_CHILD_SIZE(S0); /* maximal possible size of an item */ dc_check_balance_leaf()
1983 * left/right neighbor from the left/right most liquid item that dc_check_balance_leaf()
2028 * inum item number in S[h];
2058 * inum item number in S[h];
2288 /* get memory for virtual item */ get_mem_for_virtual_node()
2540 * inum item number in S[h];
2542 * ins_ih item head of item being inserted
2543 * data inserted item or data to be pasted
2607 "item number %d (in S0 - %d) in case " fix_nodes()
2617 "item number(%d); mode = %c " fix_nodes()
H A Dreiserfs.h68 /* offset of first byte stored in direct item. */
863 * N = Number of the item in the node
1219 * file would fit into one DIRECT item.
1236 * there are 5 item types currently
1283 * Key of an item determines its location in the S+tree, and
1354 * item head contains the key of the item, its free space (for
1355 * indirect items) and specifies the location of the item itself
1368 * indirect item if this is an indirect item. This
1369 * equals 0xFFFF iff this is a direct item or stat data
1370 * item. Note that the key, not this field, is used to
1371 * determine the item type, and thus which field this
1377 * Iff this is a directory item, this field equals the
1378 * number of directory entries in the directory item.
1382 __le16 ih_item_len; /* total size of the item body */
1384 /* an offset to the item body within the block */
1393 /* size of item header */
1560 /* item header has version. */ is_direntry_le_ih()
1622 /* maximal length of item */
1730 * first byte of file which is stored in a direct item: except that if
1732 * direct item. The existence of this field really grates on me.
1860 * First directory item has k_offset component 1. We store "." and ".."
1861 * in one item, always, we never split "." and ".." into differing
1896 __le16 deh_location; /* offset of name in the whole item */
2079 * a leaf node bin_search will find the position of the item which has key
2196 /* get the item header from leaf node */ item_head()
2218 /* get item body from leaf node */ item_body()
2240 /* get item body */
2244 * length of the directory entry in directory item. This define
2247 * directory entry, it uses length of whole item in place of entry
2321 * contains item to be changed/deleted or place to insert a new
2322 * item. We call this node S. To do balancing we need to decide what
2324 * item will be etc. To make this analysis simpler we build virtual
2326 * node S. (For instance if we are going to delete an item, virtual
2328 * item sizes and types, mergeability of first and last items, sizes
2329 * of all entries in directory item. We use this array of items when
2335 int vi_index; /* index in the array of item operations */
2338 /* length of item that it will have after balancing */
2342 const char *vi_item; /* body of item (old or new) */
2344 void *vi_uarea; /* item specific area */
2365 /* item header of inserted item, 0 for other modes */
2369 /* array of items (including a new one, excluding item to be deleted) */
2438 * order to balance the current node; for leaves includes item that
2440 * of child pointers rather than items. It includes the new item
2451 * S[h] to its item number within the node CFL[h]
2482 * most liquid item that cannot be shifted from S[0] entirely
2489 * most liquid item that cannot be shifted from S[0] entirely
2496 * index into the array of item headers in
2497 * S[0] of the affected item
2553 /* When inserting an item. */
2557 * existent item.
2560 /* When deleting an item. */
2562 /* When truncating an item or removing an entry from a (directory) item. */
2607 * there are 4 types of items: stat data, directory item, indirect, direct.
2613 * | 1st directory item| DOT_OFFSET | DIRENTRY_ .. | no |
2615 * | item | | | |
2617 * | indirect item | offset + 1 |TYPE_INDIRECT | [1] |
2619 * | direct item | offset + 1 |TYPE_DIRECT | [2] |
2622 * [1] if this is not the first indirect item of the object
2623 * [2] if this is not the first direct item of the object
2631 void (*print_item) (struct item_head *, char *item);
2632 void (*check_item) (struct item_head *, char *item);
2648 #define op_print_item(ih,item) item_ops[le_ih_k_type (ih)]->print_item (ih, item)
2649 #define op_check_item(ih,item) item_ops[le_ih_k_type (ih)]->check_item (ih, item)
2659 /* number of blocks pointed to by the indirect item */
2664 * to pos within the item pointed to by ih
2669 * number of bytes contained by the direct item or the
2670 * unformatted nodes the indirect item points to
2673 /* following defines use reiserfs buffer header and item header */
3051 void padd_item(char *item, int total_length, int length);
3058 #define GET_BLOCK_READ_DIRECT 4 /* read the tail if indirect item not found */
H A Dinode.c159 * FIXME: we might cache recently accessed indirect item
170 * an indirect item. This indirect item has X number of pointers, where
177 * I'd also like to see us cache the location the stat data item, since
186 * but tail is still sitting in a direct item, and we can't write to
211 * done already or non-hole position has been found in the indirect item
215 __le32 * item, int pos_in_item) allocation_needed()
220 get_block_num(item, pos_in_item)) allocation_needed()
278 * for 'block'-th logical block of file. When it hits direct item it
279 * returns 0 (being called from bmap) or read direct item into piece
329 * FIXME: here we could cache indirect item or part of it in _get_block_create_0()
358 /* requested data are in direct item(s) */ _get_block_create_0()
362 * when it is stored in direct item(s) _get_block_create_0()
371 * if we've got a direct item, and the buffer or page was uptodate, _get_block_create_0()
395 * sure we need to. But, this means the item might move if _get_block_create_0()
410 * correct, and when direct item padding results in a few _get_block_create_0()
411 * extra bytes at the end of the direct item _get_block_create_0()
431 * we done, if read direct item is not the last item of _get_block_create_0()
433 * to see whether direct item continues in the right _get_block_create_0()
469 * read direct item
478 /* do not read the direct item */ reiserfs_bmap()
567 * but the file tail is still in a direct item
667 __le32 *item; reiserfs_get_block() local
748 item = tp_item_body(&path); reiserfs_get_block()
755 (retval, allocated_block_nr, ih, item, pos_in_item)) { reiserfs_get_block()
800 * corresponding cell in some indirect item). But it may be reiserfs_get_block()
803 unfm_ptr = get_block_num(item, pos_in_item); reiserfs_get_block()
817 put_block_num(item, pos_in_item, allocated_block_nr); reiserfs_get_block()
831 * the item was found, so new blocks were not added to the file reiserfs_get_block()
844 * desired position is not found or is in the direct item. We have reiserfs_get_block()
854 /* indirect item has to be inserted */ reiserfs_get_block()
887 /* direct item has to be converted */ reiserfs_get_block()
895 * direct item we just found fits into block we have reiserfs_get_block()
907 * item(s) up to block size and convert it reiserfs_get_block()
1005 * append indirect item with holes if needed, when reiserfs_get_block()
1024 * indirect item has to be appended, reiserfs_get_block()
1065 /* paste hole to the indirect item */ reiserfs_get_block()
1140 item = tp_item_body(&path); reiserfs_get_block()
1171 * stat item
1233 * item version directly
1434 reiserfs_panic(inode->i_sb, "vs-13065", "key %k, found item %h", update_stat_data()
1491 * and loop back to the search if the stat data item has moved reiserfs_update_sd_size()
1499 /* Stat_data item has been moved after scheduling. */ reiserfs_update_sd_size()
1801 * stat data of new object is inserted already, this inserts the item
1822 * compose item head for new item. Directories consist of items of reiserfs_new_directory()
1844 /* look for place in the tree for new item */ reiserfs_new_directory()
1859 /* insert item, that is empty directory item */ reiserfs_new_directory()
1864 * stat data of object has been inserted, this inserts the item
1887 /* look for place in the tree for new item */ reiserfs_new_symlink()
1902 /* insert item, that is body of symlink */ reiserfs_new_symlink()
1908 * reiserfs_new_directory (to insert ".", ".." item if new object is
1956 /* item head of new item */ reiserfs_new_inode()
2084 /* insert item with "." and ".." */ reiserfs_new_inode()
2297 * then we have an unformatted node. Otherwise, we have a direct item, reiserfs_truncate_file()
2299 * because the truncate might pack the item anyway reiserfs_truncate_file()
2373 __le32 *item; map_block_for_writepage() local
2409 item = tp_item_body(&path); map_block_for_writepage()
2418 if (!get_block_num(item, pos_in_item)) { map_block_for_writepage()
2424 get_block_num(item, pos_in_item), inode); map_block_for_writepage()
2474 "bad item inode %lu", inode->i_ino); map_block_for_writepage()
2508 * we've copied data from the page into the direct item, so the map_block_for_writepage()
2592 * not mapped yet, or it points to a direct item, search reiserfs_write_full_page()
2635 * real block and not a direct item reiserfs_write_full_page()
2681 * if this page only had a direct item, it is very possible for reiserfs_write_full_page()
213 allocation_needed(int retval, b_blocknr_t allocated, struct item_head *ih, __le32 * item, int pos_in_item) allocation_needed() argument
H A Dioctl.c17 * 1) REISERFS_IOC_UNPACK - try to unpack tail from direct item into indirect
168 * Function try to convert tail from direct item into indirect.
H A Dfile.c19 * This implies an unnecessary copy of the tail and an unnecessary indirect item
27 * unformatted node, the tail is converted back into a direct item.
112 * item(s) had to be converted, then it may have to be reiserfs_file_release()
H A Dibalance.c169 /* copy item headers (keys) */ internal_insert_childs()
174 /* sizes, item number */ internal_insert_childs()
203 * the first_i'th item and first_p'th pointers respectively.
251 /* sizes, item number */ internal_delete_pointers_items()
324 "cpy_num (%d) + item number in dest (%d) can not be > MAX_NR_KEY(%d)", internal_copy_pointers_items()
350 /* prepare space for cpy_num - 1 item headers */ internal_copy_pointers_items()
359 /* sizes, item number */ internal_copy_pointers_items()
463 /* Change dirt, free space, item number fields. */ internal_insert_key()
642 /* delete child-node-pointer(s) together with their left item(s) */ balance_internal_when_delete()
743 "invalid tb->lnum[%d]==%d or tb->rnum[%d]==%d when S[h](item number == %d) is split between them", balance_internal_when_delete()
781 "R[h] can not be empty if it exists (item number=%d)", replace_rkey()
/linux-4.4.14/drivers/hwtracing/stm/
H A Dpolicy.c63 static inline struct stp_policy *to_stp_policy(struct config_item *item) to_stp_policy() argument
65 return item ? to_stp_policy()
66 container_of(to_config_group(item), struct stp_policy, group) : to_stp_policy()
71 to_stp_policy_node(struct config_item *item) to_stp_policy_node() argument
73 return item ? to_stp_policy_node()
74 container_of(to_config_group(item), struct stp_policy_node, to_stp_policy_node()
80 stp_policy_node_masters_show(struct config_item *item, char *page) stp_policy_node_masters_show() argument
82 struct stp_policy_node *policy_node = to_stp_policy_node(item); stp_policy_node_masters_show()
92 stp_policy_node_masters_store(struct config_item *item, const char *page, stp_policy_node_masters_store() argument
95 struct stp_policy_node *policy_node = to_stp_policy_node(item); stp_policy_node_masters_store()
128 stp_policy_node_channels_show(struct config_item *item, char *page) stp_policy_node_channels_show() argument
130 struct stp_policy_node *policy_node = to_stp_policy_node(item); stp_policy_node_channels_show()
140 stp_policy_node_channels_store(struct config_item *item, const char *page, stp_policy_node_channels_store() argument
143 struct stp_policy_node *policy_node = to_stp_policy_node(item); stp_policy_node_channels_store()
173 static void stp_policy_node_release(struct config_item *item) stp_policy_node_release() argument
175 kfree(to_stp_policy_node(item)); stp_policy_node_release()
230 stp_policy_node_drop(struct config_group *group, struct config_item *item) stp_policy_node_drop() argument
232 config_item_put(item); stp_policy_node_drop()
250 static ssize_t stp_policy_device_show(struct config_item *item, stp_policy_device_show() argument
253 struct stp_policy *policy = to_stp_policy(item); stp_policy_device_show()
287 static void stp_policy_release(struct config_item *item) stp_policy_release() argument
289 struct stp_policy *policy = to_stp_policy(item); stp_policy_release()
393 struct config_item *item; __stp_policy_node_lookup() local
400 item = list_entry(head->next, struct config_item, ci_entry); __stp_policy_node_lookup()
401 ret = to_stp_policy_node(item); __stp_policy_node_lookup()
412 list_for_each_entry(item, head, ci_entry) { list_for_each_entry()
413 policy_node = to_stp_policy_node(item); list_for_each_entry()
/linux-4.4.14/include/linux/usb/
H A Dgadget_configfs.h10 static ssize_t __struct##_##__name##_store(struct config_item *item, \
13 struct __struct *gs = to_##__struct(item); \
23 static ssize_t __struct##_##__name##_show(struct config_item *item, char *page) \
25 struct __struct *gs = to_##__struct(item); \
86 struct config_item *item) \
88 config_item_put(item); \
/linux-4.4.14/scripts/kconfig/
H A Dqconf.cc276 item = i; show()
277 if (sym_get_string_value(item->menu->sym)) show()
278 setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); show()
292 sym_set_string_value(item->menu->sym, text().toLatin1()); keyPressEvent()
293 parent()->updateList(item); keyPressEvent()
388 ConfigItem* item = (ConfigItem*)menu->data; findConfigItem() local
390 for (; item; item = item->nextItem) { findConfigItem()
391 if (this == item->listView()) findConfigItem()
395 return item; findConfigItem()
406 ConfigItem* item = (ConfigItem*)selectedItems().first(); updateSelection()
407 if (!item) updateSelection()
410 menu = item->menu; updateSelection()
419 void ConfigList::updateList(ConfigItem* item) updateList() argument
427 ConfigItem* item; updateList() local
430 item = (ConfigItem*)(*it); updateList()
431 if (!item->menu) updateList()
433 item->testUpdateMenu(menu_is_visible(item->menu)); updateList()
442 item = (ConfigItem *)topLevelItem(0); updateList()
443 if (!item) updateList()
444 item = new ConfigItem(this, 0, true); updateList()
445 last = item; updateList()
449 item = last ? last->nextSibling() : firstChild(); updateList()
450 if (!item) updateList()
451 item = new ConfigItem(this, last, rootEntry, true); updateList()
453 item->testUpdateMenu(true); updateList()
455 updateMenuList(item, rootEntry); updateList()
466 void ConfigList::setValue(ConfigItem* item, tristate val) setValue() argument
472 sym = item->menu ? item->menu->sym : 0; setValue()
484 if (oldval == no && item->menu->list) setValue()
485 item->setExpanded(true); setValue()
486 parent()->updateList(item); setValue()
491 void ConfigList::changeValue(ConfigItem* item) changeValue() argument
497 menu = item->menu; changeValue()
502 if (item->menu->list) changeValue()
503 item->setExpanded(!item->isExpanded()); changeValue()
513 if (item->menu->list) { changeValue()
515 item->setExpanded(!item->isExpanded()); changeValue()
517 item->setExpanded(true); changeValue()
520 parent()->updateList(item); changeValue()
525 parent()->lineEdit->show(item); changeValue()
550 ConfigItem* item; setParentMenu() local
560 item = (ConfigItem *)(*it); setParentMenu()
561 if (item->menu == oldroot) { setParentMenu()
562 setCurrentItem(item); setParentMenu()
563 scrollToItem(item); setParentMenu()
581 ConfigItem* item; updateMenuList() local
599 item = last ? last->nextSibling() : parent->firstChild(); updateMenuList()
619 if (!item || item->menu != child) updateMenuList()
620 item = new ConfigItem(parent, last, child, visible); updateMenuList()
622 item->testUpdateMenu(visible); updateMenuList()
625 updateMenuList(item, child); updateMenuList()
627 updateMenuList(item, 0); updateMenuList()
628 last = item; updateMenuList()
632 if (item && item->menu == child) { updateMenuList()
634 if (last == item) updateMenuList()
636 else while (last->nextSibling() != item) updateMenuList()
638 delete item; updateMenuList()
646 ConfigItem* item; updateMenuList() local
664 item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); updateMenuList()
684 if (!item || item->menu != child) updateMenuList()
685 item = new ConfigItem(parent, last, child, visible); updateMenuList()
687 item->testUpdateMenu(visible); updateMenuList()
690 updateMenuList(item, child); updateMenuList()
692 updateMenuList(item, 0); updateMenuList()
693 last = item; updateMenuList()
697 if (item && item->menu == child) { updateMenuList()
699 if (last == item) updateMenuList()
701 else while (last->nextSibling() != item) updateMenuList()
703 delete item; updateMenuList()
711 ConfigItem* item; keyPressEvent() local
725 item = (ConfigItem*)i; keyPressEvent()
730 if (item->goParent) { keyPressEvent()
734 menu = item->menu; keyPressEvent()
744 changeValue(item); keyPressEvent()
747 setValue(item, no); keyPressEvent()
750 setValue(item, mod); keyPressEvent()
753 setValue(item, yes); keyPressEvent()
772 ConfigItem* item = (ConfigItem*)itemAt(p); mouseReleaseEvent() local
778 if (!item) mouseReleaseEvent()
781 menu = item->menu; mouseReleaseEvent()
786 icon = item->pixmap(promptColIdx); mouseReleaseEvent()
790 if (item->goParent) { mouseReleaseEvent()
800 changeValue(item); mouseReleaseEvent()
805 setValue(item, no); mouseReleaseEvent()
808 setValue(item, mod); mouseReleaseEvent()
811 setValue(item, yes); mouseReleaseEvent()
814 changeValue(item); mouseReleaseEvent()
833 ConfigItem* item = (ConfigItem*)itemAt(p); mouseDoubleClickEvent() local
837 if (!item) mouseDoubleClickEvent()
839 if (item->goParent) { mouseDoubleClickEvent()
843 menu = item->menu; mouseDoubleClickEvent()
850 changeValue(item); mouseDoubleClickEvent()
863 ConfigItem* item = (ConfigItem *)currentItem(); focusInEvent() local
864 if (item) { focusInEvent()
865 item->setSelected(true); focusInEvent()
866 menu = item->menu; focusInEvent()
993 void ConfigView::updateList(ConfigItem* item) updateList() argument
998 v->list->updateList(item); updateList()
1569 ConfigItem* item; setMenuLink() local
1592 item = menuList->findConfigItem(parent); setMenuLink()
1593 if (item) { setMenuLink()
1594 item->setSelected(true); setMenuLink()
1595 menuList->scrollToItem(item); setMenuLink()
1608 item = list->findConfigItem(menu); setMenuLink()
1609 if (item) { setMenuLink()
1610 item->setSelected(true); setMenuLink()
1611 list->scrollToItem(item); setMenuLink()
1625 ConfigItem* item, *oldSelection; goBack() local
1634 item = (ConfigItem*)menuList->selectedItems().first(); goBack()
1635 oldSelection = item; goBack()
1636 while (item) { goBack()
1637 if (item->menu == configList->rootEntry) { goBack()
1639 item->setSelected(true); goBack()
1642 item = (ConfigItem*)item->parent(); goBack()
H A Dqconf.h66 void updateList(ConfigItem *item);
67 void setValue(ConfigItem* item, tristate val);
68 void changeValue(ConfigItem* item);
205 ConfigItem *item; member in class:ConfigLineEdit
214 static void updateList(ConfigItem* item);
/linux-4.4.14/fs/btrfs/
H A Droot-tree.c27 * Read a root item from the tree. In case we detect a root item smaller then
31 * kernel that was not aware of the root item structure change.
34 struct btrfs_root_item *item) btrfs_read_root_item()
41 read_extent_buffer(eb, item, btrfs_item_ptr_offset(eb, slot), btrfs_read_root_item()
42 min_t(int, len, (int)sizeof(*item))); btrfs_read_root_item()
43 if (len < sizeof(*item)) btrfs_read_root_item()
45 if (!need_reset && btrfs_root_generation(item) btrfs_read_root_item()
46 != btrfs_root_generation_v2(item)) { btrfs_read_root_item()
47 if (btrfs_root_generation_v2(item) != 0) { btrfs_read_root_item()
51 "found in root item. This root " btrfs_read_root_item()
59 memset(&item->generation_v2, 0, btrfs_read_root_item()
60 sizeof(*item) - offsetof(struct btrfs_root_item, btrfs_read_root_item()
64 memcpy(item->uuid, uuid.b, BTRFS_UUID_SIZE); btrfs_read_root_item()
73 * root_item: the root item of the tree we look for
125 void btrfs_set_root_node(struct btrfs_root_item *item, btrfs_set_root_node() argument
128 btrfs_set_root_bytenr(item, node->start); btrfs_set_root_node()
129 btrfs_set_root_level(item, btrfs_header_level(node)); btrfs_set_root_node()
130 btrfs_set_root_generation(item, btrfs_header_generation(node)); btrfs_set_root_node()
134 * copy the data in 'item' into the btree
138 *item) btrfs_update_root()
170 * If this is the first time we update the root item which originated btrfs_update_root()
171 * from an older kernel, we need to enlarge the item size to make room btrfs_update_root()
174 if (old_len < sizeof(*item)) { btrfs_update_root()
190 key, sizeof(*item)); btrfs_update_root()
204 btrfs_set_root_generation_v2(item, btrfs_root_generation(item)); btrfs_update_root()
206 write_extent_buffer(l, item, ptr, sizeof(*item)); btrfs_update_root()
214 struct btrfs_key *key, struct btrfs_root_item *item) btrfs_insert_root()
219 btrfs_set_root_generation_v2(item, btrfs_root_generation(item)); btrfs_insert_root()
220 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); btrfs_insert_root()
289 "orphan item"); btrfs_find_orphan_roots()
298 "item"); btrfs_find_orphan_roots()
335 /* drop the root item for 'key' from 'root' */ btrfs_del_root()
414 * add a btrfs_root_ref item. type is either BTRFS_ROOT_REF_KEY
498 struct btrfs_root_item *item = &root->root_item; btrfs_update_root_times() local
502 btrfs_set_root_ctransid(item, trans->transid); btrfs_update_root_times()
503 btrfs_set_stack_timespec_sec(&item->ctime, ct.tv_sec); btrfs_update_root_times()
504 btrfs_set_stack_timespec_nsec(&item->ctime, ct.tv_nsec); btrfs_update_root_times()
33 btrfs_read_root_item(struct extent_buffer *eb, int slot, struct btrfs_root_item *item) btrfs_read_root_item() argument
136 btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_root_item *item) btrfs_update_root() argument
213 btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_root_item *item) btrfs_insert_root() argument
H A Ddelayed-inode.c317 struct btrfs_delayed_item *item; btrfs_alloc_delayed_item() local
318 item = kmalloc(sizeof(*item) + data_len, GFP_NOFS); btrfs_alloc_delayed_item()
319 if (item) { btrfs_alloc_delayed_item()
320 item->data_len = data_len; btrfs_alloc_delayed_item()
321 item->ins_or_del = 0; btrfs_alloc_delayed_item()
322 item->bytes_reserved = 0; btrfs_alloc_delayed_item()
323 item->delayed_node = NULL; btrfs_alloc_delayed_item()
324 atomic_set(&item->refs, 1); btrfs_alloc_delayed_item()
326 return item; btrfs_alloc_delayed_item()
330 * __btrfs_lookup_delayed_item - look up the delayed item by key
333 * @prev: used to store the prev item if the right item isn't found
334 * @next: used to store the next item if the right item isn't found
336 * Note: if we don't find the right item, we will return the prev item and
337 * the next item.
394 struct btrfs_delayed_item *item; __btrfs_lookup_delayed_insertion_item() local
396 item = __btrfs_lookup_delayed_item(&delayed_node->ins_root, key, __btrfs_lookup_delayed_insertion_item()
398 return item; __btrfs_lookup_delayed_insertion_item()
408 struct btrfs_delayed_item *item; __btrfs_add_delayed_item() local
422 item = rb_entry(parent_node, struct btrfs_delayed_item, __btrfs_add_delayed_item()
425 cmp = btrfs_comp_cpu_keys(&item->key, &ins->key); __btrfs_add_delayed_item()
450 struct btrfs_delayed_item *item) __btrfs_add_delayed_insertion_item()
452 return __btrfs_add_delayed_item(node, item, __btrfs_add_delayed_insertion_item()
457 struct btrfs_delayed_item *item) __btrfs_add_delayed_deletion_item()
459 return __btrfs_add_delayed_item(node, item, __btrfs_add_delayed_deletion_item()
498 static void btrfs_release_delayed_item(struct btrfs_delayed_item *item) btrfs_release_delayed_item() argument
500 if (item) { btrfs_release_delayed_item()
501 __btrfs_remove_delayed_item(item); btrfs_release_delayed_item()
502 if (atomic_dec_and_test(&item->refs)) btrfs_release_delayed_item()
503 kfree(item); btrfs_release_delayed_item()
511 struct btrfs_delayed_item *item = NULL; __btrfs_first_delayed_insertion_item() local
515 item = rb_entry(p, struct btrfs_delayed_item, rb_node); __btrfs_first_delayed_insertion_item()
517 return item; __btrfs_first_delayed_insertion_item()
524 struct btrfs_delayed_item *item = NULL; __btrfs_first_delayed_deletion_item() local
528 item = rb_entry(p, struct btrfs_delayed_item, rb_node); __btrfs_first_delayed_deletion_item()
530 return item; __btrfs_first_delayed_deletion_item()
534 struct btrfs_delayed_item *item) __btrfs_next_delayed_item()
539 p = rb_next(&item->rb_node); __btrfs_next_delayed_item()
548 struct btrfs_delayed_item *item) btrfs_delayed_item_reserve_metadata()
565 item->key.objectid, btrfs_delayed_item_reserve_metadata()
567 item->bytes_reserved = num_bytes; btrfs_delayed_item_reserve_metadata()
574 struct btrfs_delayed_item *item) btrfs_delayed_item_release_metadata()
578 if (!item->bytes_reserved) btrfs_delayed_item_release_metadata()
583 item->key.objectid, item->bytes_reserved, btrfs_delayed_item_release_metadata()
586 item->bytes_reserved); btrfs_delayed_item_release_metadata()
725 struct btrfs_delayed_item *item) btrfs_batch_insert_items()
746 next = item; btrfs_batch_insert_items()
830 * This helper can just do simple insertion that needn't extend item for new
860 * we insert an item first, then if there are some continuous items, we try
905 struct btrfs_delayed_item *item) btrfs_batch_delete_items()
923 next = item; btrfs_batch_delete_items()
984 * can't find the item which the node points to, so this node btrfs_delete_delayed_items()
1090 * in the same item doesn't exist. __btrfs_update_delayed_inode()
1503 btrfs_err(root->fs_info, "err add delayed dir index item(name: %.*s) " btrfs_insert_delayed_dir_index()
1521 struct btrfs_delayed_item *item; btrfs_delete_delayed_insertion_item() local
1524 item = __btrfs_lookup_delayed_insertion_item(node, key); btrfs_delete_delayed_insertion_item()
1525 if (!item) { btrfs_delete_delayed_insertion_item()
1530 btrfs_delayed_item_release_metadata(root, item); btrfs_delete_delayed_insertion_item()
1531 btrfs_release_delayed_item(item); btrfs_delete_delayed_insertion_item()
1541 struct btrfs_delayed_item *item; btrfs_delete_delayed_dir_index() local
1557 item = btrfs_alloc_delayed_item(0); btrfs_delete_delayed_dir_index()
1558 if (!item) { btrfs_delete_delayed_dir_index()
1563 item->key = item_key; btrfs_delete_delayed_dir_index()
1565 ret = btrfs_delayed_item_reserve_metadata(trans, root, item); btrfs_delete_delayed_dir_index()
1573 ret = __btrfs_add_delayed_deletion_item(node, item); btrfs_delete_delayed_dir_index()
1575 btrfs_err(root->fs_info, "err add delayed dir index item(index: %llu) " btrfs_delete_delayed_dir_index()
1614 struct btrfs_delayed_item *item; btrfs_get_delayed_items() local
1621 item = __btrfs_first_delayed_insertion_item(delayed_node); btrfs_get_delayed_items()
1622 while (item) { btrfs_get_delayed_items()
1623 atomic_inc(&item->refs); btrfs_get_delayed_items()
1624 list_add_tail(&item->readdir_list, ins_list); btrfs_get_delayed_items()
1625 item = __btrfs_next_delayed_item(item); btrfs_get_delayed_items()
1628 item = __btrfs_first_delayed_deletion_item(delayed_node); btrfs_get_delayed_items()
1629 while (item) { btrfs_get_delayed_items()
1630 atomic_inc(&item->refs); btrfs_get_delayed_items()
1631 list_add_tail(&item->readdir_list, del_list); btrfs_get_delayed_items()
1632 item = __btrfs_next_delayed_item(item); btrfs_get_delayed_items()
1711 * Changing the data of the delayed item is impossible. So btrfs_readdir_delayed_dir_index()
1890 * And in most case, the inode ref and the inode item are in the btrfs_delayed_delete_inode_ref()
1892 * Since we are sure we will reserve the space for the inode item, btrfs_delayed_delete_inode_ref()
1894 * - If the inode ref and the inode item are not in the same leaf, btrfs_delayed_delete_inode_ref()
449 __btrfs_add_delayed_insertion_item(struct btrfs_delayed_node *node, struct btrfs_delayed_item *item) __btrfs_add_delayed_insertion_item() argument
456 __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node, struct btrfs_delayed_item *item) __btrfs_add_delayed_deletion_item() argument
533 __btrfs_next_delayed_item( struct btrfs_delayed_item *item) __btrfs_next_delayed_item() argument
546 btrfs_delayed_item_reserve_metadata(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_delayed_item *item) btrfs_delayed_item_reserve_metadata() argument
573 btrfs_delayed_item_release_metadata(struct btrfs_root *root, struct btrfs_delayed_item *item) btrfs_delayed_item_release_metadata() argument
723 btrfs_batch_insert_items(struct btrfs_root *root, struct btrfs_path *path, struct btrfs_delayed_item *item) btrfs_batch_insert_items() argument
902 btrfs_batch_delete_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_delayed_item *item) btrfs_batch_delete_items() argument
H A Dfile-item.c48 struct btrfs_file_extent_item *item; btrfs_insert_file_extent() local
62 sizeof(*item)); btrfs_insert_file_extent()
67 item = btrfs_item_ptr(leaf, path->slots[0], btrfs_insert_file_extent()
69 btrfs_set_file_extent_disk_bytenr(leaf, item, disk_offset); btrfs_insert_file_extent()
70 btrfs_set_file_extent_disk_num_bytes(leaf, item, disk_num_bytes); btrfs_insert_file_extent()
71 btrfs_set_file_extent_offset(leaf, item, offset); btrfs_insert_file_extent()
72 btrfs_set_file_extent_num_bytes(leaf, item, num_bytes); btrfs_insert_file_extent()
73 btrfs_set_file_extent_ram_bytes(leaf, item, ram_bytes); btrfs_insert_file_extent()
74 btrfs_set_file_extent_generation(leaf, item, trans->transid); btrfs_insert_file_extent()
75 btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG); btrfs_insert_file_extent()
76 btrfs_set_file_extent_compression(leaf, item, compression); btrfs_insert_file_extent()
77 btrfs_set_file_extent_encryption(leaf, item, encryption); btrfs_insert_file_extent()
78 btrfs_set_file_extent_other_encoding(leaf, item, other_encoding); btrfs_insert_file_extent()
95 struct btrfs_csum_item *item; btrfs_lookup_csum() local
129 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); btrfs_lookup_csum()
130 item = (struct btrfs_csum_item *)((unsigned char *)item + btrfs_lookup_csum()
132 return item; btrfs_lookup_csum()
167 struct btrfs_csum_item *item = NULL; __btrfs_lookup_bio_sums() local
231 if (!item || disk_bytenr < item_start_offset || __btrfs_lookup_bio_sums()
236 if (item) __btrfs_lookup_bio_sums()
238 item = btrfs_lookup_csum(NULL, root->fs_info->csum_root, __btrfs_lookup_bio_sums()
240 if (IS_ERR(item)) { __btrfs_lookup_bio_sums()
253 item = NULL; __btrfs_lookup_bio_sums()
266 item = btrfs_item_ptr(path->nodes[0], path->slots[0], __btrfs_lookup_bio_sums()
279 ((unsigned long)item) + diff, __btrfs_lookup_bio_sums()
314 struct btrfs_csum_item *item; btrfs_lookup_csums_range() local
383 item = btrfs_item_ptr(path->nodes[0], path->slots[0], btrfs_lookup_csums_range()
405 ((unsigned long)item) + offset, btrfs_lookup_csums_range()
537 * A simple truncate off the end of the item truncate_one_csum()
618 /* delete the entire item, it is inside our range */ btrfs_del_csums()
634 * we need to split this item and insert a new one. btrfs_del_csums()
639 * The trick here is the max size of a csum item leaves btrfs_del_csums()
641 * item header. So, we split the item in place, btrfs_del_csums()
644 * a nicely formed csum item that we can neatly btrfs_del_csums()
661 * item changed size or key btrfs_del_csums()
690 struct btrfs_csum_item *item; btrfs_csum_file_blocks() local
715 item = btrfs_lookup_csum(trans, root, path, bytenr, 1); btrfs_csum_file_blocks()
716 if (!IS_ERR(item)) { btrfs_csum_file_blocks()
725 ret = PTR_ERR(item); btrfs_csum_file_blocks()
741 /* we didn't find a csum item, insert one */ btrfs_csum_file_blocks()
763 * at this point, we know the tree has an item, but it isn't big btrfs_csum_file_blocks()
847 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); btrfs_csum_file_blocks()
848 item_end = (struct btrfs_csum_item *)((unsigned char *)item + btrfs_csum_file_blocks()
850 item = (struct btrfs_csum_item *)((unsigned char *)item + btrfs_csum_file_blocks()
856 ins_size = min_t(u32, (unsigned long)item_end - (unsigned long)item, btrfs_csum_file_blocks()
858 write_extent_buffer(leaf, sums->sums + index, (unsigned long)item, btrfs_csum_file_blocks()
949 "unknown file extent item type %d, inode %llu, offset %llu, root %llu", btrfs_extent_item_to_extent_map()
H A Ddir-item.c26 * collision. data_size indicates how big the item inserted should be. On
30 * The name is not copied into the dir item, you have to do that yourself.
43 struct btrfs_item *item; insert_with_overflow() local
57 item = btrfs_item_nr(path->slots[0]); insert_with_overflow()
59 BUG_ON(data_size > btrfs_item_size(leaf, item)); insert_with_overflow()
60 ptr += btrfs_item_size(leaf, item) - data_size; insert_with_overflow()
65 * xattrs work a lot like directories, this inserts an xattr item
113 * insert a directory item in the tree, doing all the magic for
115 * 'location' is the key to stuff into the directory item, 'type' is the
187 * lookup a directory item based on name. 'dir' is the objectid
189 * item (use mod < 0) or changing the options (use mod > 0)
248 /* we found an item, look for our name in the item */ btrfs_check_dir_item_collision()
257 * see if there is room in the item to insert this btrfs_check_dir_item_collision()
276 * lookup a directory item based on index. 'dir' is the objectid
278 * item (use mod < 0) or changing the options (use mod > 0)
378 * helper function to look at the directory item pointed to by 'path'
379 * this walks through all the entries in a dir item and finds one
417 * given a pointer into a directory item, delete it. This
458 btrfs_crit(root->fs_info, "invalid dir item type: %d", verify_dir_item()
467 btrfs_crit(root->fs_info, "invalid dir item name len: %u", verify_dir_item()
475 btrfs_crit(root->fs_info, "invalid dir item name + data len: %u + %u", verify_dir_item()
H A Duuid-tree.c33 /* return -ENOENT for !found, < 0 for errors, or 0 if an item was found */ btrfs_uuid_tree_lookup()
72 btrfs_warn(uuid_root->fs_info, "uuid item with illegal size %lu!", btrfs_uuid_tree_lookup()
125 /* Add an item for the type for the first time */ btrfs_uuid_tree_add()
131 * An item with that type already exists. btrfs_uuid_tree_add()
132 * Extend the item and store the new subid at the end. btrfs_uuid_tree_add()
140 btrfs_warn(uuid_root->fs_info, "insert uuid item failed %d " btrfs_uuid_tree_add()
187 btrfs_warn(uuid_root->fs_info, "error %d while searching for uuid item!", btrfs_uuid_tree_rem()
201 btrfs_warn(uuid_root->fs_info, "uuid item with illegal size %lu!", btrfs_uuid_tree_rem()
244 /* 1 - for the uuid item */ btrfs_uuid_iter_rem()
302 btrfs_warn(fs_info, "uuid item with illegal size %lu!", btrfs_uuid_tree_iterate()
H A Dctree.c779 * value that's in the log (the oldest log item). any element with a time
791 * value that's in the log (the most recent log item). any element with
1730 * this returns the address of the start of the last item,
1883 * item deletion. We balance from the top down, so we have to make sure
2023 * we're not allowed to leave a node with one item in the balance_level()
2659 * if key is found, we return zero and you can find the item in the leaf
3052 * instead the next or previous item should be returned.
3053 * When find_higher is true, the next higher item is returned, the next lower
3055 * When return_any and find_higher are both true, and no higher item is found,
3057 * When return_any is true and find_higher is false, and no lower item is found,
3059 * It returns 0 if any item is found, 1 if none is found (tree empty), and
3075 * item should be inserted. Normally this is the next bigger item, btrfs_search_slot_for_read()
3076 * but in case the previous item is the last in a leaf, path points btrfs_search_slot_for_read()
3078 * item. btrfs_search_slot_for_read()
3090 * no higher item found, return the next btrfs_search_slot_for_read()
3112 * no lower item found, return the next btrfs_search_slot_for_read()
3155 * update item key.
3326 * A new node is allocated, and a single item is inserted to
3544 * space used both by the item structs and the item data
3608 struct btrfs_item *item; __push_leaf_right() local
3627 item = btrfs_item_nr(i); __push_leaf_right()
3642 this_item_size = btrfs_item_size(left, item); __push_leaf_right()
3643 if (this_item_size + sizeof(*item) + push_space > free_space) __push_leaf_right()
3647 push_space += this_item_size + sizeof(*item); __push_leaf_right()
3686 /* update the item pointers */ __push_leaf_right()
3691 item = btrfs_item_nr(i); __push_leaf_right()
3692 push_space -= btrfs_token_item_size(right, item, &token); __push_leaf_right()
3693 btrfs_set_token_item_offset(right, item, push_space, &token); __push_leaf_right()
3792 * it, therefore use right neighbor to insert the new item and push_leaf_right()
3815 * item at 'max_slot' won't be touched. Use (u32)-1 to make us do all the
3830 struct btrfs_item *item; __push_leaf_left() local
3846 item = btrfs_item_nr(i); __push_leaf_left()
3861 this_item_size = btrfs_item_size(right, item); __push_leaf_left()
3862 if (this_item_size + sizeof(*item) + push_space > free_space) __push_leaf_left()
3866 push_space += this_item_size + sizeof(*item); __push_leaf_left()
3896 item = btrfs_item_nr(i); __push_leaf_left()
3898 ioff = btrfs_token_item_offset(left, item, &token); __push_leaf_left()
3899 btrfs_set_token_item_offset(left, item, __push_leaf_left()
3927 item = btrfs_item_nr(i); __push_leaf_left()
3930 item, &token); __push_leaf_left()
3931 btrfs_set_token_item_offset(right, item, push_space, &token); __push_leaf_left()
3968 * item at 'max_slot' won't be touched. Use (u32)-1 to make us push all the
4068 struct btrfs_item *item = btrfs_item_nr(i); copy_for_split() local
4071 ioff = btrfs_token_item_offset(right, item, &token); copy_for_split()
4072 btrfs_set_token_item_offset(right, item, copy_for_split()
4100 * double splits happen when we need to insert a big item in the middle
4371 /* if our item isn't there, return now */ setup_leaf_for_split()
4406 struct btrfs_item *item; split_item() local
4420 item = btrfs_item_nr(path->slots[0]); split_item()
4421 orig_offset = btrfs_item_offset(leaf, item); split_item()
4422 item_size = btrfs_item_size(leaf, item); split_item()
4448 btrfs_set_item_offset(leaf, item, split_item()
4450 btrfs_set_item_size(leaf, item, split_offset); split_item()
4454 /* write the data for the start of the original item */ split_item()
4459 /* write the data for the new item */ split_item()
4471 * This function splits a single item into two items,
4472 * giving 'new_key' to the new item and splitting the
4473 * old one at split_offset (from the start of the item).
4476 * the split, the path is pointing to the old item. The
4477 * new item is going to be in the same node as the old one.
4479 * Note, the item being split must be smaller enough to live alone on
4482 * This allows us to split the item in place, keeping a lock on the
4502 * This function duplicate a item, giving 'new_key' to the new item.
4503 * It guarantees both items live in the same tree leaf and the new item
4504 * is contiguous with the original item.
4538 * make the item pointed to by the path smaller. new_size indicates
4540 * off the end of the item or if we shift the item to chop bytes off
4548 struct btrfs_item *item; btrfs_truncate_item() local
4582 item = btrfs_item_nr(i); btrfs_truncate_item()
4584 ioff = btrfs_token_item_offset(leaf, item, &token); btrfs_truncate_item()
4585 btrfs_set_token_item_offset(leaf, item, btrfs_truncate_item()
4629 item = btrfs_item_nr(slot); btrfs_truncate_item()
4630 btrfs_set_item_size(leaf, item, new_size); btrfs_truncate_item()
4640 * make the item pointed to by the path bigger, data_size is the added size.
4647 struct btrfs_item *item; btrfs_extend_item() local
4683 item = btrfs_item_nr(i); btrfs_extend_item()
4685 ioff = btrfs_token_item_offset(leaf, item, &token); btrfs_extend_item()
4686 btrfs_set_token_item_offset(leaf, item, btrfs_extend_item()
4697 item = btrfs_item_nr(slot); btrfs_extend_item()
4698 btrfs_set_item_size(leaf, item, old_size + data_size); btrfs_extend_item()
4716 struct btrfs_item *item; setup_items_for_insert() local
4762 item = btrfs_item_nr( i); setup_items_for_insert()
4763 ioff = btrfs_token_item_offset(leaf, item, &token); setup_items_for_insert()
4764 btrfs_set_token_item_offset(leaf, item, setup_items_for_insert()
4779 /* setup the item for the new data */ setup_items_for_insert()
4783 item = btrfs_item_nr(slot + i); setup_items_for_insert()
4784 btrfs_set_token_item_offset(leaf, item, setup_items_for_insert()
4787 btrfs_set_token_item_size(leaf, item, data_size[i], &token); setup_items_for_insert()
4834 * Given a key and some data, insert an item into the tree.
4935 * delete the item at the leaf level in path. If that empties
4942 struct btrfs_item *item; btrfs_del_items() local
4972 item = btrfs_item_nr(i); btrfs_del_items()
4973 ioff = btrfs_token_item_offset(leaf, item, &token); btrfs_del_items()
4974 btrfs_set_token_item_offset(leaf, item, btrfs_del_items()
5085 * We might have had an item with the previous key in the tree right btrfs_prev_leaf()
5087 * item might have been pushed to the first slot (0) of the leaf we btrfs_prev_leaf()
5088 * were holding due to a tree balance. Alternatively, an item with the btrfs_prev_leaf()
5089 * previous key can exist as the only element of a leaf (big fat item). btrfs_prev_leaf()
5091 * btrfs_previous_item) don't miss an existing item with a key matching btrfs_prev_leaf()
5319 * every changed/new/deleted item it finds.
5381 * If left < right treat left item as new, advance left tree btrfs_compare_trees()
5383 * If left > right treat right item as deleted, advance right tree btrfs_compare_trees()
5710 * - after releasing the path above, someone has removed the item that btrfs_next_old_leaf()
5719 * where it should be inserted, so the path->slots[0] item must be the btrfs_next_old_leaf()
5834 * searching until it gets past min_objectid or finds an item of 'type'
5876 * search in extent tree to find a previous Metadata/Data extent item with
H A Dprint-tree.c40 printk(KERN_INFO "\t\tdev item devid %llu " print_dev_item()
157 pr_warn("BTRFS: uuid item with illegal size %lu!\n", print_uuid_item()
176 struct btrfs_item *item; btrfs_print_leaf() local
196 item = btrfs_item_nr(i); btrfs_print_leaf()
202 btrfs_item_offset(l, item), btrfs_item_size(l, item)); btrfs_print_leaf()
H A Dinode-item.c71 * Search all extended backrefs in this item. We're only btrfs_find_name_in_ext_backref()
154 * Sanity check - did we find the right item for this name? btrfs_del_inode_extref()
172 * Common case only one ref in the item, remove the btrfs_del_inode_extref()
173 * whole item. btrfs_del_inode_extref()
282 struct btrfs_item *item; btrfs_insert_inode_extref() local
307 item = btrfs_item_nr(path->slots[0]); btrfs_insert_inode_extref()
309 ptr += btrfs_item_size(leaf, item) - ins_len; btrfs_insert_inode_extref()
H A Dtree-log.c328 * If the key is already in the destination tree the existing item is
329 * overwritten. If the existing item isn't big enough, it is extended.
332 * If the key isn't in the destination yet, a new item is inserted.
406 struct btrfs_inode_item *item; overwrite_item() local
410 item = btrfs_item_ptr(path->nodes[0], path->slots[0], overwrite_item()
412 nbytes = btrfs_inode_nbytes(path->nodes[0], item); overwrite_item()
413 item = btrfs_item_ptr(eb, slot, overwrite_item()
415 btrfs_set_inode_nbytes(eb, item, nbytes); overwrite_item()
422 mode = btrfs_inode_mode(eb, item); overwrite_item()
424 btrfs_set_inode_size(eb, item, 0); overwrite_item()
427 struct btrfs_inode_item *item; overwrite_item() local
434 item = btrfs_item_ptr(eb, slot, struct btrfs_inode_item); overwrite_item()
435 btrfs_set_inode_nbytes(eb, item, 0); overwrite_item()
442 mode = btrfs_inode_mode(eb, item); overwrite_item()
444 btrfs_set_inode_size(eb, item, 0); overwrite_item()
454 /* make sure any existing item is the correct size */ overwrite_item()
587 struct btrfs_file_extent_item *item; replay_one_extent() local
592 item = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item); replay_one_extent()
593 found_type = btrfs_file_extent_type(eb, item); replay_one_extent()
597 nbytes = btrfs_file_extent_num_bytes(eb, item); replay_one_extent()
604 if (btrfs_file_extent_disk_bytenr(eb, item) == 0) replay_one_extent()
607 size = btrfs_file_extent_inline_len(eb, slot, item); replay_one_extent()
608 nbytes = btrfs_file_extent_ram_bytes(eb, item); replay_one_extent()
641 read_extent_buffer(eb, &cmp1, (unsigned long)item, replay_one_extent()
669 sizeof(*item)); replay_one_extent()
675 (unsigned long)item, sizeof(*item)); replay_one_extent()
677 ins.objectid = btrfs_file_extent_disk_bytenr(eb, item); replay_one_extent()
678 ins.offset = btrfs_file_extent_disk_num_bytes(eb, item); replay_one_extent()
680 offset = key->offset - btrfs_file_extent_offset(eb, item); replay_one_extent()
712 if (btrfs_file_extent_compression(eb, item)) { replay_one_extent()
717 btrfs_file_extent_offset(eb, item); replay_one_extent()
719 btrfs_file_extent_num_bytes(eb, item); replay_one_extent()
731 * extent item and partially referenced by another replay_one_extent()
732 * file extent item (like after using the clone or replay_one_extent()
750 * has a single csum item that covers the entire range replay_one_extent()
755 * After the first file extent item is replayed, the replay_one_extent()
756 * csum tree gets the following csum item: replay_one_extent()
762 * extent item, if we do not delete existing csum items replay_one_extent()
772 * end up looking at the second csum item only, which replay_one_extent()
819 * item
908 * inode backreferences may have multiple refs in a single item,
1191 * replay one inode back reference item found in the log tree.
1257 * item to another. add_inode_ref()
1651 * take a single entry in a log directory item and replay it into
1654 * if a conflicting item exists in the subdirectory already,
1731 /* the existing item matches the logged item */ replay_one_name()
1786 * find all the names in a directory item and reconcile them into
1788 * one name in a directory item, but the same code gets used for
1875 * directory is in a logged range item, but not actually in the log
1886 struct btrfs_dir_log_item *item; find_dir_range() local
1912 item = btrfs_item_ptr(path->nodes[0], path->slots[0], find_dir_range()
1914 found_end = btrfs_dir_log_end(path->nodes[0], item); find_dir_range()
1924 /* check the next slot in the tree to see if it is a valid item */ find_dir_range()
1940 item = btrfs_item_ptr(path->nodes[0], path->slots[0], find_dir_range()
1942 found_end = btrfs_dir_log_end(path->nodes[0], item); find_dir_range()
1952 * this looks for a given directory item in the log. If the directory
1953 * item is not in the log, the item is removed and the inode it points
2195 * because we replay the deletes before we copy in the inode item replay_dir_deletes()
2273 * The second stage copies all the other item types from the log into
2332 * orhpan item exist. extents past the new EOF replay_one_buffer()
2621 * helper function to update the item for a given subvolumes log root
2630 /* insert root item on the first sync */ update_log_root()
3138 struct btrfs_inode_item *item; btrfs_del_dir_entries_in_log() local
3141 item = btrfs_item_ptr(path->nodes[0], path->slots[0], btrfs_del_dir_entries_in_log()
3143 i_size = btrfs_inode_size(path->nodes[0], item); btrfs_del_dir_entries_in_log()
3148 btrfs_set_inode_size(path->nodes[0], item, i_size); btrfs_del_dir_entries_in_log()
3202 * creates a range item in the log for 'dirid'. first_offset and
3214 struct btrfs_dir_log_item *item; insert_dir_log_key() local
3222 ret = btrfs_insert_empty_item(trans, log, path, &key, sizeof(*item)); insert_dir_log_key()
3226 item = btrfs_item_ptr(path->nodes[0], path->slots[0], insert_dir_log_key()
3228 btrfs_set_dir_log_end(path->nodes[0], item, last_offset); insert_dir_log_key()
3320 * we have a block from this transaction, log every item in it log_dir_items()
3375 * look ahead to the next item and see if it is also log_dir_items()
3463 * inode. max_key_type indicates the highest item type to remove.
3520 struct btrfs_inode_item *item, fill_inode_item()
3534 btrfs_set_token_inode_generation(leaf, item, 0, &token); fill_inode_item()
3535 btrfs_set_token_inode_size(leaf, item, logged_isize, &token); fill_inode_item()
3537 btrfs_set_token_inode_generation(leaf, item, fill_inode_item()
3540 btrfs_set_token_inode_size(leaf, item, inode->i_size, &token); fill_inode_item()
3543 btrfs_set_token_inode_uid(leaf, item, i_uid_read(inode), &token); fill_inode_item()
3544 btrfs_set_token_inode_gid(leaf, item, i_gid_read(inode), &token); fill_inode_item()
3545 btrfs_set_token_inode_mode(leaf, item, inode->i_mode, &token); fill_inode_item()
3546 btrfs_set_token_inode_nlink(leaf, item, inode->i_nlink, &token); fill_inode_item()
3548 btrfs_set_token_timespec_sec(leaf, &item->atime, fill_inode_item()
3550 btrfs_set_token_timespec_nsec(leaf, &item->atime, fill_inode_item()
3553 btrfs_set_token_timespec_sec(leaf, &item->mtime, fill_inode_item()
3555 btrfs_set_token_timespec_nsec(leaf, &item->mtime, fill_inode_item()
3558 btrfs_set_token_timespec_sec(leaf, &item->ctime, fill_inode_item()
3560 btrfs_set_token_timespec_nsec(leaf, &item->ctime, fill_inode_item()
3563 btrfs_set_token_inode_nbytes(leaf, item, inode_get_bytes(inode), fill_inode_item()
3566 btrfs_set_token_inode_sequence(leaf, item, inode->i_version, &token); fill_inode_item()
3567 btrfs_set_token_inode_transid(leaf, item, trans->transid, &token); fill_inode_item()
3568 btrfs_set_token_inode_rdev(leaf, item, inode->i_rdev, &token); fill_inode_item()
3569 btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token); fill_inode_item()
3570 btrfs_set_token_inode_block_group(leaf, item, 0, &token); fill_inode_item()
4217 struct btrfs_inode_item *item; logged_inode_size() local
4219 item = btrfs_item_ptr(path->nodes[0], path->slots[0], logged_inode_size()
4221 *size_ret = btrfs_inode_size(path->nodes[0], item); logged_inode_size()
4631 * Make sure the new inode item we write to the log has btrfs_log_inode()
4857 * didn't get their respective file extent item in the fs/subvol btrfs_log_inode()
4860 * that it logs a matching file extent item and waits for the btrfs_log_inode()
5004 * from the inode, leaving the logged inode item with a link count that does
5007 * link count in the inode item (see replay_one_buffer() and
5012 * BTRFS_DIR_INDEX_KEY are added to fs/subvol tree and the logged inode item
5020 * The directory's inode item with a wrong i_size is not a problem as well,
5022 * item of the fs/subvol tree (see overwrite_item()).
5357 * but the file inode does not have a matching BTRFS_INODE_REF_KEY item btrfs_log_inode_parent()
3518 fill_inode_item(struct btrfs_trans_handle *trans, struct extent_buffer *leaf, struct btrfs_inode_item *item, struct inode *inode, int log_inode_only, u64 logged_isize) fill_inode_item() argument
H A Dxattr.c146 * We have an existing item in a leaf, split_leaf couldn't do_setxattr()
147 * expand it. That item might have or not a dir_item that do_setxattr()
183 struct btrfs_item *item; do_setxattr() local
196 /* No other xattrs packed in the same leaf item. */ do_setxattr()
203 /* There are other xattrs packed in the same item. */ do_setxattr()
210 item = btrfs_item_nr(slot); do_setxattr()
212 ptr += btrfs_item_size(leaf, item) - data_size; do_setxattr()
313 /* check to make sure this item is what we want */ btrfs_listxattr()
H A Dinode.c2422 struct btrfs_file_extent_item *item; relink_extent_backref() local
2580 item = btrfs_item_ptr(leaf, path->slots[0], relink_extent_backref()
2582 btrfs_set_file_extent_disk_bytenr(leaf, item, new->bytenr); relink_extent_backref()
2583 btrfs_set_file_extent_disk_num_bytes(leaf, item, new->disk_len); relink_extent_backref()
2584 btrfs_set_file_extent_offset(leaf, item, start - new->file_pos); relink_extent_backref()
2585 btrfs_set_file_extent_num_bytes(leaf, item, len); relink_extent_backref()
2586 btrfs_set_file_extent_ram_bytes(leaf, item, new->len); relink_extent_backref()
2587 btrfs_set_file_extent_generation(leaf, item, trans->transid); relink_extent_backref()
2588 btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG); relink_extent_backref()
2589 btrfs_set_file_extent_compression(leaf, item, new->compress_type); relink_extent_backref()
2590 btrfs_set_file_extent_encryption(leaf, item, 0); relink_extent_backref()
2591 btrfs_set_file_extent_other_encoding(leaf, item, 0); relink_extent_backref()
3159 * files in the subvolume, it removes orphan item and frees block_rsv
3261 /* insert an orphan item to track this unlinked/truncated file */ btrfs_orphan_add()
3281 /* insert an orphan item to track subvolume contains orphan files */ btrfs_orphan_add()
3295 * item for this particular inode.
3373 /* pull out the item */ btrfs_orphan_cleanup()
3377 /* make sure the item matches what we want */ btrfs_orphan_cleanup()
3389 * offset of the orphan item. btrfs_orphan_cleanup()
3442 * Inode is already gone but the orphan item is still there, btrfs_orphan_cleanup()
3443 * kill the orphan item. btrfs_orphan_cleanup()
3477 /* 1 for the orphan item deletion. */ btrfs_orphan_cleanup()
3794 struct btrfs_inode_item *item, fill_inode_item()
3801 btrfs_set_token_inode_uid(leaf, item, i_uid_read(inode), &token); fill_inode_item()
3802 btrfs_set_token_inode_gid(leaf, item, i_gid_read(inode), &token); fill_inode_item()
3803 btrfs_set_token_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size, fill_inode_item()
3805 btrfs_set_token_inode_mode(leaf, item, inode->i_mode, &token); fill_inode_item()
3806 btrfs_set_token_inode_nlink(leaf, item, inode->i_nlink, &token); fill_inode_item()
3808 btrfs_set_token_timespec_sec(leaf, &item->atime, fill_inode_item()
3810 btrfs_set_token_timespec_nsec(leaf, &item->atime, fill_inode_item()
3813 btrfs_set_token_timespec_sec(leaf, &item->mtime, fill_inode_item()
3815 btrfs_set_token_timespec_nsec(leaf, &item->mtime, fill_inode_item()
3818 btrfs_set_token_timespec_sec(leaf, &item->ctime, fill_inode_item()
3820 btrfs_set_token_timespec_nsec(leaf, &item->ctime, fill_inode_item()
3823 btrfs_set_token_timespec_sec(leaf, &item->otime, fill_inode_item()
3825 btrfs_set_token_timespec_nsec(leaf, &item->otime, fill_inode_item()
3828 btrfs_set_token_inode_nbytes(leaf, item, inode_get_bytes(inode), fill_inode_item()
3830 btrfs_set_token_inode_generation(leaf, item, BTRFS_I(inode)->generation, fill_inode_item()
3832 btrfs_set_token_inode_sequence(leaf, item, inode->i_version, &token); fill_inode_item()
3833 btrfs_set_token_inode_transid(leaf, item, trans->transid, &token); fill_inode_item()
3834 btrfs_set_token_inode_rdev(leaf, item, inode->i_rdev, &token); fill_inode_item()
3835 btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token); fill_inode_item()
3836 btrfs_set_token_inode_block_group(leaf, item, 0, &token); fill_inode_item()
3966 * Since the inode ref is close to the inode item, it is better __btrfs_unlink_inode()
3968 * we update the inode item. __btrfs_unlink_inode()
4048 * 1 for the possible orphan item __unlink_start_trans()
4049 * 1 for the dir item __unlink_start_trans()
4247 * read the extent item from disk (data not in the page cache). truncate_inline_extent()
4955 * 1 for the orphan item we're going to add btrfs_setsize()
4956 * 1 for the orphan item deletion. btrfs_setsize()
5195 * reserved our space for our orphan item in the unlink, so we just btrfs_evict_inode()
5197 * inode item when doing the truncate. btrfs_evict_inode()
5720 struct btrfs_item *item; btrfs_real_readdir() local
5782 item = btrfs_item_nr(slot); btrfs_real_readdir()
5801 di_total = btrfs_item_size(leaf, item); btrfs_real_readdir()
5830 * dir item and dir index after it has been created, so btrfs_real_readdir()
5876 /* Reached end of directory/root. Bump pos past the last item. */ btrfs_real_readdir()
6116 * we fill in an inode item with the correct link count. btrfs_new_inode()
6168 * be packed into one item. Extended refs will kick in if we btrfs_new_inode()
6169 * add more hard links than can fit in the ref item. btrfs_new_inode()
6356 * 2 for inode item and ref btrfs_mknod()
6427 * 2 for inode item and ref btrfs_create()
6513 * 1 item for parent inode btrfs_link()
6702 struct btrfs_file_extent_item *item) uncompress_inline()
6713 compress_type = btrfs_file_extent_compression(leaf, item); uncompress_inline()
6714 max_size = btrfs_file_extent_ram_bytes(leaf, item); uncompress_inline()
6720 ptr = btrfs_file_extent_inline_start(item); uncompress_inline()
6752 struct btrfs_file_extent_item *item; btrfs_get_extent() local
6814 item = btrfs_item_ptr(leaf, path->slots[0], btrfs_get_extent()
6831 found_type = btrfs_file_extent_type(leaf, item); btrfs_get_extent()
6836 btrfs_file_extent_num_bytes(leaf, item); btrfs_get_extent()
6839 size = btrfs_file_extent_inline_len(leaf, path->slots[0], item); btrfs_get_extent()
6869 btrfs_extent_item_to_extent_map(inode, path, item, new_inline, em); btrfs_get_extent()
6884 size = btrfs_file_extent_inline_len(leaf, path->slots[0], item); btrfs_get_extent()
6892 ptr = btrfs_file_extent_inline_start(item) + extent_offset; btrfs_get_extent()
6894 if (btrfs_file_extent_compression(leaf, item) != btrfs_get_extent()
6898 extent_offset, item); btrfs_get_extent()
7206 /* can't find the item, must cow */ can_nocow_extent()
7217 /* not our file or wrong item type, must cow */ can_nocow_extent()
8871 * 1) We need to reserve space for our orphan item and the space to btrfs_truncate()
8872 * delete our orphan item. Lord knows we don't want to have a dangling btrfs_truncate()
8873 * orphan item because we didn't reserve space to remove it. btrfs_truncate()
8886 * removing the orphan item. We also need to be able to stop the btrfs_truncate()
8889 * many times that will be, so we can't just reserve 1 item for the btrfs_truncate()
8891 * Then there is the orphan item, which does indeed need to be held on btrfs_truncate()
9310 * require 4 item modifications, but if they are both normal inodes it btrfs_rename()
9311 * would require 5 item modifications, so we'll assume their normal btrfs_rename()
9662 * 2 items for inode item and ref btrfs_symlink()
9664 * 1 item for updating parent inode item btrfs_symlink()
9665 * 1 item for the inline extent item btrfs_symlink()
9666 * 1 item for xattr if selinux is on btrfs_symlink()
3792 fill_inode_item(struct btrfs_trans_handle *trans, struct extent_buffer *leaf, struct btrfs_inode_item *item, struct inode *inode) fill_inode_item() argument
6699 uncompress_inline(struct btrfs_path *path, struct inode *inode, struct page *page, size_t pg_offset, u64 extent_offset, struct btrfs_file_extent_item *item) uncompress_inline() argument
H A Dextent_map.h14 #define EXTENT_FLAG_VACANCY 2 /* no file extent item found */
H A Dctree.h309 * item in the btree
550 * the item in the leaf (relative to the start of the data area)
559 * leaves have an item area and a data area:
590 * The slots array records the index of the item or block pointer
668 /* old style backrefs item */
736 * just grow the inode item and version it
786 * and up to date while reading the root item. Everytime the root item
959 * grow this item struct at the end for future enhancements and keep
1003 * grow this item struct at the end for future enhancements and keep
1058 * fs_info->avail_*_alloc_bits (in-memory) and balance item fields
1315 struct btrfs_block_group_item item; member in struct:btrfs_block_group_cache
1456 * delayed dir index item
1768 struct mutex qgroup_rescan_lock; /* protects the progress item */
2063 * directory item in the root that references the subvol
2581 struct btrfs_tree_block_info *item, btrfs_tree_block_key()
2584 read_eb_member(eb, item, struct btrfs_tree_block_info, key, key); btrfs_tree_block_key()
2588 struct btrfs_tree_block_info *item, btrfs_set_tree_block_key()
2591 write_eb_member(eb, item, struct btrfs_tree_block_info, key, key); btrfs_set_tree_block_key()
2710 struct btrfs_item *item) btrfs_item_end()
2712 return btrfs_item_offset(eb, item) + btrfs_item_size(eb, item); btrfs_item_end()
2733 struct btrfs_item *item = btrfs_item_nr(nr); btrfs_item_key() local
2734 read_eb_member(eb, item, struct btrfs_item, key, disk_key); btrfs_item_key()
2740 struct btrfs_item *item = btrfs_item_nr(nr); btrfs_set_item_key() local
2741 write_eb_member(eb, item, struct btrfs_item, key, disk_key); btrfs_set_item_key()
2767 struct btrfs_dir_item *item, btrfs_dir_item_key()
2770 read_eb_member(eb, item, struct btrfs_dir_item, location, key); btrfs_dir_item_key()
2774 struct btrfs_dir_item *item, btrfs_set_dir_item_key()
2777 write_eb_member(eb, item, struct btrfs_dir_item, location, key); btrfs_set_dir_item_key()
2840 struct btrfs_dir_item *item, btrfs_dir_item_key_to_cpu()
2844 btrfs_dir_item_key(eb, item, &disk_key); btrfs_dir_item_key_to_cpu()
3202 * this returns the number of bytes used by the item on disk, minus the
3212 /* this returns the number of file bytes represented by the inline item.
3213 * If an item is compressed, this is the uncompressed size
3223 * return the space used on disk if this item isn't btrfs_file_extent_inline_len()
3753 /* root-item.c */
3769 *item);
3773 struct btrfs_root_item *item);
3778 void btrfs_set_root_node(struct btrfs_root_item *item,
3780 void btrfs_check_and_init_root_item(struct btrfs_root_item *item);
3795 /* dir-item.c */
3846 /* inode-item.c */
3875 /* file-item.c */
2580 btrfs_tree_block_key(struct extent_buffer *eb, struct btrfs_tree_block_info *item, struct btrfs_disk_key *key) btrfs_tree_block_key() argument
2587 btrfs_set_tree_block_key(struct extent_buffer *eb, struct btrfs_tree_block_info *item, struct btrfs_disk_key *key) btrfs_set_tree_block_key() argument
2709 btrfs_item_end(struct extent_buffer *eb, struct btrfs_item *item) btrfs_item_end() argument
2766 btrfs_dir_item_key(struct extent_buffer *eb, struct btrfs_dir_item *item, struct btrfs_disk_key *key) btrfs_dir_item_key() argument
2773 btrfs_set_dir_item_key(struct extent_buffer *eb, struct btrfs_dir_item *item, struct btrfs_disk_key *key) btrfs_set_dir_item_key() argument
2839 btrfs_dir_item_key_to_cpu(struct extent_buffer *eb, struct btrfs_dir_item *item, struct btrfs_key *key) btrfs_dir_item_key_to_cpu() argument
/linux-4.4.14/fs/ocfs2/cluster/
H A Dnodemanager.c156 static struct o2nm_cluster *to_o2nm_cluster(struct config_item *item) to_o2nm_cluster() argument
158 return item ? to_o2nm_cluster()
159 container_of(to_config_group(item), struct o2nm_cluster, to_o2nm_cluster()
164 static struct o2nm_node *to_o2nm_node(struct config_item *item) to_o2nm_node() argument
166 return item ? container_of(item, struct o2nm_node, nd_item) : NULL; to_o2nm_node()
169 static void o2nm_node_release(struct config_item *item) o2nm_node_release() argument
171 struct o2nm_node *node = to_o2nm_node(item); o2nm_node_release()
175 static ssize_t o2nm_node_num_show(struct config_item *item, char *page) o2nm_node_num_show() argument
177 return sprintf(page, "%d\n", to_o2nm_node(item)->nd_num); o2nm_node_num_show()
193 static ssize_t o2nm_node_num_store(struct config_item *item, const char *page, o2nm_node_num_store() argument
196 struct o2nm_node *node = to_o2nm_node(item); o2nm_node_num_store()
234 static ssize_t o2nm_node_ipv4_port_show(struct config_item *item, char *page) o2nm_node_ipv4_port_show() argument
236 return sprintf(page, "%u\n", ntohs(to_o2nm_node(item)->nd_ipv4_port)); o2nm_node_ipv4_port_show()
239 static ssize_t o2nm_node_ipv4_port_store(struct config_item *item, o2nm_node_ipv4_port_store() argument
242 struct o2nm_node *node = to_o2nm_node(item); o2nm_node_ipv4_port_store()
262 static ssize_t o2nm_node_ipv4_address_show(struct config_item *item, char *page) o2nm_node_ipv4_address_show() argument
264 return sprintf(page, "%pI4\n", &to_o2nm_node(item)->nd_ipv4_address); o2nm_node_ipv4_address_show()
267 static ssize_t o2nm_node_ipv4_address_store(struct config_item *item, o2nm_node_ipv4_address_store() argument
271 struct o2nm_node *node = to_o2nm_node(item); o2nm_node_ipv4_address_store()
309 static ssize_t o2nm_node_local_show(struct config_item *item, char *page) o2nm_node_local_show() argument
311 return sprintf(page, "%d\n", to_o2nm_node(item)->nd_local); o2nm_node_local_show()
314 static ssize_t o2nm_node_local_store(struct config_item *item, const char *page, o2nm_node_local_store() argument
317 struct o2nm_node *node = to_o2nm_node(item); o2nm_node_local_store()
423 static ssize_t o2nm_cluster_idle_timeout_ms_show(struct config_item *item, o2nm_cluster_idle_timeout_ms_show() argument
426 return sprintf(page, "%u\n", to_o2nm_cluster(item)->cl_idle_timeout_ms); o2nm_cluster_idle_timeout_ms_show()
429 static ssize_t o2nm_cluster_idle_timeout_ms_store(struct config_item *item, o2nm_cluster_idle_timeout_ms_store() argument
432 struct o2nm_cluster *cluster = to_o2nm_cluster(item); o2nm_cluster_idle_timeout_ms_store()
460 struct config_item *item, char *page) o2nm_cluster_keepalive_delay_ms_show()
463 to_o2nm_cluster(item)->cl_keepalive_delay_ms); o2nm_cluster_keepalive_delay_ms_show()
467 struct config_item *item, const char *page, size_t count) o2nm_cluster_keepalive_delay_ms_store()
469 struct o2nm_cluster *cluster = to_o2nm_cluster(item); o2nm_cluster_keepalive_delay_ms_store()
497 struct config_item *item, char *page) o2nm_cluster_reconnect_delay_ms_show()
500 to_o2nm_cluster(item)->cl_reconnect_delay_ms); o2nm_cluster_reconnect_delay_ms_show()
504 struct config_item *item, const char *page, size_t count) o2nm_cluster_reconnect_delay_ms_store()
507 &to_o2nm_cluster(item)->cl_reconnect_delay_ms); o2nm_cluster_reconnect_delay_ms_store()
511 struct config_item *item, char *page) o2nm_cluster_fence_method_show()
513 struct o2nm_cluster *cluster = to_o2nm_cluster(item); o2nm_cluster_fence_method_show()
523 struct config_item *item, const char *page, size_t count) o2nm_cluster_fence_method_store()
535 if (to_o2nm_cluster(item)->cl_fence_method != i) { o2nm_cluster_fence_method_store()
538 to_o2nm_cluster(item)->cl_fence_method = i; o2nm_cluster_fence_method_store()
572 strcpy(node->nd_name, name); /* use item.ci_namebuf instead? */ o2nm_node_group_make_item()
582 struct config_item *item) o2nm_node_group_drop_item()
584 struct o2nm_node *node = to_o2nm_node(item); o2nm_node_group_drop_item()
614 config_item_put(item); o2nm_node_group_drop_item()
629 static void o2nm_cluster_release(struct config_item *item) o2nm_cluster_release() argument
631 struct o2nm_cluster *cluster = to_o2nm_cluster(item); o2nm_cluster_release()
714 static void o2nm_cluster_group_drop_item(struct config_group *group, struct config_item *item) o2nm_cluster_group_drop_item() argument
716 struct o2nm_cluster *cluster = to_o2nm_cluster(item); o2nm_cluster_group_drop_item()
729 config_item_put(item); o2nm_cluster_group_drop_item()
753 int o2nm_depend_item(struct config_item *item) o2nm_depend_item() argument
755 return configfs_depend_item(&o2nm_cluster_group.cs_subsys, item); o2nm_depend_item()
758 void o2nm_undepend_item(struct config_item *item) o2nm_undepend_item() argument
760 configfs_undepend_item(&o2nm_cluster_group.cs_subsys, item); o2nm_undepend_item()
459 o2nm_cluster_keepalive_delay_ms_show( struct config_item *item, char *page) o2nm_cluster_keepalive_delay_ms_show() argument
466 o2nm_cluster_keepalive_delay_ms_store( struct config_item *item, const char *page, size_t count) o2nm_cluster_keepalive_delay_ms_store() argument
496 o2nm_cluster_reconnect_delay_ms_show( struct config_item *item, char *page) o2nm_cluster_reconnect_delay_ms_show() argument
503 o2nm_cluster_reconnect_delay_ms_store( struct config_item *item, const char *page, size_t count) o2nm_cluster_reconnect_delay_ms_store() argument
510 o2nm_cluster_fence_method_show( struct config_item *item, char *page) o2nm_cluster_fence_method_show() argument
522 o2nm_cluster_fence_method_store( struct config_item *item, const char *page, size_t count) o2nm_cluster_fence_method_store() argument
581 o2nm_node_group_drop_item(struct config_group *group, struct config_item *item) o2nm_node_group_drop_item() argument
H A Dnodemanager.h83 int o2nm_depend_item(struct config_item *item);
84 void o2nm_undepend_item(struct config_item *item);
H A Dheartbeat.c1409 static struct o2hb_region *to_o2hb_region(struct config_item *item) to_o2hb_region() argument
1411 return item ? container_of(item, struct o2hb_region, hr_item) : NULL; to_o2hb_region()
1417 static void o2hb_region_release(struct config_item *item) o2hb_region_release() argument
1421 struct o2hb_region *reg = to_o2hb_region(item); o2hb_region_release()
1483 static ssize_t o2hb_region_block_bytes_show(struct config_item *item, o2hb_region_block_bytes_show() argument
1486 return sprintf(page, "%u\n", to_o2hb_region(item)->hr_block_bytes); o2hb_region_block_bytes_show()
1489 static ssize_t o2hb_region_block_bytes_store(struct config_item *item, o2hb_region_block_bytes_store() argument
1493 struct o2hb_region *reg = to_o2hb_region(item); o2hb_region_block_bytes_store()
1512 static ssize_t o2hb_region_start_block_show(struct config_item *item, o2hb_region_start_block_show() argument
1515 return sprintf(page, "%llu\n", to_o2hb_region(item)->hr_start_block); o2hb_region_start_block_show()
1518 static ssize_t o2hb_region_start_block_store(struct config_item *item, o2hb_region_start_block_store() argument
1522 struct o2hb_region *reg = to_o2hb_region(item); o2hb_region_start_block_store()
1538 static ssize_t o2hb_region_blocks_show(struct config_item *item, char *page) o2hb_region_blocks_show() argument
1540 return sprintf(page, "%d\n", to_o2hb_region(item)->hr_blocks); o2hb_region_blocks_show()
1543 static ssize_t o2hb_region_blocks_store(struct config_item *item, o2hb_region_blocks_store() argument
1547 struct o2hb_region *reg = to_o2hb_region(item); o2hb_region_blocks_store()
1566 static ssize_t o2hb_region_dev_show(struct config_item *item, char *page) o2hb_region_dev_show() argument
1570 if (to_o2hb_region(item)->hr_bdev) o2hb_region_dev_show()
1571 ret = sprintf(page, "%s\n", to_o2hb_region(item)->hr_dev_name); o2hb_region_dev_show()
1681 static ssize_t o2hb_region_dev_store(struct config_item *item, o2hb_region_dev_store() argument
1685 struct o2hb_region *reg = to_o2hb_region(item); o2hb_region_dev_store()
1846 static ssize_t o2hb_region_pid_show(struct config_item *item, char *page) o2hb_region_pid_show() argument
1848 struct o2hb_region *reg = to_o2hb_region(item); o2hb_region_pid_show()
2011 struct config_item *item) o2hb_heartbeat_group_drop_item()
2014 struct o2hb_region *reg = to_o2hb_region(item); o2hb_heartbeat_group_drop_item()
2037 "stopped" : "start aborted"), config_item_name(item), o2hb_heartbeat_group_drop_item()
2051 config_item_put(item); o2hb_heartbeat_group_drop_item()
2073 static ssize_t o2hb_heartbeat_group_threshold_show(struct config_item *item, o2hb_heartbeat_group_threshold_show() argument
2079 static ssize_t o2hb_heartbeat_group_threshold_store(struct config_item *item, o2hb_heartbeat_group_threshold_store() argument
2095 static ssize_t o2hb_heartbeat_group_mode_show(struct config_item *item, o2hb_heartbeat_group_mode_show() argument
2102 static ssize_t o2hb_heartbeat_group_mode_store(struct config_item *item, o2hb_heartbeat_group_mode_store() argument
2010 o2hb_heartbeat_group_drop_item(struct config_group *group, struct config_item *item) o2hb_heartbeat_group_drop_item() argument
/linux-4.4.14/net/ceph/crush/
H A Dmapper.c61 * will produce an item in the bucket.
149 dprintk("list_choose i=%d x=%d r=%d item %d weight %x " bucket_list_choose()
377 int item, int x) is_out()
379 if (item >= weight_max) is_out()
381 if (weight[item] >= 0x10000) is_out()
383 if (weight[item] == 0) is_out()
385 if ((crush_hash32_2(CRUSH_HASH_RJENKINS1, x, item) & 0xffff) is_out()
386 < weight[item]) is_out()
394 * @bucket: the bucket we are choose an item from
397 * @type: the type of item to choose
405 * @recurse_to_leaf: true if we want one device under each item of given type (chooseleaf instead of choose)
431 int item = 0; crush_choose_firstn() local
443 /* keep trying until we get a non-out, non-colliding item */ crush_choose_firstn()
467 item = bucket_perm_choose(in, x, r); crush_choose_firstn()
469 item = crush_bucket_choose(in, x, r); crush_choose_firstn()
470 if (item >= map->max_devices) { crush_choose_firstn()
471 dprintk(" bad item %d\n", item); crush_choose_firstn()
477 if (item < 0) crush_choose_firstn()
478 itemtype = map->buckets[-1-item]->type; crush_choose_firstn()
481 dprintk(" item %d type %d\n", item, itemtype); crush_choose_firstn()
485 if (item >= 0 || crush_choose_firstn()
486 (-1-item) >= map->max_buckets) { crush_choose_firstn()
487 dprintk(" bad item type %d\n", type); crush_choose_firstn()
491 in = map->buckets[-1-item]; crush_choose_firstn()
498 if (out[i] == item) { crush_choose_firstn()
506 if (item < 0) { crush_choose_firstn()
513 map->buckets[-1-item], crush_choose_firstn()
528 out2[outpos] = item; crush_choose_firstn()
537 item, x); crush_choose_firstn()
573 dprintk("CHOOSE got %d\n", item); crush_choose_firstn()
574 out[outpos] = item; crush_choose_firstn()
609 int item = 0; crush_choose_indep() local
650 * choose a different item in that bucket. crush_choose_indep()
671 item = crush_bucket_choose(in, x, r); crush_choose_indep()
672 if (item >= map->max_devices) { crush_choose_indep()
673 dprintk(" bad item %d\n", item); crush_choose_indep()
682 if (item < 0) crush_choose_indep()
683 itemtype = map->buckets[-1-item]->type; crush_choose_indep()
686 dprintk(" item %d type %d\n", item, itemtype); crush_choose_indep()
690 if (item >= 0 || crush_choose_indep()
691 (-1-item) >= map->max_buckets) { crush_choose_indep()
692 dprintk(" bad item type %d\n", type); crush_choose_indep()
700 in = map->buckets[-1-item]; crush_choose_indep()
707 if (out[i] == item) { crush_choose_indep()
716 if (item < 0) { crush_choose_indep()
718 map->buckets[-1-item], crush_choose_indep()
730 out2[rep] = item; crush_choose_indep()
736 is_out(map, weight, weight_max, item, x)) crush_choose_indep()
740 out[rep] = item; crush_choose_indep()
375 is_out(const struct crush_map *map, const __u32 *weight, int weight_max, int item, int x) is_out() argument
H A Dcrush.c22 * crush_get_bucket_item_weight - Get weight of an item in given bucket
24 * @p: item index in bucket
/linux-4.4.14/drivers/clk/mmp/
H A Dclk-mix.c115 struct mmp_clk_mix_clk_table *item; _filter_clk_table() local
122 item = &table[i]; _filter_clk_table()
123 parent = clk_hw_get_parent_by_index(hw, item->parent_index); _filter_clk_table()
125 if (parent_rate % item->rate) { _filter_clk_table()
126 item->valid = 0; _filter_clk_table()
128 item->divisor = parent_rate / item->rate; _filter_clk_table()
129 item->valid = 1; _filter_clk_table()
208 struct mmp_clk_mix_clk_table *item; mmp_clk_mix_determine_rate() local
224 item = &mix->table[i]; mmp_clk_mix_determine_rate()
225 if (item->valid == 0) mmp_clk_mix_determine_rate()
228 item->parent_index); mmp_clk_mix_determine_rate()
230 mix_rate = parent_rate / item->divisor; mmp_clk_mix_determine_rate()
351 struct mmp_clk_mix_clk_table *item; mmp_clk_set_parent() local
357 item = &mix->table[i]; mmp_clk_set_parent()
358 if (item->valid == 0) mmp_clk_set_parent()
360 if (item->parent_index == index) mmp_clk_set_parent()
364 div_val = _get_div_val(mix, item->divisor); mmp_clk_set_parent()
365 mux_val = _get_mux_val(mix, item->parent_index); mmp_clk_set_parent()
380 struct mmp_clk_mix_clk_table *item; mmp_clk_set_rate() local
390 item = &mix->table[i]; mmp_clk_set_rate()
391 if (item->valid == 0) mmp_clk_set_rate()
394 item->parent_index); mmp_clk_set_rate()
397 && item->divisor == best_divisor) mmp_clk_set_rate()
402 _get_mux_val(mix, item->parent_index), mmp_clk_set_rate()
403 _get_div_val(mix, item->divisor), mmp_clk_set_rate()
/linux-4.4.14/drivers/misc/mic/scif/
H A Dscif_rma_list.c32 struct list_head *item; scif_insert_tcw() local
43 list_for_each(item, head) { list_for_each()
44 curr = list_entry(item, struct scif_window, list); list_for_each()
61 struct list_head *item; scif_insert_window() local
64 list_for_each(item, head) { list_for_each()
65 curr = list_entry(item, struct scif_window, list); list_for_each()
87 struct list_head *item, *temp, *head = req->head; scif_query_tcw() local
105 list_for_each_safe(item, temp, head) { list_for_each_safe()
106 window = list_entry(item, struct scif_window, list); list_for_each_safe()
146 struct list_head *item; scif_query_window() local
154 list_for_each(item, req->head) { scif_query_window()
155 window = list_entry(item, struct scif_window, list); scif_query_window()
236 struct list_head *item, *tmp; scif_unmap_all_windows() local
242 list_for_each_safe(item, tmp, head) { list_for_each_safe()
243 window = list_entry(item, struct scif_window, list); list_for_each_safe()
258 struct list_head *item, *tmp; scif_unregister_all_windows() local
266 item = NULL; scif_unregister_all_windows()
268 list_for_each_safe(item, tmp, head) { list_for_each_safe()
269 window = list_entry(item, struct scif_window, list); list_for_each_safe()
H A Dscif_debugfs.c98 struct list_head *item; scif_display_all_windows() local
101 list_for_each(item, head) { list_for_each()
102 window = list_entry(item, struct scif_window, list); list_for_each()
H A Dscif_mmap.c77 struct list_head *item; __scif_zap_mmaps() local
83 list_for_each(item, &ep->rma_info.vma_list) { __scif_zap_mmaps()
84 info = list_entry(item, struct scif_vma_info, list); __scif_zap_mmaps()
102 struct list_head *item; _scif_zap_mmaps() local
105 list_for_each(item, head) { list_for_each()
106 ep = list_entry(item, struct scif_endpt, list); list_for_each()
156 struct list_head *item; scif_cleanup_rma_for_zombies() local
159 list_for_each(item, &scif_info.zombie) { scif_cleanup_rma_for_zombies()
160 ep = list_entry(item, struct scif_endpt, list); scif_cleanup_rma_for_zombies()
190 struct list_head *item; scif_delete_vma() local
194 list_for_each(item, &ep->rma_info.vma_list) { scif_delete_vma()
195 info = list_entry(item, struct scif_vma_info, list); scif_delete_vma()
H A Dscif_dma.c126 struct list_head *item, *tmp; __scif_rma_destroy_tcw() local
134 list_for_each_safe(item, tmp, &mmn->tc_reg_list) { __scif_rma_destroy_tcw()
135 window = list_entry(item, struct scif_window, list); __scif_rma_destroy_tcw()
160 struct list_head *item, *tmp; scif_rma_destroy_tcw_ep() local
163 list_for_each_safe(item, tmp, &ep->rma_info.mmn_list) { scif_rma_destroy_tcw_ep()
164 mmn = list_entry(item, struct scif_mmu_notif, list); scif_rma_destroy_tcw_ep()
171 struct list_head *item, *tmp; __scif_rma_destroy_tcw_ep() local
175 list_for_each_safe(item, tmp, &ep->rma_info.mmn_list) { __scif_rma_destroy_tcw_ep()
176 mmn = list_entry(item, struct scif_mmu_notif, list); __scif_rma_destroy_tcw_ep()
253 struct list_head *item, *tmp; scif_ep_unregister_mmu_notifier() local
256 list_for_each_safe(item, tmp, &rma->mmn_list) { scif_ep_unregister_mmu_notifier()
257 mmn = list_entry(item, struct scif_mmu_notif, list); scif_ep_unregister_mmu_notifier()
259 list_del(item); scif_ep_unregister_mmu_notifier()
279 struct list_head *item; scif_find_mmu_notifier() local
281 list_for_each(item, &rma->mmn_list) { scif_find_mmu_notifier()
282 mmn = list_entry(item, struct scif_mmu_notif, list); scif_find_mmu_notifier()
602 struct list_head *item, *tmp; scif_rma_destroy_windows() local
610 list_for_each_safe(item, tmp, &scif_info.rma) { scif_rma_destroy_windows()
611 window = list_entry(item, struct scif_window, scif_rma_destroy_windows()
646 struct list_head *item, *tmp; scif_rma_destroy_tcw_invalid() local
654 list_for_each_safe(item, tmp, &scif_info.rma_tc) { scif_rma_destroy_tcw_invalid()
655 window = list_entry(item, struct scif_window, list); scif_rma_destroy_tcw_invalid()
/linux-4.4.14/fs/xfs/
H A Dxfs_icreate_item.c32 kmem_zone_t *xfs_icreate_zone; /* inode create item zone */
40 * This returns the number of iovecs needed to log the given inode item.
56 * given inode create log item.
72 /* Pinning has no meaning for the create item, so just return. */
80 /* pinning has no meaning for the create item, so just return. */
101 * creation, we don't need the create item after this. Hence we can free
102 * the log item and return -1 to tell the caller we're done with the item.
115 /* item can never get into the AIL */
149 * Initialize the inode log item for a newly allocated (in-core) inode.
155 * This joins the item to the transaction and marks it dirty so
157 * caller need to know anything about the icreate item.
H A Dxfs_icreate_item.h21 /* in memory log item structure */
27 extern kmem_zone_t *xfs_icreate_zone; /* inode create item zone */
H A Dxfs_trans_ail.c64 * Return a pointer to the last item in the AIL. If the AIL is empty, then
78 * Return a pointer to the item which follows the given item in the AIL. If
79 * the given item is the last item in the list, then return NULL.
94 * the log. This is exactly the LSN of the first item in the AIL. If the AIL
98 * item in the AIL.
137 * the next item in the list for us. However, for this to be safe, removing an
147 cur->item = NULL; xfs_trans_ail_cursor_init()
152 * Get the next item in the traversal and advance the cursor. If the cursor
160 struct xfs_log_item *lip = cur->item; xfs_trans_ail_cursor_next()
165 cur->item = xfs_ail_next(ailp, lip); xfs_trans_ail_cursor_next()
177 cur->item = NULL; xfs_trans_ail_cursor_done()
182 * Invalidate any cursor that is pointing to this item. This is called when an
183 * item is removed from the AIL. Any cursor pointing to this object is now
185 * freed object. We set the low bit of the cursor item pointer so we can
187 * next item from the cursor.
197 if (cur->item == lip) xfs_trans_ail_cursor_clear()
198 cur->item = (struct xfs_log_item *) xfs_trans_ail_cursor_clear()
199 ((uintptr_t)cur->item | 1); xfs_trans_ail_cursor_clear()
204 * Find the first item in the AIL with the given @lsn by searching in ascending
205 * LSN order and initialise the cursor to point to the next item for a
207 * first item in the AIL. Returns NULL if the list is empty.
232 cur->item = xfs_ail_next(ailp, lip); xfs_trans_ail_cursor_first()
251 * Find the last item in the AIL with the given @lsn by searching in descending
252 * LSN order and initialise the cursor to point to that item. If there is no
253 * item with the value of @lsn, then it sets the cursor to the last item with an
263 cur->item = __xfs_trans_ail_cursor_last(ailp, lsn); xfs_trans_ail_cursor_last()
264 return cur->item; xfs_trans_ail_cursor_last()
268 * Splice the log item list into the AIL at the given LSN. We splice to the
289 lip = cur ? cur->item : NULL; xfs_ail_splice()
297 * cursor to point to that last item, now while we have a xfs_ail_splice()
301 cur->item = list_entry(list->prev, struct xfs_log_item, li_ail); xfs_ail_splice()
305 * lip points to the item in the AIL _after_ which the new xfs_ail_splice()
316 * Delete the given item from the AIL. Return a pointer to the item.
396 * The item or its backing buffer is already beeing xfsaild_push()
619 * positioned at the same LSN in the AIL. If an item is not in the AIL, it will
621 * it to the AIL. If we move the first item in the AIL, update the log tail to
627 * item LSN to confirm it needs to be moved forward in the AIL.
632 * insert operation on every item.
656 /* check if we really need to move the item */
694 * For each log item to be removed, unlink it from the AIL, clear the IN_AIL
695 * flag from the item and reset the item's lsn to 0. If we remove the first
696 * item in the AIL, update the log tail to match the new minimum LSN in the
728 "%s: attempting to delete a log item that is not in the AIL",
H A Dxfs_extfree_item.c50 * This returns the number of iovecs needed to log the given efi item.
51 * We only need 1 iovec for an efi item. It just logs the efi_log_format
74 * given efi log item. We use only 1 iovec, and we point that
75 * at the efi_log_format structure embedded in the efi item.
77 * slots in the efi item have been filled.
100 * Pinning has no meaning for an efi item, so just return.
195 * Allocate and initialize an efi item with the given number of extents.
310 * This returns the number of iovecs needed to log the given efd item.
311 * We only need 1 iovec for an efd item. It just logs the efd_log_format
334 * given efd log item. We use only 1 iovec, and we point that
335 * at the efd_log_format structure embedded in the efd item.
337 * slots in the efd item have been filled.
358 * Pinning has no meaning for an efd item, so just return.
367 * Since pinning has no meaning for an efd item, unpinning does
378 * There isn't much you can do to push on an efd item. It is simply stuck
406 * When the efd item is committed to disk, all we need to do is delete our
407 * reference to our partner efi item and then free ourselves. Since we're
409 * referencing this item.
459 * Allocate and initialize an efd item with the given number of extents.
H A Dxfs_log_recover.c1450 * 1. Every item is only logged once in a given transaction. Hence it
1451 * represents the last logged state of the item. Hence ordering is
1499 xlog_recover_item_t *item, *n; xlog_recover_reorder_trans() local
1508 list_for_each_entry_safe(item, n, &sort_list, ri_list) { xlog_recover_reorder_trans()
1509 xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr; xlog_recover_reorder_trans()
1511 switch (ITEM_TYPE(item)) { xlog_recover_reorder_trans()
1513 list_move_tail(&item->ri_list, &buffer_list); xlog_recover_reorder_trans()
1518 trans, item, pass); xlog_recover_reorder_trans()
1519 list_move(&item->ri_list, &cancel_list); xlog_recover_reorder_trans()
1523 list_move(&item->ri_list, &inode_buffer_list); xlog_recover_reorder_trans()
1526 list_move_tail(&item->ri_list, &buffer_list); xlog_recover_reorder_trans()
1534 trans, item, pass); xlog_recover_reorder_trans()
1535 list_move_tail(&item->ri_list, &inode_list); xlog_recover_reorder_trans()
1544 * item list so they can be freed in caller. xlog_recover_reorder_trans()
1580 struct xlog_recover_item *item) xlog_recover_buffer_pass1()
1582 xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr; xlog_recover_buffer_pass1()
1587 * If this isn't a cancel buffer item, then just return. xlog_recover_buffer_pass1()
1655 * otherwise return 0. If the buffer is actually a buffer cancel item
1679 * item, then decrement the refcount on the one in the table and xlog_check_buffer_cancelled()
1706 xlog_recover_item_t *item, xlog_recover_do_inode_buffer()
1770 ASSERT(item->ri_buf[item_index].i_addr != NULL); xlog_recover_do_inode_buffer()
1771 ASSERT((item->ri_buf[item_index].i_len % XFS_BLF_CHUNK) == 0); xlog_recover_do_inode_buffer()
1780 logged_nextp = item->ri_buf[item_index].i_addr + xlog_recover_do_inode_buffer()
1786 item, bp); xlog_recover_do_inode_buffer()
1988 * to determine if we should have replayed the item. If we replay old xlog_recover_validate_buf_type()
2175 xlog_recover_item_t *item, xlog_recover_do_reg_buffer()
2196 ASSERT(item->ri_buf[i].i_addr != NULL); xlog_recover_do_reg_buffer()
2197 ASSERT(item->ri_buf[i].i_len % XFS_BLF_CHUNK == 0); xlog_recover_do_reg_buffer()
2209 if (item->ri_buf[i].i_len < (nbits << XFS_BLF_SHIFT)) xlog_recover_do_reg_buffer()
2210 nbits = item->ri_buf[i].i_len >> XFS_BLF_SHIFT; xlog_recover_do_reg_buffer()
2220 if (item->ri_buf[i].i_addr == NULL) { xlog_recover_do_reg_buffer()
2225 if (item->ri_buf[i].i_len < sizeof(xfs_disk_dquot_t)) { xlog_recover_do_reg_buffer()
2228 item->ri_buf[i].i_len, __func__); xlog_recover_do_reg_buffer()
2231 error = xfs_dqcheck(mp, item->ri_buf[i].i_addr, xlog_recover_do_reg_buffer()
2240 item->ri_buf[i].i_addr, /* source */ xlog_recover_do_reg_buffer()
2248 ASSERT(i == item->ri_total); xlog_recover_do_reg_buffer()
2255 * Simple algorithm: if we have found a QUOTAOFF log item of the same type
2266 struct xlog_recover_item *item, xlog_recover_do_dquot_buffer()
2293 xlog_recover_do_reg_buffer(mp, item, bp, buf_f); xlog_recover_do_dquot_buffer()
2306 * When meta-data buffers are freed at run time we log a buffer item
2324 struct xlog_recover_item *item, xlog_recover_buffer_pass2()
2327 xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr; xlog_recover_buffer_pass2()
2386 error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f); xlog_recover_buffer_pass2()
2393 dirty = xlog_recover_do_dquot_buffer(mp, log, item, bp, buf_f); xlog_recover_buffer_pass2()
2397 xlog_recover_do_reg_buffer(mp, item, bp, buf_f); xlog_recover_buffer_pass2()
2512 struct xlog_recover_item *item, xlog_recover_inode_pass2()
2529 if (item->ri_buf[0].i_len == sizeof(xfs_inode_log_format_t)) { xlog_recover_inode_pass2()
2530 in_f = item->ri_buf[0].i_addr; xlog_recover_inode_pass2()
2534 error = xfs_inode_item_format_convert(&item->ri_buf[0], in_f); xlog_recover_inode_pass2()
2578 dicp = item->ri_buf[1].i_addr; xlog_recover_inode_pass2()
2582 __func__, item, in_f->ilf_ino); xlog_recover_inode_pass2()
2641 __func__, item, dip, bp, in_f->ilf_ino); xlog_recover_inode_pass2()
2654 __func__, item, dip, bp, in_f->ilf_ino); xlog_recover_inode_pass2()
2665 __func__, item, dip, bp, in_f->ilf_ino, xlog_recover_inode_pass2()
2677 item, dip, bp, in_f->ilf_ino, dicp->di_forkoff); xlog_recover_inode_pass2()
2682 if (unlikely(item->ri_buf[1].i_len > isize)) { xlog_recover_inode_pass2()
2687 __func__, item->ri_buf[1].i_len, item); xlog_recover_inode_pass2()
2696 if (item->ri_buf[1].i_len > isize) { xlog_recover_inode_pass2()
2698 item->ri_buf[1].i_addr + isize, xlog_recover_inode_pass2()
2699 item->ri_buf[1].i_len - isize); xlog_recover_inode_pass2()
2716 len = item->ri_buf[2].i_len; xlog_recover_inode_pass2()
2717 src = item->ri_buf[2].i_addr; xlog_recover_inode_pass2()
2754 len = item->ri_buf[attr_index].i_len; xlog_recover_inode_pass2()
2755 src = item->ri_buf[attr_index].i_addr; xlog_recover_inode_pass2()
2802 * structure, so that we know not to do any dquot item or dquot buffer recovery,
2808 struct xlog_recover_item *item) xlog_recover_quotaoff_pass1()
2810 xfs_qoff_logformat_t *qoff_f = item->ri_buf[0].i_addr; xlog_recover_quotaoff_pass1()
2834 struct xlog_recover_item *item, xlog_recover_dquot_pass2()
2851 recddq = item->ri_buf[1].i_addr; xlog_recover_dquot_pass2()
2856 if (item->ri_buf[1].i_len < sizeof(xfs_disk_dquot_t)) { xlog_recover_dquot_pass2()
2858 item->ri_buf[1].i_len, __func__); xlog_recover_dquot_pass2()
2880 dq_f = item->ri_buf[0].i_addr; xlog_recover_dquot_pass2()
2917 memcpy(ddq, recddq, item->ri_buf[1].i_len); xlog_recover_dquot_pass2()
2935 * item from the efi format structure which was logged on disk.
2943 struct xlog_recover_item *item, xlog_recover_efi_pass2()
2951 efi_formatp = item->ri_buf[0].i_addr; xlog_recover_efi_pass2()
2954 error = xfs_efi_copy_format(&item->ri_buf[0], &efip->efi_format); xlog_recover_efi_pass2()
2984 struct xlog_recover_item *item) xlog_recover_efd_pass2()
2993 efd_formatp = item->ri_buf[0].i_addr; xlog_recover_efd_pass2()
2994 ASSERT((item->ri_buf[0].i_len == (sizeof(xfs_efd_log_format_32_t) + xlog_recover_efd_pass2()
2996 (item->ri_buf[0].i_len == (sizeof(xfs_efd_log_format_64_t) + xlog_recover_efd_pass2()
3041 xlog_recover_item_t *item) xlog_recover_do_icreate_pass2()
3056 icl = (struct xfs_icreate_log *)item->ri_buf[0].i_addr; xlog_recover_do_icreate_pass2()
3157 struct xlog_recover_item *item) xlog_recover_buffer_ra_pass2()
3159 struct xfs_buf_log_format *buf_f = item->ri_buf[0].i_addr; xlog_recover_buffer_ra_pass2()
3174 struct xlog_recover_item *item) xlog_recover_inode_ra_pass2()
3181 if (item->ri_buf[0].i_len == sizeof(struct xfs_inode_log_format)) { xlog_recover_inode_ra_pass2()
3182 ilfp = item->ri_buf[0].i_addr; xlog_recover_inode_ra_pass2()
3186 error = xfs_inode_item_format_convert(&item->ri_buf[0], ilfp); xlog_recover_inode_ra_pass2()
3201 struct xlog_recover_item *item) xlog_recover_dquot_ra_pass2()
3213 recddq = item->ri_buf[1].i_addr; xlog_recover_dquot_ra_pass2()
3216 if (item->ri_buf[1].i_len < sizeof(struct xfs_disk_dquot)) xlog_recover_dquot_ra_pass2()
3224 dq_f = item->ri_buf[0].i_addr; xlog_recover_dquot_ra_pass2()
3239 struct xlog_recover_item *item) xlog_recover_ra_pass2()
3241 switch (ITEM_TYPE(item)) { xlog_recover_ra_pass2()
3243 xlog_recover_buffer_ra_pass2(log, item); xlog_recover_ra_pass2()
3246 xlog_recover_inode_ra_pass2(log, item); xlog_recover_ra_pass2()
3249 xlog_recover_dquot_ra_pass2(log, item); xlog_recover_ra_pass2()
3263 struct xlog_recover_item *item) xlog_recover_commit_pass1()
3265 trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS1); xlog_recover_commit_pass1()
3267 switch (ITEM_TYPE(item)) { xlog_recover_commit_pass1()
3269 return xlog_recover_buffer_pass1(log, item); xlog_recover_commit_pass1()
3271 return xlog_recover_quotaoff_pass1(log, item); xlog_recover_commit_pass1()
3280 xfs_warn(log->l_mp, "%s: invalid item type (%d)", xlog_recover_commit_pass1()
3281 __func__, ITEM_TYPE(item)); xlog_recover_commit_pass1()
3292 struct xlog_recover_item *item) xlog_recover_commit_pass2()
3294 trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS2); xlog_recover_commit_pass2()
3296 switch (ITEM_TYPE(item)) { xlog_recover_commit_pass2()
3298 return xlog_recover_buffer_pass2(log, buffer_list, item, xlog_recover_commit_pass2()
3301 return xlog_recover_inode_pass2(log, buffer_list, item, xlog_recover_commit_pass2()
3304 return xlog_recover_efi_pass2(log, item, trans->r_lsn); xlog_recover_commit_pass2()
3306 return xlog_recover_efd_pass2(log, item); xlog_recover_commit_pass2()
3308 return xlog_recover_dquot_pass2(log, buffer_list, item, xlog_recover_commit_pass2()
3311 return xlog_recover_do_icreate_pass2(log, buffer_list, item); xlog_recover_commit_pass2()
3316 xfs_warn(log->l_mp, "%s: invalid item type (%d)", xlog_recover_commit_pass2()
3317 __func__, ITEM_TYPE(item)); xlog_recover_commit_pass2()
3330 struct xlog_recover_item *item; xlog_recover_items_pass2() local
3333 list_for_each_entry(item, item_list, ri_list) { list_for_each_entry()
3335 buffer_list, item); list_for_each_entry()
3358 struct xlog_recover_item *item; xlog_recover_commit_trans() local
3372 list_for_each_entry_safe(item, next, &trans->r_itemq, ri_list) { xlog_recover_commit_trans()
3375 error = xlog_recover_commit_pass1(log, trans, item); xlog_recover_commit_trans()
3378 xlog_recover_ra_pass2(log, item); xlog_recover_commit_trans()
3379 list_move_tail(&item->ri_list, &ra_list); xlog_recover_commit_trans()
3416 xlog_recover_item_t *item; xlog_recover_add_item() local
3418 item = kmem_zalloc(sizeof(xlog_recover_item_t), KM_SLEEP); xlog_recover_add_item()
3419 INIT_LIST_HEAD(&item->ri_list); xlog_recover_add_item()
3420 list_add_tail(&item->ri_list, head); xlog_recover_add_item()
3430 xlog_recover_item_t *item; xlog_recover_add_to_cont_trans() local
3453 item = list_entry(trans->r_itemq.prev, xlog_recover_item_t, ri_list); xlog_recover_add_to_cont_trans()
3455 old_ptr = item->ri_buf[item->ri_cnt-1].i_addr; xlog_recover_add_to_cont_trans()
3456 old_len = item->ri_buf[item->ri_cnt-1].i_len; xlog_recover_add_to_cont_trans()
3460 item->ri_buf[item->ri_cnt-1].i_len += len; xlog_recover_add_to_cont_trans()
3461 item->ri_buf[item->ri_cnt-1].i_addr = ptr; xlog_recover_add_to_cont_trans()
3462 trace_xfs_log_recover_item_add_cont(log, trans, item, 0); xlog_recover_add_to_cont_trans()
3477 * will appear in the current log item.
3487 xlog_recover_item_t *item; xlog_recover_add_to_trans() local
3523 item = list_entry(trans->r_itemq.prev, xlog_recover_item_t, ri_list); xlog_recover_add_to_trans()
3524 if (item->ri_total != 0 && xlog_recover_add_to_trans()
3525 item->ri_total == item->ri_cnt) { xlog_recover_add_to_trans()
3526 /* tail item is in use, get a new one */ xlog_recover_add_to_trans()
3528 item = list_entry(trans->r_itemq.prev, xlog_recover_add_to_trans()
3532 if (item->ri_total == 0) { /* first region to be added */ xlog_recover_add_to_trans()
3543 item->ri_total = in_f->ilf_size; xlog_recover_add_to_trans()
3544 item->ri_buf = xlog_recover_add_to_trans()
3545 kmem_zalloc(item->ri_total * sizeof(xfs_log_iovec_t), xlog_recover_add_to_trans()
3548 ASSERT(item->ri_total > item->ri_cnt); xlog_recover_add_to_trans()
3550 item->ri_buf[item->ri_cnt].i_addr = ptr; xlog_recover_add_to_trans()
3551 item->ri_buf[item->ri_cnt].i_len = len; xlog_recover_add_to_trans()
3552 item->ri_cnt++; xlog_recover_add_to_trans()
3553 trace_xfs_log_recover_item_add(log, trans, item, 0); xlog_recover_add_to_trans()
3566 xlog_recover_item_t *item, *n; xlog_recover_free_trans() local
3569 list_for_each_entry_safe(item, n, &trans->r_itemq, ri_list) { xlog_recover_free_trans()
3570 /* Free the regions in the item. */ xlog_recover_free_trans()
3571 list_del(&item->ri_list); xlog_recover_free_trans()
3572 for (i = 0; i < item->ri_cnt; i++) xlog_recover_free_trans()
3573 kmem_free(item->ri_buf[i].i_addr); xlog_recover_free_trans()
3574 /* Free the item itself */ xlog_recover_free_trans()
3575 kmem_free(item->ri_buf); xlog_recover_free_trans()
3576 kmem_free(item); xlog_recover_free_trans()
3780 * Process an extent free intent item that was recovered from
4474 * takes place in the log item type specific routines.
1578 xlog_recover_buffer_pass1( struct xlog *log, struct xlog_recover_item *item) xlog_recover_buffer_pass1() argument
1704 xlog_recover_do_inode_buffer( struct xfs_mount *mp, xlog_recover_item_t *item, struct xfs_buf *bp, xfs_buf_log_format_t *buf_f) xlog_recover_do_inode_buffer() argument
2173 xlog_recover_do_reg_buffer( struct xfs_mount *mp, xlog_recover_item_t *item, struct xfs_buf *bp, xfs_buf_log_format_t *buf_f) xlog_recover_do_reg_buffer() argument
2263 xlog_recover_do_dquot_buffer( struct xfs_mount *mp, struct xlog *log, struct xlog_recover_item *item, struct xfs_buf *bp, struct xfs_buf_log_format *buf_f) xlog_recover_do_dquot_buffer() argument
2321 xlog_recover_buffer_pass2( struct xlog *log, struct list_head *buffer_list, struct xlog_recover_item *item, xfs_lsn_t current_lsn) xlog_recover_buffer_pass2() argument
2509 xlog_recover_inode_pass2( struct xlog *log, struct list_head *buffer_list, struct xlog_recover_item *item, xfs_lsn_t current_lsn) xlog_recover_inode_pass2() argument
2806 xlog_recover_quotaoff_pass1( struct xlog *log, struct xlog_recover_item *item) xlog_recover_quotaoff_pass1() argument
2831 xlog_recover_dquot_pass2( struct xlog *log, struct list_head *buffer_list, struct xlog_recover_item *item, xfs_lsn_t current_lsn) xlog_recover_dquot_pass2() argument
2941 xlog_recover_efi_pass2( struct xlog *log, struct xlog_recover_item *item, xfs_lsn_t lsn) xlog_recover_efi_pass2() argument
2982 xlog_recover_efd_pass2( struct xlog *log, struct xlog_recover_item *item) xlog_recover_efd_pass2() argument
3038 xlog_recover_do_icreate_pass2( struct xlog *log, struct list_head *buffer_list, xlog_recover_item_t *item) xlog_recover_do_icreate_pass2() argument
3155 xlog_recover_buffer_ra_pass2( struct xlog *log, struct xlog_recover_item *item) xlog_recover_buffer_ra_pass2() argument
3172 xlog_recover_inode_ra_pass2( struct xlog *log, struct xlog_recover_item *item) xlog_recover_inode_ra_pass2() argument
3199 xlog_recover_dquot_ra_pass2( struct xlog *log, struct xlog_recover_item *item) xlog_recover_dquot_ra_pass2() argument
3237 xlog_recover_ra_pass2( struct xlog *log, struct xlog_recover_item *item) xlog_recover_ra_pass2() argument
3260 xlog_recover_commit_pass1( struct xlog *log, struct xlog_recover *trans, struct xlog_recover_item *item) xlog_recover_commit_pass1() argument
3288 xlog_recover_commit_pass2( struct xlog *log, struct xlog_recover *trans, struct list_head *buffer_list, struct xlog_recover_item *item) xlog_recover_commit_pass2() argument
H A Dxfs_buf_item.c53 * given buf log item.
115 * This returns the number of log iovecs needed to log the given buf log item.
227 /* copy the flags across from the base format item */ xfs_buf_item_format_segment()
304 * given log buf item. It fills the first entry with a buf log
336 * For icreate item based inode allocation, the buffers aren't written xfs_buf_item_format()
372 * This is called to pin the buffer associated with the buf log item in memory
375 * We also always take a reference to the buffer log item here so that the bli
376 * is held while the item is pinned in memory. This means that we can
399 * item which was previously pinned with a call to xfs_buf_item_pin().
401 * Also drop the reference to the buf item for the current transaction.
403 * then free up the buf log item and unlock the buffer.
407 * the log item is going to drop to zero we need to free the item's
442 * remove the log item from the transaction as we are xfs_buf_item_unpin()
460 * or may not have the item on the AIL. xfs_trans_ail_delete() xfs_buf_item_unpin()
478 * LRU reference and the buf log item. What we are about to do xfs_buf_item_unpin()
483 * buf item reference is removed by the xfs_buf_iodone() xfs_buf_item_unpin()
553 * Release the buffer associated with the buf log item. If there is no dirty
554 * logged data associated with the buffer recorded in the buf log item, then
555 * free the buf log item and remove the reference to it in the buffer.
560 * We unconditionally drop the transaction's reference to the log item. If the
561 * item was logged, then another reference was taken when it was pinned, so we
566 * If the XFS_BLI_HOLD flag is set in the buf log item, then free the log item
569 * free the item.
592 * Before possibly freeing the buf item, copy the per-transaction state xfs_buf_item_unlock()
594 * buffer log item. xfs_buf_item_unlock()
600 * If the buf item is marked stale, then don't do anything. We'll xfs_buf_item_unlock()
601 * unlock the buffer and free the buf item when the buffer is unpinned xfs_buf_item_unlock()
616 * If the buf item isn't tracking any data, free it, otherwise drop the xfs_buf_item_unlock()
618 * be the only reference to the buf item, so we free it anyway xfs_buf_item_unlock()
661 * buf log item in the on disk log resides now that the last log
743 * Allocate a new buf log item to go with the given buffer.
745 * buf log item. If there are other item's attached to the
747 * buf log item at the front.
762 * Check to see if there is already a buf log item for xfs_buf_item_init()
804 * Put the buf item into the list of items attached to the xfs_buf_item_init()
817 * item's bitmap.
898 * item's bitmap.
956 * This is called when the buf log item is no longer needed. It should
957 * free the buf log item associated with the given buffer and clear
958 * the buffer's pointer to the buf log item. If there are no more
981 * Add the given log item with its callback to the list of callbacks
984 * xfs_buf_iodone_callbacks() and link the log item into the list of
986 * entry in the list if there is a first, because the buf item code
987 * assumes that the buf log item is first.
1020 * list. it removes the first item from the list and then runs the callback.
1023 * have to care about maintaining a next item pointer.
1036 * confusion if the item is added to another buf. xfs_buf_do_callbacks()
1037 * Don't touch the log item after calling its xfs_buf_do_callbacks()
1048 * log item from the buffer's list and call the callback of each in turn.
1130 * It should remove the buf item from the AIL, and free the buf item.
1149 * have put this item on AIL because of the transaction was xfs_buf_iodone()
H A Dxfs_dquot_item.c39 * returns the number of iovecs needed to log the given dquot item.
53 * fills in the vector of log iovecs for the given dquot log item.
168 * here but wait for the flush to finish and remove the item from
195 * Unlock the dquot associated with the log item.
196 * Clear the fields of the dquot and dquot log item that
249 * Initialize the dquot log item for a newly allocated dquot.
273 * This returns the number of iovecs needed to log the given quotaoff item.
274 * We only need 1 iovec for an quotaoff item. It just logs the
304 * Pinning has no meaning for an quotaoff item, so just return.
313 * Since pinning has no meaning for an quotaoff item, unpinning does
324 * There isn't much you can do to push a quotaoff item. It is simply
346 * The quotaoff-start-item is logged only once and cannot be moved in the log,
425 * Allocate and initialize an quotaoff item of the correct quota type(s).
H A Dxfs_filestream.c125 struct xfs_fstrm_item *item = xfs_fstrm_free_func() local
128 xfs_filestream_put_ag(item->ip->i_mount, item->ag); xfs_fstrm_free_func()
130 trace_xfs_filestream_free(item->ip, item->ag); xfs_fstrm_free_func()
132 kmem_free(item); xfs_fstrm_free_func()
148 struct xfs_fstrm_item *item; xfs_filestream_pick_ag() local
260 item = kmem_alloc(sizeof(*item), KM_MAYFAIL); xfs_filestream_pick_ag()
261 if (!item) xfs_filestream_pick_ag()
264 item->ag = *agp; xfs_filestream_pick_ag()
265 item->ip = ip; xfs_filestream_pick_ag()
267 err = xfs_mru_cache_insert(mp->m_filestream, ip->i_ino, &item->mru); xfs_filestream_pick_ag()
277 kmem_free(item); xfs_filestream_pick_ag()
382 struct xfs_fstrm_item *item = xfs_filestream_new_ag() local
384 startag = (item->ag + 1) % mp->m_sb.sb_agcount; xfs_filestream_new_ag()
393 * Only free the item here so we skip over the old AG earlier. xfs_filestream_new_ag()
H A Dxfs_buf_item.h23 /* buf log item flags */
49 * This is the in core log item structure used to track information
54 xfs_log_item_t bli_item; /* common item structure */
H A Dxfs_inode_item.c33 kmem_zone_t *xfs_ili_zone; /* inode log item zone */
121 * This returns the number of iovecs needed to log the given inode item.
327 * log item. It fills the first item with an inode log format structure,
372 * item in memory so it cannot be written out.
389 * item which was previously pinned with a call to xfs_inode_item_pin().
442 * here but wait for the flush to finish and remove the item from xfs_inode_item_push()
469 * Unlock the inode associated with the inode log item.
470 * Clear the fields of the inode and inode log item that
493 * item in the on disk log resides now that the last log write of it completed
502 * before the inode item has been committed and inserted, then it is possible
511 * processing on the item.
556 * Initialize the inode log item for a newly allocated (in-core) inode.
574 * Free the inode log item and any memory hanging off of it.
587 * flushed to disk. It is responsible for removing the inode item
591 * To reduce AIL lock traffic as much as possible, we scan the buffer log item
610 * attach them to the current inode log item. xfs_iflush_done()
634 * while we have the item, do the unlocked check for needing xfs_iflush_done()
650 * We only want to pull the item from the AIL if it is xfs_iflush_done()
695 * responsible for removing the inode item from the AIL if it has not been
H A Dxfs_log_cil.c83 * Prepare the log item for insertion into the CIL. Calculate the difference in
84 * log space and vectors it will consume, and if it is a new item pin it as
102 * If there is no old LV, this is the first time we've seen the item in xfs_cil_prepare_item()
116 /* attach new log vector to log item */ xfs_cil_prepare_item()
120 * If this is the first time the item is being committed to the xfs_cil_prepare_item()
121 * CIL, store the sequence number on the log item so we can xfs_cil_prepare_item()
123 * the item is being committed into. xfs_cil_prepare_item()
130 * Format log item into a flat buffers
133 * changes on the log item. This enables us to relog the item in memory and
137 * This function builds a vector for the changes in each log item in the
139 * item, allocates them and formats the vector for the item into the buffer.
140 * The buffer is then attached to the log item are then inserted into the
148 * item/region encapsulation.
165 /* Bail out if we didn't find a log item. */ xlog_cil_insert_format_items()
212 /* grab the old item if it exists for reservation accounting */ xlog_cil_insert_format_items()
225 /* compare to existing item size */ xlog_cil_insert_format_items()
235 * set the item up as though it is a new insertion so xlog_cil_insert_format_items()
272 * consumed by the item. Add the space to the checkpoint ticket and calculate
311 * Only move the item if it isn't already at the tail. This is xlog_cil_insert_items()
313 * an item that is already the only item in the CIL. xlog_cil_insert_items()
515 struct xfs_log_item *item; xlog_cil_push() local
517 item = list_first_entry(&cil->xc_cil, xlog_cil_push()
519 list_del_init(&item->li_cil); xlog_cil_push()
521 ctx->lv_chain = item->li_lv; xlog_cil_push()
523 lv->lv_next = item->li_lv; xlog_cil_push()
524 lv = item->li_lv; xlog_cil_push()
525 item->li_lv = NULL; xlog_cil_push()
767 * To do this, we need to format the item, pin it in memory if required and
918 * Check if the current log item was first committed in this sequence.
919 * We can't rely on just the log item being in the CIL, we have to check
924 * transaction commit process when deciding what to format into the item.
938 * li_seq is written on the first commit of a log item to record the xfs_log_item_in_current_chkpt()
H A Dxfs_extfree_item.h37 * This is the "extent free intention" log item. It is used to log the fact
39 * "extent free done" log item described below.
74 * This is the "extent free done" log item. It is used to log
75 * the fact that some extents earlier mentioned in an efi item
H A Dxfs_trans_extfree.c32 * log item that will hold nextents worth of extents. The
49 * Get a log_item_desc to point at the new item. xfs_trans_get_efi()
87 * log item that will hold nextents worth of extents. The
105 * Get a log_item_desc to point at the new item. xfs_trans_get_efd()
H A Dxfs_trans_priv.h47 * searched to see if the object is a designated cursor item. If it is, it is
53 * low bit of the item pointer is set if the cursor has been invalidated so
59 struct xfs_log_item *item; member in struct:xfs_ail_cursor
89 * Return a pointer to the first item in the AIL. If the AIL is empty, then
H A Dxfs_trans.h43 uint li_type; /* item type */
45 struct xfs_log_item *li_bio_list; /* buffer item list */
48 /* buffer item iodone */
76 void xfs_log_item_init(struct xfs_mount *mp, struct xfs_log_item *item,
127 struct list_head t_items; /* log item descriptors */
H A Dxfs_trans_buf.c71 * If the buffer does not yet have a buf log item associated with it,
72 * then allocate one for it. Then add the buf item to the transaction.
98 * Take a reference for this transaction on the buf item. _xfs_trans_bjoin()
103 * Get a log_item_desc to point at the new item. _xfs_trans_bjoin()
398 * the item from the AIL before we should. xfs_trans_brelse()
406 * Free up the log item descriptor tracking the released item. xfs_trans_brelse()
411 * Clear the hold flag in the buf log item if it is set. xfs_trans_brelse()
420 * Drop our reference to the buf log item. xfs_trans_brelse()
425 * If the buf item is not tracking data in the log, then xfs_trans_brelse()
446 * Mark the buffer as not needing to be unlocked when the buf item's
514 * item from the AIL and free it when the buffer is flushed xfs_trans_log_buf()
564 * get rid of the buf log item at this point because the buffer may still be
568 * keep the buffer locked so that the buffer and buf log item are not reused.
571 * the buf item. This will be used at recovery time to determine that copies
574 * We mark the item descriptor and the transaction dirty so that we'll hold
/linux-4.4.14/drivers/misc/
H A Dspear13xx_pcie_gadget.c224 static struct pcie_gadget_target *to_target(struct config_item *item) to_target() argument
226 return item ? to_target()
227 container_of(to_configfs_subsystem(to_config_group(item)), to_target()
231 static ssize_t pcie_gadget_link_show(struct config_item *item, char *buf) pcie_gadget_link_show() argument
233 struct pcie_app_reg __iomem *app_reg = to_target(item)->va_app_base; pcie_gadget_link_show()
241 static ssize_t pcie_gadget_link_store(struct config_item *item, pcie_gadget_link_store() argument
244 struct pcie_app_reg __iomem *app_reg = to_target(item)->va_app_base; pcie_gadget_link_store()
258 static ssize_t pcie_gadget_int_type_show(struct config_item *item, char *buf) pcie_gadget_int_type_show() argument
260 return sprintf(buf, "%s", to_target(item)->int_type); pcie_gadget_int_type_show()
263 static ssize_t pcie_gadget_int_type_store(struct config_item *item, pcie_gadget_int_type_store() argument
266 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_int_type_store()
294 static ssize_t pcie_gadget_no_of_msi_show(struct config_item *item, char *buf) pcie_gadget_no_of_msi_show() argument
296 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_no_of_msi_show()
297 struct pcie_app_reg __iomem *app_reg = to_target(item)->va_app_base; pcie_gadget_no_of_msi_show()
318 static ssize_t pcie_gadget_no_of_msi_store(struct config_item *item, pcie_gadget_no_of_msi_store() argument
323 ret = kstrtoul(buf, 0, &to_target(item)->requested_msi); pcie_gadget_no_of_msi_store()
333 static ssize_t pcie_gadget_inta_store(struct config_item *item, pcie_gadget_inta_store() argument
336 struct pcie_app_reg __iomem *app_reg = to_target(item)->va_app_base; pcie_gadget_inta_store()
354 static ssize_t pcie_gadget_send_msi_store(struct config_item *item, pcie_gadget_send_msi_store() argument
357 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_send_msi_store()
391 static ssize_t pcie_gadget_vendor_id_show(struct config_item *item, char *buf) pcie_gadget_vendor_id_show() argument
395 spear_dbi_read_reg(to_target(item), PCI_VENDOR_ID, 2, &id); pcie_gadget_vendor_id_show()
400 static ssize_t pcie_gadget_vendor_id_store(struct config_item *item, pcie_gadget_vendor_id_store() argument
410 spear_dbi_write_reg(to_target(item), PCI_VENDOR_ID, 2, id); pcie_gadget_vendor_id_store()
415 static ssize_t pcie_gadget_device_id_show(struct config_item *item, char *buf) pcie_gadget_device_id_show() argument
419 spear_dbi_read_reg(to_target(item), PCI_DEVICE_ID, 2, &id); pcie_gadget_device_id_show()
424 static ssize_t pcie_gadget_device_id_store(struct config_item *item, pcie_gadget_device_id_store() argument
434 spear_dbi_write_reg(to_target(item), PCI_DEVICE_ID, 2, id); pcie_gadget_device_id_store()
439 static ssize_t pcie_gadget_bar0_size_show(struct config_item *item, char *buf) pcie_gadget_bar0_size_show() argument
441 return sprintf(buf, "%lx", to_target(item)->bar0_size); pcie_gadget_bar0_size_show()
444 static ssize_t pcie_gadget_bar0_size_store(struct config_item *item, pcie_gadget_bar0_size_store() argument
447 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_bar0_size_store()
484 static ssize_t pcie_gadget_bar0_address_show(struct config_item *item, pcie_gadget_bar0_address_show() argument
487 struct pcie_app_reg __iomem *app_reg = to_target(item)->va_app_base; pcie_gadget_bar0_address_show()
494 static ssize_t pcie_gadget_bar0_address_store(struct config_item *item, pcie_gadget_bar0_address_store() argument
497 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_bar0_address_store()
518 static ssize_t pcie_gadget_bar0_rw_offset_show(struct config_item *item, pcie_gadget_bar0_rw_offset_show() argument
521 return sprintf(buf, "%lx", to_target(item)->bar0_rw_offset); pcie_gadget_bar0_rw_offset_show()
524 static ssize_t pcie_gadget_bar0_rw_offset_store(struct config_item *item, pcie_gadget_bar0_rw_offset_store() argument
537 to_target(item)->bar0_rw_offset = offset; pcie_gadget_bar0_rw_offset_store()
542 static ssize_t pcie_gadget_bar0_data_show(struct config_item *item, char *buf) pcie_gadget_bar0_data_show() argument
544 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_bar0_data_show()
555 static ssize_t pcie_gadget_bar0_data_store(struct config_item *item, pcie_gadget_bar0_data_store() argument
558 struct spear_pcie_gadget_config *config = to_target(item) pcie_gadget_bar0_data_store()
/linux-4.4.14/drivers/soc/qcom/
H A Dsmem.c79 /* Highest accepted item number, for both global and private heaps */
197 * struct smem_private_entry - header of each item in the private partition
199 * @item: identifying number of the smem item
207 __le16 item; member in struct:smem_private_entry
294 unsigned item, qcom_smem_alloc_private()
315 if (le16_to_cpu(hdr->item) == item) qcom_smem_alloc_private()
329 hdr->item = cpu_to_le16(item); qcom_smem_alloc_private()
346 unsigned item, qcom_smem_alloc_global()
352 if (WARN_ON(item >= SMEM_ITEM_COUNT)) qcom_smem_alloc_global()
356 entry = &header->toc[item]; qcom_smem_alloc_global()
368 * Ensure the header is consistent before we mark the item allocated, qcom_smem_alloc_global()
369 * so that remote processors will get a consistent view of the item qcom_smem_alloc_global()
382 * qcom_smem_alloc() - allocate space for a smem item
384 * @item: smem item handle
387 * Allocate space for a given smem item of size @size, given that the item is
390 int qcom_smem_alloc(unsigned host, unsigned item, size_t size) qcom_smem_alloc() argument
398 if (item < SMEM_ITEM_LAST_FIXED) { qcom_smem_alloc()
400 "Rejecting allocation of static entry %d\n", item); qcom_smem_alloc()
411 ret = qcom_smem_alloc_private(__smem, host, item, size); qcom_smem_alloc()
413 ret = qcom_smem_alloc_global(__smem, item, size); qcom_smem_alloc()
422 unsigned item, qcom_smem_get_global()
431 if (WARN_ON(item >= SMEM_ITEM_COUNT)) qcom_smem_get_global()
435 entry = &header->toc[item]; qcom_smem_get_global()
456 unsigned item, qcom_smem_get_private()
474 if (le16_to_cpu(e->item) == item) { qcom_smem_get_private()
489 * qcom_smem_get() - resolve ptr of size of a smem item
491 * @item: smem item handle
492 * @size: pointer to be filled out with size of the item
494 * Looks up smem item and returns pointer to it. Size of smem
495 * item is returned in @size.
497 void *qcom_smem_get(unsigned host, unsigned item, size_t *size) qcom_smem_get() argument
513 ptr = qcom_smem_get_private(__smem, host, item, size); qcom_smem_get()
515 ptr = qcom_smem_get_global(__smem, item, size); qcom_smem_get()
560 dev_err(smem->dev, "Unable to read the version item\n"); qcom_smem_get_sbl_version()
565 dev_err(smem->dev, "Version item is too small\n"); qcom_smem_get_sbl_version()
292 qcom_smem_alloc_private(struct qcom_smem *smem, unsigned host, unsigned item, size_t size) qcom_smem_alloc_private() argument
345 qcom_smem_alloc_global(struct qcom_smem *smem, unsigned item, size_t size) qcom_smem_alloc_global() argument
421 qcom_smem_get_global(struct qcom_smem *smem, unsigned item, size_t *size) qcom_smem_get_global() argument
454 qcom_smem_get_private(struct qcom_smem *smem, unsigned host, unsigned item, size_t *size) qcom_smem_get_private() argument
/linux-4.4.14/drivers/gpu/drm/sis/
H A Dsis_mm.c88 struct sis_memblock *item; sis_drm_alloc() local
102 item = kzalloc(sizeof(*item), GFP_KERNEL); sis_drm_alloc()
103 if (!item) { sis_drm_alloc()
111 &item->mm_node, sis_drm_alloc()
114 offset = item->mm_node.start; sis_drm_alloc()
117 item->req.size = mem->size; sis_drm_alloc()
118 sis_malloc(&item->req); sis_drm_alloc()
119 if (item->req.size == 0) sis_drm_alloc()
121 offset = item->req.offset; sis_drm_alloc()
124 &item->mm_node, sis_drm_alloc()
127 offset = item->mm_node.start; sis_drm_alloc()
133 retval = idr_alloc(&dev_priv->object_idr, item, 1, 0, GFP_KERNEL); sis_drm_alloc()
138 list_add(&item->owner_list, &file_priv->obj_list); sis_drm_alloc()
150 drm_mm_remove_node(&item->mm_node); sis_drm_alloc()
152 kfree(item); sis_drm_alloc()
/linux-4.4.14/arch/arm/mach-s3c24xx/
H A Dmach-vr1000.c56 #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
57 #define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
58 #define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
59 #define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
63 #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
64 #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
65 #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
66 #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
H A Dmach-bast.c67 #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
68 #define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
69 #define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
70 #define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
74 #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
75 #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
76 #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
77 #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
/linux-4.4.14/fs/btrfs/tests/
H A Dextent-buffer-tests.c30 struct btrfs_item *item; test_btrfs_split_item() local
70 item = btrfs_item_nr(0); test_btrfs_split_item()
78 * space in this leaf to split the item without having to split the test_btrfs_split_item()
83 test_msg("Split item failed %d\n", ret); test_btrfs_split_item()
99 item = btrfs_item_nr(0); test_btrfs_split_item()
100 if (btrfs_item_size(eb, item) != strlen(split1)) { test_btrfs_split_item()
124 item = btrfs_item_nr(1); test_btrfs_split_item()
125 if (btrfs_item_size(eb, item) != strlen(split2)) { test_btrfs_split_item()
144 test_msg("Second split item failed %d\n", ret); test_btrfs_split_item()
156 item = btrfs_item_nr(0); test_btrfs_split_item()
157 if (btrfs_item_size(eb, item) != strlen(split3)) { test_btrfs_split_item()
180 item = btrfs_item_nr(1); test_btrfs_split_item()
181 if (btrfs_item_size(eb, item) != strlen(split4)) { test_btrfs_split_item()
204 item = btrfs_item_nr(2); test_btrfs_split_item()
205 if (btrfs_item_size(eb, item) != strlen(split2)) { test_btrfs_split_item()
H A Dqgroup-tests.c38 struct btrfs_extent_item *item; insert_normal_tree_ref() local
44 u32 size = sizeof(*item) + sizeof(*iref) + sizeof(*block_info); insert_normal_tree_ref()
68 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); insert_normal_tree_ref()
69 btrfs_set_extent_refs(leaf, item, 1); insert_normal_tree_ref()
70 btrfs_set_extent_generation(leaf, item, 1); insert_normal_tree_ref()
71 btrfs_set_extent_flags(leaf, item, BTRFS_EXTENT_FLAG_TREE_BLOCK); insert_normal_tree_ref()
72 block_info = (struct btrfs_tree_block_info *)(item + 1); insert_normal_tree_ref()
91 struct btrfs_extent_item *item; add_tree_ref() local
117 item = btrfs_item_ptr(path->nodes[0], path->slots[0], add_tree_ref()
119 refs = btrfs_extent_refs(path->nodes[0], item); add_tree_ref()
120 btrfs_set_extent_refs(path->nodes[0], item, refs + 1); add_tree_ref()
175 struct btrfs_extent_item *item; remove_extent_ref() local
201 item = btrfs_item_ptr(path->nodes[0], path->slots[0], remove_extent_ref()
203 refs = btrfs_extent_refs(path->nodes[0], item); remove_extent_ref()
204 btrfs_set_extent_refs(path->nodes[0], item, refs - 1); remove_extent_ref()
/linux-4.4.14/drivers/net/
H A Dnetconsole.c91 * @item: Links us into the configfs subsystem hierarchy.
111 struct config_item item; member in struct:netconsole_target
142 if (config_item_name(&nt->item)) netconsole_target_get()
143 config_item_get(&nt->item); netconsole_target_get()
148 if (config_item_name(&nt->item)) netconsole_target_put()
149 config_item_put(&nt->item); netconsole_target_put()
247 static struct netconsole_target *to_target(struct config_item *item) to_target() argument
249 return item ? to_target()
250 container_of(item, struct netconsole_target, item) : to_target()
258 static ssize_t enabled_show(struct config_item *item, char *buf) enabled_show() argument
260 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->enabled); enabled_show()
263 static ssize_t extended_show(struct config_item *item, char *buf) extended_show() argument
265 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->extended); extended_show()
268 static ssize_t dev_name_show(struct config_item *item, char *buf) dev_name_show() argument
270 return snprintf(buf, PAGE_SIZE, "%s\n", to_target(item)->np.dev_name); dev_name_show()
273 static ssize_t local_port_show(struct config_item *item, char *buf) local_port_show() argument
275 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->np.local_port); local_port_show()
278 static ssize_t remote_port_show(struct config_item *item, char *buf) remote_port_show() argument
280 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->np.remote_port); remote_port_show()
283 static ssize_t local_ip_show(struct config_item *item, char *buf) local_ip_show() argument
285 struct netconsole_target *nt = to_target(item); local_ip_show()
293 static ssize_t remote_ip_show(struct config_item *item, char *buf) remote_ip_show() argument
295 struct netconsole_target *nt = to_target(item); remote_ip_show()
303 static ssize_t local_mac_show(struct config_item *item, char *buf) local_mac_show() argument
305 struct net_device *dev = to_target(item)->np.dev; local_mac_show()
311 static ssize_t remote_mac_show(struct config_item *item, char *buf) remote_mac_show() argument
313 return snprintf(buf, PAGE_SIZE, "%pM\n", to_target(item)->np.remote_mac); remote_mac_show()
323 static ssize_t enabled_store(struct config_item *item, enabled_store() argument
326 struct netconsole_target *nt = to_target(item); enabled_store()
382 static ssize_t extended_store(struct config_item *item, const char *buf, extended_store() argument
385 struct netconsole_target *nt = to_target(item); extended_store()
392 config_item_name(&nt->item)); extended_store()
414 static ssize_t dev_name_store(struct config_item *item, const char *buf, dev_name_store() argument
417 struct netconsole_target *nt = to_target(item); dev_name_store()
423 config_item_name(&nt->item)); dev_name_store()
439 static ssize_t local_port_store(struct config_item *item, const char *buf, local_port_store() argument
442 struct netconsole_target *nt = to_target(item); local_port_store()
448 config_item_name(&nt->item)); local_port_store()
462 static ssize_t remote_port_store(struct config_item *item, remote_port_store() argument
465 struct netconsole_target *nt = to_target(item); remote_port_store()
471 config_item_name(&nt->item)); remote_port_store()
485 static ssize_t local_ip_store(struct config_item *item, const char *buf, local_ip_store() argument
488 struct netconsole_target *nt = to_target(item); local_ip_store()
493 config_item_name(&nt->item)); local_ip_store()
521 static ssize_t remote_ip_store(struct config_item *item, const char *buf, remote_ip_store() argument
524 struct netconsole_target *nt = to_target(item); remote_ip_store()
529 config_item_name(&nt->item)); remote_ip_store()
557 static ssize_t remote_mac_store(struct config_item *item, const char *buf, remote_mac_store() argument
560 struct netconsole_target *nt = to_target(item); remote_mac_store()
566 config_item_name(&nt->item)); remote_mac_store()
610 static void netconsole_target_release(struct config_item *item) netconsole_target_release() argument
612 kfree(to_target(item)); netconsole_target_release()
650 config_item_init_type_name(&nt->item, name, &netconsole_target_type); make_netconsole_target()
657 return &nt->item; make_netconsole_target()
661 struct config_item *item) drop_netconsole_target()
664 struct netconsole_target *nt = to_target(item); drop_netconsole_target()
677 config_item_put(&nt->item); drop_netconsole_target()
660 drop_netconsole_target(struct config_group *group, struct config_item *item) drop_netconsole_target() argument
/linux-4.4.14/fs/dlm/
H A Dconfig.c106 static ssize_t cluster_cluster_name_show(struct config_item *item, char *buf) cluster_cluster_name_show() argument
108 struct dlm_cluster *cl = config_item_to_cluster(item); cluster_cluster_name_show()
112 static ssize_t cluster_cluster_name_store(struct config_item *item, cluster_cluster_name_store() argument
115 struct dlm_cluster *cl = config_item_to_cluster(item); cluster_cluster_name_store()
148 static ssize_t cluster_##name##_store(struct config_item *item, \
151 struct dlm_cluster *cl = config_item_to_cluster(item); \
155 static ssize_t cluster_##name##_show(struct config_item *item, char *buf) \
157 struct dlm_cluster *cl = config_item_to_cluster(item); \
224 struct config_item item; member in struct:dlm_comm
237 struct config_item item; member in struct:dlm_node
332 return i ? container_of(i, struct dlm_comm, item) : NULL; config_item_to_comm()
337 return i ? container_of(i, struct dlm_node, item) : NULL; config_item_to_node()
481 config_item_init_type_name(&cm->item, name, &comm_type); make_comm()
490 return &cm->item; make_comm()
519 config_item_init_type_name(&nd->item, name, &node_type); make_node()
529 return &nd->item; make_node()
578 static ssize_t comm_nodeid_show(struct config_item *item, char *buf) comm_nodeid_show() argument
580 return sprintf(buf, "%d\n", config_item_to_comm(item)->nodeid); comm_nodeid_show()
583 static ssize_t comm_nodeid_store(struct config_item *item, const char *buf, comm_nodeid_store() argument
586 int rc = kstrtoint(buf, 0, &config_item_to_comm(item)->nodeid); comm_nodeid_store()
593 static ssize_t comm_local_show(struct config_item *item, char *buf) comm_local_show() argument
595 return sprintf(buf, "%d\n", config_item_to_comm(item)->local); comm_local_show()
598 static ssize_t comm_local_store(struct config_item *item, const char *buf, comm_local_store() argument
601 struct dlm_comm *cm = config_item_to_comm(item); comm_local_store()
611 static ssize_t comm_addr_store(struct config_item *item, const char *buf, comm_addr_store() argument
614 struct dlm_comm *cm = config_item_to_comm(item); comm_addr_store()
640 static ssize_t comm_addr_list_show(struct config_item *item, char *buf) comm_addr_list_show() argument
642 struct dlm_comm *cm = config_item_to_comm(item); comm_addr_list_show()
698 static ssize_t node_nodeid_show(struct config_item *item, char *buf) node_nodeid_show() argument
700 return sprintf(buf, "%d\n", config_item_to_node(item)->nodeid); node_nodeid_show()
703 static ssize_t node_nodeid_store(struct config_item *item, const char *buf, node_nodeid_store() argument
706 struct dlm_node *nd = config_item_to_node(item); node_nodeid_store()
717 static ssize_t node_weight_show(struct config_item *item, char *buf) node_weight_show() argument
719 return sprintf(buf, "%d\n", config_item_to_node(item)->weight); node_weight_show()
722 static ssize_t node_weight_store(struct config_item *item, const char *buf, node_weight_store() argument
725 int rc = kstrtoint(buf, 0, &config_item_to_node(item)->weight); node_weight_store()
793 config_item_put(&cm->item); put_comm()
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/
H A Dpinger.c132 struct timeout_item *item; pinger_check_timeout() local
137 list_for_each_entry(item, &timeout_list, ti_chain) { pinger_check_timeout()
138 int ti_timeout = item->ti_timeout; pinger_check_timeout()
235 struct timeout_item *item; ptlrpc_pinger_main() local
239 list_for_each_entry(item, &timeout_list, ti_chain) { ptlrpc_pinger_main()
240 item->ti_cb(item, item->ti_cb_data); ptlrpc_pinger_main()
430 struct timeout_item *item, *tmp; ptlrpc_pinger_register_timeout() local
434 list_for_each_entry(item, &timeout_list, ti_chain) ptlrpc_pinger_register_timeout()
435 if (item->ti_event == event) ptlrpc_pinger_register_timeout()
438 item = ptlrpc_new_timeout(time, event, cb, data); ptlrpc_pinger_register_timeout()
439 if (item) { ptlrpc_pinger_register_timeout()
442 list_add(&item->ti_chain, &tmp->ti_chain); ptlrpc_pinger_register_timeout()
446 list_add(&item->ti_chain, &timeout_list); ptlrpc_pinger_register_timeout()
449 return item; ptlrpc_pinger_register_timeout()
476 struct timeout_item *ti = NULL, *item; ptlrpc_del_timeout_client() local
486 list_for_each_entry(item, &timeout_list, ti_chain) { ptlrpc_del_timeout_client()
487 if (item->ti_event == event) { ptlrpc_del_timeout_client()
488 ti = item; ptlrpc_del_timeout_client()
504 struct timeout_item *item, *tmp; ptlrpc_pinger_remove_timeouts() local
507 list_for_each_entry_safe(item, tmp, &timeout_list, ti_chain) { ptlrpc_pinger_remove_timeouts()
508 LASSERT(list_empty(&item->ti_obd_list)); ptlrpc_pinger_remove_timeouts()
509 list_del(&item->ti_chain); ptlrpc_pinger_remove_timeouts()
510 kfree(item); ptlrpc_pinger_remove_timeouts()
/linux-4.4.14/mm/
H A Dlist_lru.c109 bool list_lru_add(struct list_lru *lru, struct list_head *item) list_lru_add() argument
111 int nid = page_to_nid(virt_to_page(item)); list_lru_add()
116 if (list_empty(item)) { list_lru_add()
117 l = list_lru_from_kmem(nlru, item); list_lru_add()
118 list_add_tail(item, &l->list); list_lru_add()
128 bool list_lru_del(struct list_lru *lru, struct list_head *item) list_lru_del() argument
130 int nid = page_to_nid(virt_to_page(item)); list_lru_del()
135 if (!list_empty(item)) { list_lru_del()
136 l = list_lru_from_kmem(nlru, item); list_lru_del()
137 list_del_init(item); list_lru_del()
147 void list_lru_isolate(struct list_lru_one *list, struct list_head *item) list_lru_isolate() argument
149 list_del_init(item); list_lru_isolate()
154 void list_lru_isolate_move(struct list_lru_one *list, struct list_head *item, list_lru_isolate_move() argument
157 list_move(item, head); list_lru_isolate_move()
206 struct list_head *item, *n; __list_lru_walk_one() local
212 list_for_each_safe(item, n, &l->list) { __list_lru_walk_one()
223 ret = isolate(item, l, &nlru->lock, cb_arg); __list_lru_walk_one()
238 list_move_tail(item, &l->list); __list_lru_walk_one()
H A Dvmstat.c221 void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, __mod_zone_page_state() argument
225 s8 __percpu *p = pcp->vm_stat_diff + item; __mod_zone_page_state()
234 zone_page_state_add(x, zone, item); __mod_zone_page_state()
264 void __inc_zone_state(struct zone *zone, enum zone_stat_item item) __inc_zone_state() argument
267 s8 __percpu *p = pcp->vm_stat_diff + item; __inc_zone_state()
275 zone_page_state_add(v + overstep, zone, item); __inc_zone_state()
280 void __inc_zone_page_state(struct page *page, enum zone_stat_item item) __inc_zone_page_state() argument
282 __inc_zone_state(page_zone(page), item); __inc_zone_page_state() local
286 void __dec_zone_state(struct zone *zone, enum zone_stat_item item) __dec_zone_state() argument
289 s8 __percpu *p = pcp->vm_stat_diff + item; __dec_zone_state()
297 zone_page_state_add(v - overstep, zone, item); __dec_zone_state()
302 void __dec_zone_page_state(struct page *page, enum zone_stat_item item) __dec_zone_page_state() argument
304 __dec_zone_state(page_zone(page), item); __dec_zone_page_state() local
321 static inline void mod_state(struct zone *zone, enum zone_stat_item item, mod_state() argument
325 s8 __percpu *p = pcp->vm_stat_diff + item; mod_state()
356 zone_page_state_add(z, zone, item); mod_state()
359 void mod_zone_page_state(struct zone *zone, enum zone_stat_item item, mod_zone_page_state() argument
362 mod_state(zone, item, delta, 0); mod_zone_page_state()
366 void inc_zone_state(struct zone *zone, enum zone_stat_item item) inc_zone_state() argument
368 mod_state(zone, item, 1, 1); inc_zone_state()
371 void inc_zone_page_state(struct page *page, enum zone_stat_item item) inc_zone_page_state() argument
373 mod_state(page_zone(page), item, 1, 1); inc_zone_page_state() local
377 void dec_zone_page_state(struct page *page, enum zone_stat_item item) dec_zone_page_state() argument
379 mod_state(page_zone(page), item, -1, -1); dec_zone_page_state() local
386 void mod_zone_page_state(struct zone *zone, enum zone_stat_item item, mod_zone_page_state() argument
392 __mod_zone_page_state(zone, item, delta); mod_zone_page_state()
397 void inc_zone_state(struct zone *zone, enum zone_stat_item item) inc_zone_state() argument
402 __inc_zone_state(zone, item); inc_zone_state()
406 void inc_zone_page_state(struct page *page, enum zone_stat_item item) inc_zone_page_state() argument
413 __inc_zone_state(zone, item); inc_zone_page_state()
418 void dec_zone_page_state(struct page *page, enum zone_stat_item item) dec_zone_page_state() argument
423 __dec_zone_page_state(page, item); dec_zone_page_state()
596 * Determine the per node value of a stat item.
598 unsigned long node_page_state(int node, enum zone_stat_item item) node_page_state() argument
604 zone_page_state(&zones[ZONE_DMA], item) + node_page_state()
607 zone_page_state(&zones[ZONE_DMA32], item) + node_page_state()
610 zone_page_state(&zones[ZONE_HIGHMEM], item) + node_page_state()
612 zone_page_state(&zones[ZONE_NORMAL], item) + node_page_state()
613 zone_page_state(&zones[ZONE_MOVABLE], item); node_page_state()
/linux-4.4.14/arch/powerpc/platforms/powernv/
H A Dopal-prd.c164 struct opal_prd_msg_queue_item *item; opal_prd_read() local
170 if (count < sizeof(item->msg)) opal_prd_read()
176 item = NULL; opal_prd_read()
182 item = list_first_entry(&opal_prd_msg_queue, opal_prd_read()
184 list_del(&item->list); opal_prd_read()
188 if (item) opal_prd_read()
200 size = be16_to_cpu(item->msg.size); opal_prd_read()
206 rc = copy_to_user(buf, &item->msg, size); opal_prd_read()
212 kfree(item); opal_prd_read()
219 list_add(&item->list, &opal_prd_msg_queue); opal_prd_read()
354 struct opal_prd_msg_queue_item *item; opal_prd_msg_notifier() local
363 /* Calculate total size of the message and item we need to store. The opal_prd_msg_notifier()
367 item_size = msg_size + sizeof(*item) - sizeof(item->msg); opal_prd_msg_notifier()
369 item = kzalloc(item_size, GFP_ATOMIC); opal_prd_msg_notifier()
370 if (!item) opal_prd_msg_notifier()
373 memcpy(&item->msg, msg->params, msg_size); opal_prd_msg_notifier()
376 list_add_tail(&item->list, &opal_prd_msg_queue); opal_prd_msg_notifier()
/linux-4.4.14/drivers/infiniband/core/
H A Dumem_odp.c44 static void ib_umem_notifier_start_account(struct ib_umem *item) ib_umem_notifier_start_account() argument
46 mutex_lock(&item->odp_data->umem_mutex); ib_umem_notifier_start_account()
50 if (item->odp_data->mn_counters_active) { ib_umem_notifier_start_account()
51 int notifiers_count = item->odp_data->notifiers_count++; ib_umem_notifier_start_account()
57 reinit_completion(&item->odp_data->notifier_completion); ib_umem_notifier_start_account()
59 mutex_unlock(&item->odp_data->umem_mutex); ib_umem_notifier_start_account()
62 static void ib_umem_notifier_end_account(struct ib_umem *item) ib_umem_notifier_end_account() argument
64 mutex_lock(&item->odp_data->umem_mutex); ib_umem_notifier_end_account()
68 if (item->odp_data->mn_counters_active) { ib_umem_notifier_end_account()
74 ++item->odp_data->notifiers_seq; ib_umem_notifier_end_account()
75 if (--item->odp_data->notifiers_count == 0) ib_umem_notifier_end_account()
76 complete_all(&item->odp_data->notifier_completion); ib_umem_notifier_end_account()
78 mutex_unlock(&item->odp_data->umem_mutex); ib_umem_notifier_end_account()
123 static int ib_umem_notifier_release_trampoline(struct ib_umem *item, u64 start, ib_umem_notifier_release_trampoline() argument
129 ib_umem_notifier_start_account(item); ib_umem_notifier_release_trampoline()
130 item->odp_data->dying = 1; ib_umem_notifier_release_trampoline()
134 complete_all(&item->odp_data->notifier_completion); ib_umem_notifier_release_trampoline()
135 item->context->invalidate_range(item, ib_umem_start(item), ib_umem_notifier_release_trampoline()
136 ib_umem_end(item)); ib_umem_notifier_release_trampoline()
157 static int invalidate_page_trampoline(struct ib_umem *item, u64 start, invalidate_page_trampoline() argument
160 ib_umem_notifier_start_account(item); invalidate_page_trampoline()
161 item->context->invalidate_range(item, start, start + PAGE_SIZE); invalidate_page_trampoline()
162 ib_umem_notifier_end_account(item); invalidate_page_trampoline()
184 static int invalidate_range_start_trampoline(struct ib_umem *item, u64 start, invalidate_range_start_trampoline() argument
187 ib_umem_notifier_start_account(item); invalidate_range_start_trampoline()
188 item->context->invalidate_range(item, start, end); invalidate_range_start_trampoline()
210 static int invalidate_range_end_trampoline(struct ib_umem *item, u64 start, invalidate_range_end_trampoline() argument
213 ib_umem_notifier_end_account(item); invalidate_range_end_trampoline()
/linux-4.4.14/net/tipc/
H A Dname_distr.c119 struct distr_item *item; tipc_named_publish() local
133 item = (struct distr_item *)msg_data(buf_msg(buf)); tipc_named_publish()
134 publ_to_item(item, publ); tipc_named_publish()
144 struct distr_item *item; tipc_named_withdraw() local
157 item = (struct distr_item *)msg_data(buf_msg(buf)); tipc_named_withdraw()
158 publ_to_item(item, publ); tipc_named_withdraw()
173 struct distr_item *item = NULL; named_distribute() local
187 item = (struct distr_item *)msg_data(buf_msg(skb)); list_for_each_entry()
191 publ_to_item(item, publ); list_for_each_entry()
192 item++; list_for_each_entry()
306 * Returns the publication item if successful, otherwise NULL.
392 struct distr_item *item; tipc_named_rcv() local
402 item = (struct distr_item *)msg_data(msg); tipc_named_rcv()
406 if (!tipc_update_nametbl(net, item, node, mtype)) tipc_named_rcv()
407 tipc_named_add_backlog(item, mtype, node); tipc_named_rcv()
408 item++; tipc_named_rcv()
/linux-4.4.14/sound/drivers/pcsp/
H A Dpcsp_mixer.c51 if (uinfo->value.enumerated.item > chip->max_treble) pcsp_treble_info()
52 uinfo->value.enumerated.item = chip->max_treble; pcsp_treble_info()
54 (unsigned long)PCSP_CALC_RATE(uinfo->value.enumerated.item)); pcsp_treble_info()
62 ucontrol->value.enumerated.item[0] = chip->treble; pcsp_treble_get()
71 int treble = ucontrol->value.enumerated.item[0]; pcsp_treble_put()
/linux-4.4.14/drivers/gpu/drm/via/
H A Dvia_mm.c115 struct via_memblock *item; via_mem_alloc() local
133 item = kzalloc(sizeof(*item), GFP_KERNEL); via_mem_alloc()
134 if (!item) { via_mem_alloc()
142 &item->mm_node, via_mem_alloc()
146 &item->mm_node, via_mem_alloc()
151 retval = idr_alloc(&dev_priv->object_idr, item, 1, 0, GFP_KERNEL); via_mem_alloc()
156 list_add(&item->owner_list, &file_priv->obj_list); via_mem_alloc()
161 ((item->mm_node.start) << VIA_MM_ALIGN_SHIFT); via_mem_alloc()
167 drm_mm_remove_node(&item->mm_node); via_mem_alloc()
169 kfree(item); via_mem_alloc()
/linux-4.4.14/fs/ocfs2/
H A Duptodate.c43 * item for them)
149 struct ocfs2_meta_cache_item *item; ocfs2_purge_copied_metadata_tree() local
152 item = rb_entry(node, struct ocfs2_meta_cache_item, c_node); ocfs2_purge_copied_metadata_tree()
155 (unsigned long long) item->c_block); ocfs2_purge_copied_metadata_tree()
157 rb_erase(&item->c_node, root); ocfs2_purge_copied_metadata_tree()
158 kmem_cache_free(ocfs2_uptodate_cachep, item); ocfs2_purge_copied_metadata_tree()
208 sector_t item) ocfs2_search_cache_array()
213 if (item == ci->ci_cache.ci_array[i]) ocfs2_search_cache_array()
220 /* Returns the cache item if found, otherwise NULL.
227 struct ocfs2_meta_cache_item *item = NULL; ocfs2_search_cache_tree() local
230 item = rb_entry(n, struct ocfs2_meta_cache_item, c_node); ocfs2_search_cache_tree()
232 if (block < item->c_block) ocfs2_search_cache_tree()
234 else if (block > item->c_block) ocfs2_search_cache_tree()
237 return item; ocfs2_search_cache_tree()
247 struct ocfs2_meta_cache_item *item = NULL; ocfs2_buffer_cached() local
259 item = ocfs2_search_cache_tree(ci, bh->b_blocknr); ocfs2_buffer_cached()
263 trace_ocfs2_buffer_cached_end(index, item); ocfs2_buffer_cached()
265 return (index != -1) || (item != NULL); ocfs2_buffer_cached()
316 /* By now the caller should have checked that the item does *not*
561 struct ocfs2_meta_cache_item *item) ocfs2_remove_metadata_tree()
565 (unsigned long long)item->c_block); ocfs2_remove_metadata_tree()
567 rb_erase(&item->c_node, &ci->ci_cache.ci_tree); ocfs2_remove_metadata_tree()
575 struct ocfs2_meta_cache_item *item = NULL; ocfs2_remove_block_from_cache() local
588 item = ocfs2_search_cache_tree(ci, block); ocfs2_remove_block_from_cache()
589 if (item) ocfs2_remove_block_from_cache()
590 ocfs2_remove_metadata_tree(ci, item); ocfs2_remove_block_from_cache()
594 if (item) ocfs2_remove_block_from_cache()
595 kmem_cache_free(ocfs2_uptodate_cachep, item); ocfs2_remove_block_from_cache()
207 ocfs2_search_cache_array(struct ocfs2_caching_info *ci, sector_t item) ocfs2_search_cache_array() argument
560 ocfs2_remove_metadata_tree(struct ocfs2_caching_info *ci, struct ocfs2_meta_cache_item *item) ocfs2_remove_metadata_tree() argument
H A Djournal.c1230 struct ocfs2_la_recovery_item *item, *n; ocfs2_complete_recovery() local
1242 list_for_each_entry_safe(item, n, &tmp_la_list, lri_list) { ocfs2_complete_recovery()
1243 list_del_init(&item->lri_list); ocfs2_complete_recovery()
1247 la_dinode = item->lri_la_dinode; ocfs2_complete_recovery()
1248 tl_dinode = item->lri_tl_dinode; ocfs2_complete_recovery()
1249 qrec = item->lri_qrec; ocfs2_complete_recovery()
1250 orphan_reco_type = item->lri_orphan_reco_type; ocfs2_complete_recovery()
1252 trace_ocfs2_complete_recovery_slot(item->lri_slot, ocfs2_complete_recovery()
1275 ret = ocfs2_recover_orphans(osb, item->lri_slot, ocfs2_complete_recovery()
1282 item->lri_slot); ocfs2_complete_recovery()
1288 kfree(item); ocfs2_complete_recovery()
1304 struct ocfs2_la_recovery_item *item; ocfs2_queue_recovery_completion() local
1306 item = kmalloc(sizeof(struct ocfs2_la_recovery_item), GFP_NOFS); ocfs2_queue_recovery_completion()
1307 if (!item) { ocfs2_queue_recovery_completion()
1321 INIT_LIST_HEAD(&item->lri_list); ocfs2_queue_recovery_completion()
1322 item->lri_la_dinode = la_dinode; ocfs2_queue_recovery_completion()
1323 item->lri_slot = slot_num; ocfs2_queue_recovery_completion()
1324 item->lri_tl_dinode = tl_dinode; ocfs2_queue_recovery_completion()
1325 item->lri_qrec = qrec; ocfs2_queue_recovery_completion()
1326 item->lri_orphan_reco_type = orphan_reco_type; ocfs2_queue_recovery_completion()
1329 list_add_tail(&item->lri_list, &journal->j_la_cleanups); ocfs2_queue_recovery_completion()
/linux-4.4.14/fs/nfsd/
H A Dexport.c206 struct svc_expkey *item = container_of(citem, struct svc_expkey, h); expkey_init() local
208 kref_get(&item->ek_client->ref); expkey_init()
209 new->ek_client = item->ek_client; expkey_init()
210 new->ek_fsidtype = item->ek_fsidtype; expkey_init()
212 memcpy(new->ek_fsid, item->ek_fsid, sizeof(new->ek_fsid)); expkey_init()
219 struct svc_expkey *item = container_of(citem, struct svc_expkey, h); expkey_update() local
221 new->ek_path = item->ek_path; expkey_update()
222 path_get(&item->ek_path); expkey_update()
249 svc_expkey_hash(struct svc_expkey *item) svc_expkey_hash() argument
251 int hash = item->ek_fsidtype; svc_expkey_hash()
252 char * cp = (char*)item->ek_fsid; svc_expkey_hash()
253 int len = key_len(item->ek_fsidtype); svc_expkey_hash()
256 hash ^= hash_ptr(item->ek_client, EXPKEY_HASHBITS); svc_expkey_hash()
262 svc_expkey_lookup(struct cache_detail *cd, struct svc_expkey *item) svc_expkey_lookup() argument
265 int hash = svc_expkey_hash(item); svc_expkey_lookup()
267 ch = sunrpc_cache_lookup(cd, &item->h, hash); svc_expkey_lookup()
700 struct svc_export *item = container_of(citem, struct svc_export, h); svc_export_init() local
702 kref_get(&item->ex_client->ref); svc_export_init()
703 new->ex_client = item->ex_client; svc_export_init()
704 new->ex_path = item->ex_path; svc_export_init()
705 path_get(&item->ex_path); svc_export_init()
711 new->cd = item->cd; svc_export_init()
717 struct svc_export *item = container_of(citem, struct svc_export, h); export_update() local
720 new->ex_flags = item->ex_flags; export_update()
721 new->ex_anon_uid = item->ex_anon_uid; export_update()
722 new->ex_anon_gid = item->ex_anon_gid; export_update()
723 new->ex_fsid = item->ex_fsid; export_update()
724 new->ex_devid_map = item->ex_devid_map; export_update()
725 item->ex_devid_map = NULL; export_update()
726 new->ex_uuid = item->ex_uuid; export_update()
727 item->ex_uuid = NULL; export_update()
728 new->ex_fslocs.locations = item->ex_fslocs.locations; export_update()
729 item->ex_fslocs.locations = NULL; export_update()
730 new->ex_fslocs.locations_count = item->ex_fslocs.locations_count; export_update()
731 item->ex_fslocs.locations_count = 0; export_update()
732 new->ex_fslocs.migrated = item->ex_fslocs.migrated; export_update()
733 item->ex_fslocs.migrated = 0; export_update()
734 new->ex_layout_type = item->ex_layout_type; export_update()
735 new->ex_nflavors = item->ex_nflavors; export_update()
737 new->ex_flavors[i] = item->ex_flavors[i]; export_update()
H A Dnfs4idmap.c265 idtoname_lookup(struct cache_detail *cd, struct ent *item) idtoname_lookup() argument
267 struct cache_head *ch = sunrpc_cache_lookup(cd, &item->h, idtoname_lookup()
268 idtoname_hash(item)); idtoname_lookup()
423 nametoid_lookup(struct cache_detail *cd, struct ent *item) nametoid_lookup() argument
425 struct cache_head *ch = sunrpc_cache_lookup(cd, &item->h, nametoid_lookup()
426 nametoid_hash(item)); nametoid_lookup()
493 struct ent *key, struct cache_detail *detail, struct ent **item) idmap_lookup()
497 *item = lookup_fn(detail, key); idmap_lookup()
498 if (!*item) idmap_lookup()
501 ret = cache_check(detail, &(*item)->h, &rqstp->rq_chandle); idmap_lookup()
504 struct ent *prev_item = *item; idmap_lookup()
505 *item = lookup_fn(detail, key); idmap_lookup()
506 if (*item != prev_item) idmap_lookup()
508 cache_put(&(*item)->h, detail); idmap_lookup()
526 struct ent *item, key = { idmap_name_to_id() local
537 ret = idmap_lookup(rqstp, nametoid_lookup, &key, nn->nametoid_cache, &item); idmap_name_to_id()
542 *id = item->id; idmap_name_to_id()
543 cache_put(&item->h, nn->nametoid_cache); idmap_name_to_id()
564 struct ent *item, key = { idmap_id_to_name() local
573 ret = idmap_lookup(rqstp, idtoname_lookup, &key, nn->idtoname_cache, &item); idmap_id_to_name()
578 ret = strlen(item->name); idmap_id_to_name()
583 p = xdr_encode_opaque(p, item->name, ret); idmap_id_to_name()
584 cache_put(&item->h, nn->idtoname_cache); idmap_id_to_name()
491 idmap_lookup(struct svc_rqst *rqstp, struct ent *(*lookup_fn)(struct cache_detail *, struct ent *), struct ent *key, struct cache_detail *detail, struct ent **item) idmap_lookup() argument
/linux-4.4.14/lib/
H A Dradix-tree.c52 * to build the branch to its corresponding item, it also has to build the
56 * The worst case is a zero height tree with just a single item at index 0,
57 * and then inserting an item at index ULONG_MAX. This requires 2 new branches
381 * Create, if necessary, and return the node and slot for an item
384 * Until there is more than one item in the tree, no nodes are
444 * @item: item to insert
446 * Insert an item into the radix tree at position @index.
449 unsigned long index, void *item) radix_tree_insert()
455 BUG_ON(radix_tree_is_indirect_ptr(item)); radix_tree_insert()
462 rcu_assign_pointer(*slot, item); radix_tree_insert()
478 * __radix_tree_lookup - lookup an item in a radix tree
484 * Lookup and return the item at position @index in the radix
487 * Until there is more than one item in the tree, no nodes are
566 * Lookup the item at the position @index in the radix tree @root.
571 * returned item, however.
589 * Returns the address of the tagged item. Setting a tag on a not-present
590 * item is a bug.
635 * Returns the address of the tagged item on success, else NULL. ie:
862 * radix_tree_range_tag_if_tagged - for each item in given range set given
863 * tag if item has another tag set
872 * (inclusive). For each item in the range if iftag is set, the function sets
962 /* Go to next item at level determined by 'shift' */ radix_tree_range_tag_if_tagged()
1161 static unsigned long __locate(struct radix_tree_node *slot, void *item, __locate() argument
1192 if (slot->slots[i] == item) { __locate()
1204 * radix_tree_locate_item - search through radix tree for item
1206 * @item: item to be found
1208 * Returns index where item was found, or -1 if not found.
1210 * to be preemptible), and must check afterwards if item is still there.
1212 unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item) radix_tree_locate_item() argument
1224 if (node == item) radix_tree_locate_item()
1237 cur_index = __locate(node, item, cur_index, &found_index); radix_tree_locate_item()
1245 unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item) radix_tree_locate_item() argument
1292 * find the item. However if this was a bottom-level node, radix_tree_shrink()
1294 * to callers dereferencing it. If item corresponding to radix_tree_shrink()
1366 * radix_tree_delete_item - delete an item from a radix tree
1369 * @item: expected item
1371 * Remove @item at @index from the radix tree rooted at @root.
1373 * Returns the address of the deleted item, or NULL if it was not present
1374 * or the entry at the given @index was not @item.
1377 unsigned long index, void *item) radix_tree_delete_item()
1389 if (item && entry != item) radix_tree_delete_item()
1401 * Clear all tags associated with the item to be deleted. radix_tree_delete_item()
1419 * radix_tree_delete - delete an item from a radix tree
1423 * Remove the item at @index from the radix tree rooted at @root.
1425 * Returns the address of the deleted item, or NULL if it was not present.
448 radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item) radix_tree_insert() argument
1376 radix_tree_delete_item(struct radix_tree_root *root, unsigned long index, void *item) radix_tree_delete_item() argument
H A Dbsearch.c17 * @key: pointer to item being searched for
/linux-4.4.14/include/rdma/
H A Dib_umem_odp.h111 typedef int (*umem_call_back)(struct ib_umem *item, u64 start, u64 end,
125 static inline int ib_umem_mmu_notifier_retry(struct ib_umem *item, ib_umem_mmu_notifier_retry() argument
131 * the relevant locks taken (item->odp_data->umem_mutex ib_umem_mmu_notifier_retry()
138 if (!item->odp_data->mn_counters_active) ib_umem_mmu_notifier_retry()
141 if (unlikely(item->odp_data->notifiers_count)) ib_umem_mmu_notifier_retry()
143 if (item->odp_data->notifiers_seq != mmu_seq) ib_umem_mmu_notifier_retry()
/linux-4.4.14/include/linux/netfilter/
H A Dnf_conntrack_h323_types.h246 OpenLogicalChannel item[30]; member in struct:Setup_UUIE_fastStart
292 OpenLogicalChannel item[30]; member in struct:CallProceeding_UUIE_fastStart
314 OpenLogicalChannel item[30]; member in struct:Connect_UUIE_fastStart
342 OpenLogicalChannel item[30]; member in struct:Alerting_UUIE_fastStart
385 OpenLogicalChannel item[30]; member in struct:Facility_UUIE_fastStart
418 OpenLogicalChannel item[30]; member in struct:Progress_UUIE_fastStart
598 MultimediaSystemControlMessage item[4]; member in struct:H323_UU_PDU_h245Control
664 TransportAddress item[10]; member in struct:RegistrationRequest_callSignalAddress
669 TransportAddress item[10]; member in struct:RegistrationRequest_rasAddress
706 TransportAddress item[10]; member in struct:RegistrationConfirm_callSignalAddress
738 TransportAddress item[10]; member in struct:UnregistrationRequest_callSignalAddress
866 TransportAddress item[10]; member in struct:InfoRequestResponse_callSignalAddress
/linux-4.4.14/scripts/kconfig/lxdialog/
H A Dchecklist.c29 * Print list item
39 /* Clear 'residue' of last item */ print_item()
53 wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); print_item()
124 /* which item to highlight */ item_foreach()
179 /* Find length of longest item in order to center checklist */
225 /* De-highlight current first item */
250 /* De-highlight current last item before scrolling up */
274 /* De-highlight current item */
277 /* Highlight new item */
H A Dmenubox.c49 * lxdialog, it sets the scrolling so that the selected item is in the
64 * Print menu item
66 static void do_print_item(WINDOW * win, const char *item, int line_y, do_print_item() argument
72 strncpy(menu_item, item, menu_width - item_x); do_print_item()
76 /* Clear 'residue' of last item */ do_print_item()
88 wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); do_print_item()
247 /* Set choice to default item */ dialog_menu()
311 /* Remove highligt of current item */ dialog_menu()
H A Ddialog.h106 int hl; /* highlight this item */
136 struct dialog_color item; member in struct:dialog_info
159 /* item list as used by checklist and menubox */
170 /* item list manipulation for lxdialog use */
175 void *data; /* pointer to menu item - used by menubox+checklist */
/linux-4.4.14/include/drm/
H A Ddrm_hashtab.h53 extern int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
54 extern int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
57 extern int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item);
61 extern int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item);
/linux-4.4.14/fs/logfs/
H A Dsegment.c188 struct object_alias_item *item; btree_write_alias() local
191 list_for_each_entry(item, &block->item_list, list) { btree_write_alias()
193 block->level, item->child_no, item->val); btree_write_alias()
211 struct object_alias_item *item; logfs_load_object_aliases() local
219 item = mempool_alloc(super->s_alias_pool, GFP_NOFS); logfs_load_object_aliases()
220 if (!item) logfs_load_object_aliases()
222 memset(item, 0, sizeof(*item)); logfs_load_object_aliases()
225 item->val = oa[i].val; logfs_load_object_aliases()
226 item->child_no = be16_to_cpu(oa[i].child_no); logfs_load_object_aliases()
233 ino, bix, level, item->child_no, logfs_load_object_aliases()
234 be64_to_cpu(item->val)); logfs_load_object_aliases()
242 if (test_and_set_bit(item->child_no, block->alias_map)) { logfs_load_object_aliases()
247 list_add(&item->list, &block->item_list); logfs_load_object_aliases()
258 struct object_alias_item *item; kill_alias() local
261 item = list_entry(block->item_list.next, typeof(*item), list); kill_alias()
262 list_del(&item->list); kill_alias()
263 mempool_free(item, super->s_alias_pool); kill_alias()
482 struct object_alias_item *item, *next; move_btree_to_page() local
493 list_for_each_entry_safe(item, next, &block->item_list, list) { move_btree_to_page()
494 data[item->child_no] = item->val; move_btree_to_page()
495 list_del(&item->list); move_btree_to_page()
496 mempool_free(item, super->s_alias_pool); move_btree_to_page()
525 struct object_alias_item *item; move_page_to_btree() local
543 item = mempool_alloc(super->s_alias_pool, GFP_NOFS); move_page_to_btree()
544 BUG_ON(!item); /* mempool empty */ move_page_to_btree()
545 memset(item, 0, sizeof(*item)); move_page_to_btree()
548 item->val = child[pos]; move_page_to_btree()
550 item->child_no = pos; move_page_to_btree()
551 list_add(&item->list, &block->item_list); move_page_to_btree()
/linux-4.4.14/drivers/edac/
H A Dedac_pci.c98 struct list_head *item; find_edac_pci_by_dev() local
102 list_for_each(item, &edac_pci_list) { find_edac_pci_by_dev()
103 pci = list_entry(item, struct edac_pci_ctl_info, link); find_edac_pci_by_dev()
122 struct list_head *item, *insert_before; add_edac_pci_to_global_list() local
135 list_for_each(item, &edac_pci_list) { add_edac_pci_to_global_list()
136 rover = list_entry(item, struct edac_pci_ctl_info, link); add_edac_pci_to_global_list()
142 insert_before = item; add_edac_pci_to_global_list()
195 struct list_head *item;
199 list_for_each(item, &edac_pci_list) {
200 pci = list_entry(item, struct edac_pci_ctl_info, link);
255 * initialize a workq item for this edac_pci instance
H A Dedac_mc.c183 * 'p' can possibly be an unaligned item X such that sizeof(X) is edac_align_ptr()
301 * structure. We want the alignment of each item to be at least as edac_mc_alloc()
496 struct list_head *item; find_mci_by_dev() local
500 list_for_each(item, &mc_devices) { find_mci_by_dev()
501 mci = list_entry(item, struct mem_ctl_info, link); find_mci_by_dev()
557 * initialize a workq item for this mci
604 struct list_head *item; edac_mc_reset_delay_period() local
608 list_for_each(item, &mc_devices) { edac_mc_reset_delay_period()
609 mci = list_entry(item, struct mem_ctl_info, link); edac_mc_reset_delay_period()
629 struct list_head *item, *insert_before; add_mc_to_global_list() local
638 list_for_each(item, &mc_devices) { add_mc_to_global_list()
639 p = list_entry(item, struct mem_ctl_info, link); add_mc_to_global_list()
645 insert_before = item; add_mc_to_global_list()
691 struct list_head *item; edac_mc_find() local
694 list_for_each(item, &mc_devices) { edac_mc_find()
695 mci = list_entry(item, struct mem_ctl_info, link); edac_mc_find()
H A Dedac_device.c89 * determine the offsets of the various item arrays edac_device_alloc_ctl_info()
91 * We want the alignment of each item (instance,block,attrib) edac_device_alloc_ctl_info()
271 struct list_head *item; find_edac_device_by_dev() local
275 list_for_each(item, &edac_device_list) { find_edac_device_by_dev()
276 edac_dev = list_entry(item, struct edac_device_ctl_info, link); find_edac_device_by_dev()
298 struct list_head *item, *insert_before; add_edac_dev_to_global_list() local
309 list_for_each(item, &edac_device_list) { add_edac_dev_to_global_list()
310 rover = list_entry(item, struct edac_device_ctl_info, link); add_edac_dev_to_global_list()
316 insert_before = item; add_edac_dev_to_global_list()
402 * initialize a workq item for this edac_device instance
/linux-4.4.14/drivers/hid/
H A Dhid-core.c293 * Read data value from item.
296 static u32 item_udata(struct hid_item *item) item_udata() argument
298 switch (item->size) { item_udata()
299 case 1: return item->data.u8; item_udata()
300 case 2: return item->data.u16; item_udata()
301 case 4: return item->data.u32; item_udata()
306 static s32 item_sdata(struct hid_item *item) item_sdata() argument
308 switch (item->size) { item_sdata()
309 case 1: return item->data.s8; item_sdata()
310 case 2: return item->data.s16; item_sdata()
311 case 4: return item->data.s32; item_sdata()
317 * Process a global item.
320 static int hid_parser_global(struct hid_parser *parser, struct hid_item *item) hid_parser_global() argument
323 switch (item->tag) { hid_parser_global()
347 parser->global.usage_page = item_udata(item); hid_parser_global()
351 parser->global.logical_minimum = item_sdata(item); hid_parser_global()
356 parser->global.logical_maximum = item_sdata(item); hid_parser_global()
358 parser->global.logical_maximum = item_udata(item); hid_parser_global()
362 parser->global.physical_minimum = item_sdata(item); hid_parser_global()
367 parser->global.physical_maximum = item_sdata(item); hid_parser_global()
369 parser->global.physical_maximum = item_udata(item); hid_parser_global()
377 raw_value = item_sdata(item); hid_parser_global()
385 parser->global.unit = item_udata(item); hid_parser_global()
389 parser->global.report_size = item_udata(item); hid_parser_global()
398 parser->global.report_count = item_udata(item); hid_parser_global()
407 parser->global.report_id = item_udata(item); hid_parser_global()
417 hid_err(parser->device, "unknown global tag 0x%x\n", item->tag); hid_parser_global()
423 * Process a local item.
426 static int hid_parser_local(struct hid_parser *parser, struct hid_item *item) hid_parser_local() argument
432 data = item_udata(item); hid_parser_local()
434 switch (item->tag) { hid_parser_local()
466 if (item->size <= 2) hid_parser_local()
478 if (item->size <= 2) hid_parser_local()
491 if (item->size <= 2) hid_parser_local()
521 dbg_hid("unknown local item tag 0x%x\n", item->tag); hid_parser_local()
528 * Process a main item.
531 static int hid_parser_main(struct hid_parser *parser, struct hid_item *item) hid_parser_main() argument
536 data = item_udata(item); hid_parser_main()
538 switch (item->tag) { hid_parser_main()
555 hid_err(parser->device, "unknown main item tag 0x%x\n", item->tag); hid_parser_main()
565 * Process a reserved item.
568 static int hid_parser_reserved(struct hid_parser *parser, struct hid_item *item) hid_parser_reserved() argument
570 dbg_hid("reserved item type, tag 0x%x\n", item->tag); hid_parser_reserved()
636 * Fetch a report description item from the data stream. We support long
640 static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item) fetch_item() argument
649 item->type = (b >> 2) & 3; fetch_item()
650 item->tag = (b >> 4) & 15; fetch_item()
652 if (item->tag == HID_ITEM_TAG_LONG) { fetch_item()
654 item->format = HID_ITEM_FORMAT_LONG; fetch_item()
659 item->size = *start++; fetch_item()
660 item->tag = *start++; fetch_item()
662 if ((end - start) < item->size) fetch_item()
665 item->data.longdata = start; fetch_item()
666 start += item->size; fetch_item()
670 item->format = HID_ITEM_FORMAT_SHORT; fetch_item()
671 item->size = b & 3; fetch_item()
673 switch (item->size) { fetch_item()
680 item->data.u8 = *start++; fetch_item()
686 item->data.u16 = get_unaligned_le16(start); fetch_item()
691 item->size++; fetch_item()
694 item->data.u32 = get_unaligned_le32(start); fetch_item()
744 static int hid_scan_main(struct hid_parser *parser, struct hid_item *item) hid_scan_main() argument
749 data = item_udata(item); hid_scan_main()
751 switch (item->tag) { hid_scan_main()
786 struct hid_item item; hid_scan_report() local
790 struct hid_item *item) = { hid_scan_report()
809 while ((start = fetch_item(start, end, &item)) != NULL) hid_scan_report()
810 dispatch_type[item.type](parser, &item); hid_scan_report()
945 struct hid_item item; hid_open_report() local
952 struct hid_item *item) = { hid_open_report()
1003 while ((start = fetch_item(start, end, &item)) != NULL) { hid_open_report()
1005 if (item.format != HID_ITEM_FORMAT_SHORT) { hid_open_report()
1006 hid_err(device, "unexpected long global item\n"); hid_open_report()
1010 if (dispatch_type[item.type](parser, &item)) { hid_open_report()
1011 hid_err(device, "item %u %u %u %u parsing failed\n", hid_open_report()
1012 item.format, (unsigned)item.size, hid_open_report()
1013 (unsigned)item.type, (unsigned)item.tag); hid_open_report()
1032 hid_err(device, "item fetching failed at offset %d\n", (int)(end - start)); hid_open_report()
/linux-4.4.14/include/target/
H A Dtarget_core_base.h569 static inline struct se_node_acl *acl_to_nacl(struct config_item *item) acl_to_nacl() argument
571 return container_of(to_config_group(item), struct se_node_acl, acl_to_nacl()
575 static inline struct se_node_acl *attrib_to_nacl(struct config_item *item) attrib_to_nacl() argument
577 return container_of(to_config_group(item), struct se_node_acl, attrib_to_nacl()
581 static inline struct se_node_acl *auth_to_nacl(struct config_item *item) auth_to_nacl() argument
583 return container_of(to_config_group(item), struct se_node_acl, auth_to_nacl()
587 static inline struct se_node_acl *param_to_nacl(struct config_item *item) param_to_nacl() argument
589 return container_of(to_config_group(item), struct se_node_acl, param_to_nacl()
593 static inline struct se_node_acl *fabric_stat_to_nacl(struct config_item *item) fabric_stat_to_nacl() argument
595 return container_of(to_config_group(item), struct se_node_acl, fabric_stat_to_nacl()
857 static inline struct se_tpg_np *to_tpg_np(struct config_item *item) to_tpg_np() argument
859 return container_of(to_config_group(item), struct se_tpg_np, to_tpg_np()
899 static inline struct se_portal_group *to_tpg(struct config_item *item) to_tpg() argument
901 return container_of(to_config_group(item), struct se_portal_group, to_tpg()
905 static inline struct se_portal_group *attrib_to_tpg(struct config_item *item) attrib_to_tpg() argument
907 return container_of(to_config_group(item), struct se_portal_group, attrib_to_tpg()
911 static inline struct se_portal_group *auth_to_tpg(struct config_item *item) auth_to_tpg() argument
913 return container_of(to_config_group(item), struct se_portal_group, auth_to_tpg()
917 static inline struct se_portal_group *param_to_tpg(struct config_item *item) param_to_tpg() argument
919 return container_of(to_config_group(item), struct se_portal_group, param_to_tpg()
/linux-4.4.14/fs/xfs/libxfs/
H A Dxfs_log_format.h28 * includes the physical log structure itself, as well as all the log item
215 * Log item types.
239 * This is the structure used to lay out an inode log item in the
245 __uint16_t ilf_type; /* inode log item type */
246 __uint16_t ilf_size; /* size of this item */
261 __uint16_t ilf_type; /* inode log item type */
262 __uint16_t ilf_size; /* size of this item */
277 __uint16_t ilf_type; /* inode log item type */
278 __uint16_t ilf_size; /* size of this item */
450 * This is the structure used to lay out a buf log item in the
457 unsigned short blf_type; /* buf log item type indicator */
458 unsigned short blf_size; /* size of this item */
541 * This is the structure used to lay out an efi log item in the
546 __uint16_t efi_type; /* efi log item type */
547 __uint16_t efi_size; /* size of this item */
554 __uint16_t efi_type; /* efi log item type */
555 __uint16_t efi_size; /* size of this item */
562 __uint16_t efi_type; /* efi log item type */
563 __uint16_t efi_size; /* size of this item */
570 * This is the structure used to lay out an efd log item in the
575 __uint16_t efd_type; /* efd log item type */
576 __uint16_t efd_size; /* size of this item */
583 __uint16_t efd_type; /* efd log item type */
584 __uint16_t efd_size; /* size of this item */
591 __uint16_t efd_type; /* efd log item type */
592 __uint16_t efd_size; /* size of this item */
605 __uint16_t qlf_type; /* dquot log item type */
606 __uint16_t qlf_size; /* size of this item */
622 unsigned short qf_type; /* quotaoff log item type */
623 unsigned short qf_size; /* size of this item */
662 * Inode create log item structure
H A Dxfs_log_recover.h35 * item headers are in ri_buf[0]. Additional buffers follow.
H A Dxfs_shared.h156 * a transaction. It points to the log item and keeps some
157 * flags to track the state of the log item. It also tracks
158 * the amount of space needed to log the item it describes
/linux-4.4.14/net/sunrpc/
H A Dsvcauth_unix.c98 struct cache_head *item = container_of(kref, struct cache_head, ref); ip_map_put() local
99 struct ip_map *im = container_of(item, struct ip_map,h); ip_map_put()
101 if (test_bit(CACHE_VALID, &item->flags) && ip_map_put()
102 !test_bit(CACHE_NEGATIVE, &item->flags)) ip_map_put()
121 struct ip_map *item = container_of(citem, struct ip_map, h); ip_map_init() local
123 strcpy(new->m_class, item->m_class); ip_map_init()
124 new->m_addr = item->m_addr; ip_map_init()
129 struct ip_map *item = container_of(citem, struct ip_map, h); update() local
131 kref_get(&item->m_client->h.ref); update()
132 new->m_client = item->m_client; update()
424 struct cache_head *item = container_of(kref, struct cache_head, ref); unix_gid_put() local
425 struct unix_gid *ug = container_of(item, struct unix_gid, h); unix_gid_put()
426 if (test_bit(CACHE_VALID, &item->flags) && unix_gid_put()
427 !test_bit(CACHE_NEGATIVE, &item->flags)) unix_gid_put()
441 struct unix_gid *item = container_of(citem, struct unix_gid, h); unix_gid_init() local
442 new->uid = item->uid; unix_gid_init()
447 struct unix_gid *item = container_of(citem, struct unix_gid, h); unix_gid_update() local
449 get_group_info(item->gi); unix_gid_update()
450 new->gi = item->gi; unix_gid_update()
H A Dcache.c41 static bool cache_defer_req(struct cache_req *req, struct cache_head *item);
42 static void cache_revisit_request(struct cache_head *item);
242 * It checks the currency of a cache item and will (later)
249 * upcall completed but item is still invalid (implying that
250 * the cache item has been replaced with a newer one).
526 #define DFR_HASH(item) ((((long)item)>>4 ^ (((long)item)>>13)) % DFR_HASHSIZE)
544 static void __hash_deferred_req(struct cache_deferred_req *dreq, struct cache_head *item) __hash_deferred_req() argument
546 int hash = DFR_HASH(item); __hash_deferred_req()
553 struct cache_head *item, setup_deferral()
557 dreq->item = item; setup_deferral()
561 __hash_deferred_req(dreq, item); setup_deferral()
584 static void cache_wait_req(struct cache_req *req, struct cache_head *item) cache_wait_req() argument
592 setup_deferral(dreq, item, 0); cache_wait_req()
594 if (!test_bit(CACHE_PENDING, &item->flags) || cache_wait_req()
644 static bool cache_defer_req(struct cache_req *req, struct cache_head *item) cache_defer_req() argument
649 cache_wait_req(req, item); cache_defer_req()
650 if (!test_bit(CACHE_PENDING, &item->flags)) cache_defer_req()
656 setup_deferral(dreq, item, 1); cache_defer_req()
657 if (!test_bit(CACHE_PENDING, &item->flags)) cache_defer_req()
661 cache_revisit_request(item); cache_defer_req()
667 static void cache_revisit_request(struct cache_head *item) cache_revisit_request() argument
672 int hash = DFR_HASH(item); cache_revisit_request()
678 if (dreq->item == item) { cache_revisit_request()
727 * New readers are added to the head. If, on read, an item is found with
741 struct cache_head *item; member in struct:cache_request
757 detail->cache_request(detail, crq->item, &bp, &len); cache_request()
804 if (rp->offset == 0 && !test_bit(CACHE_PENDING, &rq->item->flags)) { cache_read()
830 !test_bit(CACHE_PENDING, &rq->item->flags)) { cache_read()
833 cache_put(rq->item, cd); cache_read()
1046 if (cr->item != ch) cache_dequeue()
1059 cache_put(cr->item, detail); cache_dequeue()
1190 crq->item = cache_get(h); sunrpc_cache_pipe_upcall()
1276 * We call ->cache_show passing NULL for the item to
1277 * get a header, then pass each real item in the cache
552 setup_deferral(struct cache_deferred_req *dreq, struct cache_head *item, int count_me) setup_deferral() argument
/linux-4.4.14/drivers/staging/wlan-ng/
H A Dp80211types.h264 /* prototype template w/ data item */
272 /* message data item for int, BOUNDEDINT, ENUMINT */
280 /* message data item for OCTETSTR, DISPLAYSTR */
288 /* message data item for OCTETSTR, DISPLAYSTR */
296 /* message data item for OCTETSTR, DISPLAYSTR */
304 /* message data item for OCTETSTR, DISPLAYSTR */
312 /* message data item for UNK 392, namely mib items */
320 /* message data item for UNK 1025, namely p2 pdas */
328 /* message data item for UNK 4096, namely p2 download chunks */
H A Dprism2mgmt.c374 hfa384x_HScanResultSub_t *item = NULL; prism2mgmt_scan_results() local
402 item = &(hw->scanresults->info.hscanresult.result[req->bssindex.data]); prism2mgmt_scan_results()
406 req->signal.data = le16_to_cpu(item->sl); prism2mgmt_scan_results()
407 req->noise.data = le16_to_cpu(item->anl); prism2mgmt_scan_results()
412 memcpy(req->bssid.data.data, item->bssid, WLAN_BSSID_LEN); prism2mgmt_scan_results()
416 req->ssid.data.len = le16_to_cpu(item->ssid.len); prism2mgmt_scan_results()
418 memcpy(req->ssid.data.data, item->ssid.data, req->ssid.data.len); prism2mgmt_scan_results()
422 if (item->supprates[count] == 0) prism2mgmt_scan_results()
428 item->supprates[(N)-1])) { \ prism2mgmt_scan_results()
429 req->basicrate ## N .data = item->supprates[(N)-1]; \ prism2mgmt_scan_results()
447 req->supprate ## N .data = item->supprates[(N)-1]; \ prism2mgmt_scan_results()
464 req->beaconperiod.data = le16_to_cpu(item->bcnint); prism2mgmt_scan_results()
474 req->ibssatimwindow.data = le16_to_cpu(item->atim); prism2mgmt_scan_results()
478 req->dschannel.data = le16_to_cpu(item->chid); prism2mgmt_scan_results()
481 count = le16_to_cpu(item->capinfo); prism2mgmt_scan_results()
/linux-4.4.14/drivers/target/tcm_fc/
H A Dtfc_conf.c132 static ssize_t ft_nacl_port_name_show(struct config_item *item, char *page) ft_nacl_port_name_show() argument
134 struct se_node_acl *se_nacl = acl_to_nacl(item); ft_nacl_port_name_show()
141 static ssize_t ft_nacl_port_name_store(struct config_item *item, ft_nacl_port_name_store() argument
144 struct se_node_acl *se_nacl = acl_to_nacl(item); ft_nacl_port_name_store()
151 static ssize_t ft_nacl_node_name_show(struct config_item *item, ft_nacl_node_name_show() argument
154 struct se_node_acl *se_nacl = acl_to_nacl(item); ft_nacl_node_name_show()
161 static ssize_t ft_nacl_node_name_store(struct config_item *item, ft_nacl_node_name_store() argument
164 struct se_node_acl *se_nacl = acl_to_nacl(item); ft_nacl_node_name_store()
383 static ssize_t ft_wwn_version_show(struct config_item *item, char *page) ft_wwn_version_show() argument
/linux-4.4.14/drivers/net/wireless/ath/ath10k/
H A Dbmi.h205 #define ath10k_bmi_read32(ar, item, val) \
211 addr = host_interest_item_address(HI_ITEM(item)); \
218 #define ath10k_bmi_write32(ar, item, val) \
224 address = host_interest_item_address(HI_ITEM(item)); \
/linux-4.4.14/sound/isa/sb/
H A Dsb_mixer.c203 ucontrol->value.enumerated.item[0] = 0; snd_dt019x_input_sw_get()
206 ucontrol->value.enumerated.item[0] = 1; snd_dt019x_input_sw_get()
209 ucontrol->value.enumerated.item[0] = 2; snd_dt019x_input_sw_get()
212 ucontrol->value.enumerated.item[0] = 4; snd_dt019x_input_sw_get()
218 * ucontrol->value.enumerated.item[0] = 3; snd_dt019x_input_sw_get()
222 ucontrol->value.enumerated.item[0] = 4; snd_dt019x_input_sw_get()
235 if (ucontrol->value.enumerated.item[0] > 4) snd_dt019x_input_sw_put()
237 switch (ucontrol->value.enumerated.item[0]) { snd_dt019x_input_sw_put()
293 ucontrol->value.enumerated.item[0] = oval; snd_als4k_mono_capture_route_get()
305 if (ucontrol->value.enumerated.item[0] > 2) snd_als4k_mono_capture_route_put()
311 | (ucontrol->value.enumerated.item[0] << 6); snd_als4k_mono_capture_route_put()
344 ucontrol->value.enumerated.item[0] = 1; snd_sb8mixer_get_mux()
347 ucontrol->value.enumerated.item[0] = 2; snd_sb8mixer_get_mux()
350 ucontrol->value.enumerated.item[0] = 0; snd_sb8mixer_get_mux()
363 if (ucontrol->value.enumerated.item[0] > 2) snd_sb8mixer_put_mux()
365 switch (ucontrol->value.enumerated.item[0]) { snd_sb8mixer_put_mux()
/linux-4.4.14/sound/pci/oxygen/
H A Dxonar_dg_mixer.c76 value->value.enumerated.item[0] = data->output_sel; output_select_get()
86 unsigned int new = value->value.enumerated.item[0]; output_select_put()
296 value->value.enumerated.item[0] = data->input_sel; input_sel_get()
309 if (value->value.enumerated.item[0] > 3) input_sel_put()
313 changed = value->value.enumerated.item[0] != data->input_sel; input_sel_put()
315 data->input_sel = value->value.enumerated.item[0]; input_sel_put()
342 value->value.enumerated.item[0] = hpf_get()
356 if (value->value.enumerated.item[0]) hpf_put()
H A Dxonar_pcm179x.c741 value->value.enumerated.item[0] = rolloff_get()
759 if (!value->value.enumerated.item[0]) rolloff_put()
807 value->value.enumerated.item[0] = 0; st_output_switch_get()
809 value->value.enumerated.item[0] = 1; st_output_switch_get()
811 value->value.enumerated.item[0] = 2; st_output_switch_get()
826 switch (value->value.enumerated.item[0]) { st_output_switch_put()
862 value->value.enumerated.item[0] = 0; st_hp_volume_offset_get()
864 value->value.enumerated.item[0] = 1; st_hp_volume_offset_get()
866 value->value.enumerated.item[0] = 2; st_hp_volume_offset_get()
868 value->value.enumerated.item[0] = 3; st_hp_volume_offset_get()
883 if (value->value.enumerated.item[0] > 3) st_hp_volume_offset_put()
885 offset = offsets[value->value.enumerated.item[0]]; st_hp_volume_offset_put()
921 value->value.enumerated.item[0] = 0; xense_output_switch_get()
923 value->value.enumerated.item[0] = 1; xense_output_switch_get()
925 value->value.enumerated.item[0] = 2; xense_output_switch_get()
939 switch (value->value.enumerated.item[0]) { xense_output_switch_put()
H A Doxygen.c454 value->value.enumerated.item[0] = rolloff_get()
470 if (value->value.enumerated.item[0]) rolloff_put()
505 value->value.enumerated.item[0] = hpf_get()
519 if (value->value.enumerated.item[0]) hpf_put()
557 value->value.enumerated.item[0] = meridian_dig_source_get()
568 value->value.enumerated.item[0] = claro_dig_source_get()
584 if (value->value.enumerated.item[0] == 0) meridian_dig_source_put()
605 if (value->value.enumerated.item[0]) claro_dig_source_put()
H A Dxonar_wm87x6.c673 value->value.enumerated.item[0] = ctl->private_value & 0xf; wm8776_field_enum_get()
687 return wm8776_field_set(ctl, value->value.enumerated.item[0]); wm8776_field_enum_put()
872 value->value.enumerated.item[0] = 0; wm8776_level_control_get()
875 value->value.enumerated.item[0] = 1; wm8776_level_control_get()
877 value->value.enumerated.item[0] = 2; wm8776_level_control_get()
905 if (value->value.enumerated.item[0] >= 3) wm8776_level_control_put()
908 changed = value->value.enumerated.item[0] != ctl->private_value; wm8776_level_control_put()
910 ctl->private_value = value->value.enumerated.item[0]; wm8776_level_control_put()
913 switch (value->value.enumerated.item[0]) { wm8776_level_control_put()
956 value->value.enumerated.item[0] = hpf_get()
970 if (!value->value.enumerated.item[0]) hpf_put()
/linux-4.4.14/drivers/media/pci/cx18/
H A Dcx18-alsa-pcm.c156 struct cx18_open_id item; snd_cx18_pcm_capture_open() local
163 item.cx = cx; snd_cx18_pcm_capture_open()
164 item.type = s->type; snd_cx18_pcm_capture_open()
165 item.open_id = cx->open_id++; snd_cx18_pcm_capture_open()
168 if (cx18_claim_stream(&item, item.type)) { snd_cx18_pcm_capture_open()
H A Dcx18-fileops.c799 struct cx18_open_id *item; cx18_serialized_open() local
804 item = kzalloc(sizeof(struct cx18_open_id), GFP_KERNEL); cx18_serialized_open()
805 if (NULL == item) { cx18_serialized_open()
809 v4l2_fh_init(&item->fh, &s->video_dev); cx18_serialized_open()
811 item->cx = cx; cx18_serialized_open()
812 item->type = s->type; cx18_serialized_open()
814 item->open_id = cx->open_id++; cx18_serialized_open()
815 filp->private_data = &item->fh; cx18_serialized_open()
816 v4l2_fh_add(&item->fh); cx18_serialized_open()
818 if (item->type == CX18_ENC_STREAM_TYPE_RAD && cx18_serialized_open()
824 v4l2_fh_del(&item->fh); cx18_serialized_open()
825 v4l2_fh_exit(&item->fh); cx18_serialized_open()
826 kfree(item); cx18_serialized_open()
/linux-4.4.14/drivers/media/pci/ivtv/
H A Divtv-alsa-pcm.c157 struct ivtv_open_id item; snd_ivtv_pcm_capture_open() local
170 v4l2_fh_init(&item.fh, &s->vdev); snd_ivtv_pcm_capture_open()
171 item.itv = itv; snd_ivtv_pcm_capture_open()
172 item.type = s->type; snd_ivtv_pcm_capture_open()
175 if (ivtv_claim_stream(&item, item.type)) { snd_ivtv_pcm_capture_open()
H A Divtv-fileops.c948 struct ivtv_open_id *item; local
993 item = kzalloc(sizeof(struct ivtv_open_id), GFP_KERNEL);
994 if (NULL == item) {
998 v4l2_fh_init(&item->fh, &s->vdev);
999 item->itv = itv;
1000 item->type = s->type;
1002 filp->private_data = &item->fh;
1003 v4l2_fh_add(&item->fh);
1005 if (item->type == IVTV_ENC_STREAM_TYPE_RAD &&
1011 v4l2_fh_del(&item->fh);
1012 v4l2_fh_exit(&item->fh);
1013 kfree(item);
/linux-4.4.14/arch/x86/boot/compressed/
H A Daslr.c115 static bool mem_contains(struct mem_vector *region, struct mem_vector *item) mem_contains() argument
118 if (item->start < region->start) mem_contains()
121 if (item->start + item->size > region->start + region->size) mem_contains()
128 /* Item one is entirely before item two. */ mem_overlaps()
131 /* Item one is entirely after item two. */ mem_overlaps()
/linux-4.4.14/include/net/netfilter/
H A Dnf_conntrack_ecache.h67 int (*fcn)(unsigned int events, struct nf_ct_event *item);
114 struct nf_ct_event item = { nf_conntrack_eventmask_report() local
125 ret = notify->fcn(eventmask | missed, &item); nf_conntrack_eventmask_report()
167 int (*fcn)(unsigned int events, struct nf_exp_event *item);
195 struct nf_exp_event item = { nf_ct_expect_event_report() local
200 notify->fcn(1 << event, &item); nf_ct_expect_event_report()
/linux-4.4.14/Documentation/cdrom/
H A Dcdrom-standard.tex38 \item
41 \item
44 \item
200 \item[$cdrom_device_ops$]
205 \item[$cdrom_device_info$]
350 \item[0] Open for reading data, as done by {\tt {mount()}} (2), or the
352 \item[1] Open for $ioctl$ commands, as done by audio-CD playing
403 \item[0] Close tray
404 \item[1] Open tray
416 \item[0] Unlock door, manual opening is allowed
417 \item[1] Lock door, tray cannot be ejected manually
676 \item If no other flags are set than $O_RDONLY$, the device is opened
680 \item If the option flag $O_NONBLOCK$ is set, opening will always be
722 \item[$CDO_AUTO_CLOSE \mathrel| CDO_USE_FFLAGS \mathrel| CDO_LOCK$] This
732 \item[$CDO_AUTO_CLOSE \mathrel| CDO_AUTO_EJECT \mathrel| CDO_LOCK$] This
824 \item[CDROMMULTISESSION] Requests the last session on a \cdrom.
825 \item[CDROMEJECT] Open tray.
826 \item[CDROMCLOSETRAY] Close tray.
827 \item[CDROMEJECT_SW] If $arg\not=0$, set behavior to auto-close (close
830 \item[CDROM_GET_MCN] Get the Media Catalog Number from a CD.
841 \item[CDROMSUBCHNL] Get sub-channel data in argument $arg$ of type $struct\
843 \item[CDROMREADTOCHDR] Read Table of Contents header, in $arg$ of type
845 \item[CDROMREADTOCENTRY] Read a Table of Contents entry in $arg$ and
847 \item[CDROMPLAYMSF] Play audio fragment specified in Minute, Second,
849 \item[CDROMPLAYTRKIND] Play audio fragment in track-index format
851 \item[CDROMVOLCTRL] Set volume specified by $arg$ of type $struct\
853 \item[CDROMVOLREAD] Read volume into by $arg$ of type $struct\
855 \item[CDROMSTART] Spin up disc.
856 \item[CDROMSTOP] Stop playback of audio fragment.
857 \item[CDROMPAUSE] Pause playback of audio fragment.
858 \item[CDROMRESUME] Resume playing.
867 \item[CDROM_SET_OPTIONS] Set options specified by $arg$. Returns the
870 \item[CDROM_CLEAR_OPTIONS] Clear options specified by $arg$. Returns
872 \item[CDROM_SELECT_SPEED] Select head-rate speed of disc specified as
878 \item[CDROM_SELECT_DISC] Select disc numbered $arg$ from a juke-box.
881 \item[CDROM_MEDIA_CHANGED] Returns 1 if a disc has been changed since
888 \item[CDROM_DRIVE_STATUS] Returns the status of the drive by a call to
896 \item[CDROM_DISC_STATUS] Returns the type of the disc currently in the
936 \item[CDROM_CHANGER_NSLOTS] Returns the number of slots in a
938 \item[CDROMRESET] Reset the drive.
939 \item[CDROM_GET_CAPABILITY] Returns the $capability$ flags for the
942 \item[CDROM_LOCKDOOR] Locks the door of the drive. $arg == \rm0$
944 \item[CDROM_DEBUG] Turns on debugging info. Only root is allowed
956 \item Make a backup of your current driver.
957 \item Get hold of the files \cdromc\ and \cdromh, they should be in
959 \item Make sure you include \cdromh.
960 \item Change the 3rd argument of $register_blkdev$ from
962 \item Just after that line, add the following to register with the \UCD:
965 \item Copy an example of the device-operations $struct$ to your
972 \item Copy the $cdrom_device_info$ declaration from the same example
976 \item Implement all functions in your $<device>_dops$ structure,
981 \item Rename your $<device>_ioctl()$ function to $audio_ioctl$ and
985 \item You may remove all remaining memory checking code in the
994 \item All remaining $ioctl$ cases must be moved to a separate
997 \item Change the prototypes of $<device>_open()$ and
1000 \item Try to recompile the drivers. We advise you to use modules, both
/linux-4.4.14/net/sunrpc/auth_gss/
H A Dsvcauth_gss.c82 static struct rsi *rsi_lookup(struct cache_detail *cd, struct rsi *item);
99 static inline int rsi_hash(struct rsi *item) rsi_hash() argument
101 return hash_mem(item->in_handle.data, item->in_handle.len, RSI_HASHBITS) rsi_hash()
102 ^ hash_mem(item->in_token.data, item->in_token.len, RSI_HASHBITS); rsi_hash()
107 struct rsi *item = container_of(a, struct rsi, h); rsi_match() local
109 return netobj_equal(&item->in_handle, &tmp->in_handle) && rsi_match()
110 netobj_equal(&item->in_token, &tmp->in_token); rsi_match()
130 struct rsi *item = container_of(citem, struct rsi, h); rsi_init() local
136 new->in_handle.len = item->in_handle.len; rsi_init()
137 item->in_handle.len = 0; rsi_init()
138 new->in_token.len = item->in_token.len; rsi_init()
139 item->in_token.len = 0; rsi_init()
140 new->in_handle.data = item->in_handle.data; rsi_init()
141 item->in_handle.data = NULL; rsi_init()
142 new->in_token.data = item->in_token.data; rsi_init()
143 item->in_token.data = NULL; rsi_init()
149 struct rsi *item = container_of(citem, struct rsi, h); update_rsi() local
152 new->out_handle.len = item->out_handle.len; update_rsi()
153 item->out_handle.len = 0; update_rsi()
154 new->out_token.len = item->out_token.len; update_rsi()
155 item->out_token.len = 0; update_rsi()
156 new->out_handle.data = item->out_handle.data; update_rsi()
157 item->out_handle.data = NULL; update_rsi()
158 new->out_token.data = item->out_token.data; update_rsi()
159 item->out_token.data = NULL; update_rsi()
161 new->major_status = item->major_status; update_rsi()
162 new->minor_status = item->minor_status; update_rsi()
280 static struct rsi *rsi_lookup(struct cache_detail *cd, struct rsi *item) rsi_lookup() argument
283 int hash = rsi_hash(item); rsi_lookup()
285 ch = sunrpc_cache_lookup(cd, &item->h, hash); rsi_lookup()
336 static struct rsc *rsc_lookup(struct cache_detail *cd, struct rsc *item);
539 static struct rsc *rsc_lookup(struct cache_detail *cd, struct rsc *item) rsc_lookup() argument
542 int hash = rsc_hash(item); rsc_lookup()
544 ch = sunrpc_cache_lookup(cd, &item->h, hash); rsc_lookup()
/linux-4.4.14/net/netfilter/
H A Dnf_conntrack_ecache.c124 struct nf_ct_event item; nf_ct_deliver_cached_events() local
149 item.ct = ct; nf_ct_deliver_cached_events()
150 item.portid = 0; nf_ct_deliver_cached_events()
151 item.report = 0; nf_ct_deliver_cached_events()
153 ret = notify->fcn(events | missed, &item); nf_ct_deliver_cached_events()
H A Dnf_conntrack_h323_types.c15 {FNAME("item") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL},
89 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
175 {FNAME("item") CHOICE, 4, 9, 11, SKIP | EXT, 0, _SupportedProtocols},
214 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
218 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
222 {FNAME("item") INT, WORD, 0, 0, SKIP, 0, NULL},
626 {FNAME("item") SEQ, 0, 2, 2, SKIP, 0, _H245_NonStandardParameter},
653 {FNAME("item") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL},
833 {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT,
898 {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT,
924 {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT,
958 {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT,
1043 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1061 {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT,
1158 {FNAME("item") SEQ, 8, 9, 11, SKIP | EXT, 0, _ClearToken},
1301 {FNAME("item") CHOICE, 3, 8, 8, SKIP | EXT, 0, _CryptoH323Token},
1305 {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT,
1395 {FNAME("item") SEQ, 0, 2, 2, SKIP, 0, _H245_NonStandardParameter},
1483 {FNAME("item") CHOICE, 2, 4, 4, DECODE | OPEN | EXT,
1561 {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT,
1567 {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT,
1573 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1625 {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT,
1631 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1671 {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT,
1703 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1707 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1711 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1794 {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress},
1848 {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT,
/linux-4.4.14/drivers/xen/
H A Dgrant-table.c877 static void __gnttab_unmap_refs_async(struct gntab_unmap_queue_data* item);
890 static void __gnttab_unmap_refs_async(struct gntab_unmap_queue_data* item) __gnttab_unmap_refs_async() argument
895 for (pc = 0; pc < item->count; pc++) { __gnttab_unmap_refs_async()
896 if (page_count(item->pages[pc]) > 1) { __gnttab_unmap_refs_async()
897 unsigned long delay = GNTTAB_UNMAP_REFS_DELAY * (item->age + 1); __gnttab_unmap_refs_async()
898 schedule_delayed_work(&item->gnttab_work, __gnttab_unmap_refs_async()
904 ret = gnttab_unmap_refs(item->unmap_ops, item->kunmap_ops, __gnttab_unmap_refs_async()
905 item->pages, item->count); __gnttab_unmap_refs_async()
906 item->done(ret, item); __gnttab_unmap_refs_async()
909 void gnttab_unmap_refs_async(struct gntab_unmap_queue_data* item) gnttab_unmap_refs_async() argument
911 INIT_DELAYED_WORK(&item->gnttab_work, gnttab_unmap_work); gnttab_unmap_refs_async()
912 item->age = 0; gnttab_unmap_refs_async()
914 __gnttab_unmap_refs_async(item); gnttab_unmap_refs_async()
927 int gnttab_unmap_refs_sync(struct gntab_unmap_queue_data *item) gnttab_unmap_refs_sync() argument
932 item->data = &data; gnttab_unmap_refs_sync()
933 item->done = &unmap_refs_callback; gnttab_unmap_refs_sync()
934 gnttab_unmap_refs_async(item); gnttab_unmap_refs_sync()
/linux-4.4.14/include/linux/sunrpc/
H A Dcache.h25 * - An item structure that must contain a "struct cache_head"
27 * - A 'put' function that can release a cache item. It will only
30 * - A function to calculate a hash of an item's key.
44 /* Every cache item has a common header that is used
151 struct cache_head *item; /* cache item we wait on */ member in struct:cache_deferred_req
/linux-4.4.14/drivers/net/team/
H A Dteam_mode_loadbalance.c151 const struct lb_select_tx_port *item; lb_select_tx_port_get_name() local
153 item = &lb_select_tx_port_list[i]; lb_select_tx_port_get_name()
154 if (item->func == func) lb_select_tx_port_get_name()
155 return item->name; lb_select_tx_port_get_name()
165 const struct lb_select_tx_port *item; lb_select_tx_port_get_func() local
167 item = &lb_select_tx_port_list[i]; lb_select_tx_port_get_func()
168 if (!strcmp(item->name, name)) lb_select_tx_port_get_func()
169 return item->func; lb_select_tx_port_get_func()
/linux-4.4.14/fs/ntfs/
H A Dcollate.c89 * @data1: first data item to collate
91 * @data2: second data item to collate
/linux-4.4.14/include/sound/
H A Dtlv.h77 /* Each item is: <min> <max> <TLV> */
82 /* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR */
/linux-4.4.14/fs/jffs2/
H A Dsummary.c63 static int jffs2_sum_add_mem(struct jffs2_summary *s, union jffs2_sum_mem *item) jffs2_sum_add_mem() argument
66 s->sum_list_head = (union jffs2_sum_mem *) item; jffs2_sum_add_mem()
68 s->sum_list_tail->u.next = (union jffs2_sum_mem *) item; jffs2_sum_add_mem()
69 s->sum_list_tail = (union jffs2_sum_mem *) item; jffs2_sum_add_mem()
71 switch (je16_to_cpu(item->u.nodetype)) { jffs2_sum_add_mem()
76 je32_to_cpu(item->i.inode)); jffs2_sum_add_mem()
79 s->sum_size += JFFS2_SUMMARY_DIRENT_SIZE(item->d.nsize); jffs2_sum_add_mem()
82 je32_to_cpu(item->d.ino)); jffs2_sum_add_mem()
89 je32_to_cpu(item->x.xid), je32_to_cpu(item->x.version)); jffs2_sum_add_mem()
99 je16_to_cpu(item->u.nodetype)); jffs2_sum_add_mem()
/linux-4.4.14/drivers/scsi/
H A Dips.c783 ips_copp_wait_item_t *item; ips_eh_abort() local
804 item = ha->copp_waitlist.head; ips_eh_abort()
805 while ((item) && (item->scsi_cmd != SC)) ips_eh_abort()
806 item = item->next; ips_eh_abort()
808 if (item) { ips_eh_abort()
810 ips_removeq_copp(&ha->copp_waitlist, item); ips_eh_abort()
843 ips_copp_wait_item_t *item; __ips_eh_reset() local
869 item = ha->copp_waitlist.head; __ips_eh_reset()
870 while ((item) && (item->scsi_cmd != SC)) __ips_eh_reset()
871 item = item->next; __ips_eh_reset()
873 if (item) { __ips_eh_reset()
875 ips_removeq_copp(&ha->copp_waitlist, item); __ips_eh_reset()
2541 ips_copp_wait_item_t *item; ips_next() local
2578 item = ips_removeq_copp_head(&ha->copp_waitlist); ips_next()
2582 scb->scsi_cmd = item->scsi_cmd; ips_next()
2583 kfree(item); ips_next()
2763 /* Add an item to the head of the queue */
2769 ips_putq_scb_head(ips_scb_queue_t * queue, ips_scb_t * item) ips_putq_scb_head() argument
2773 if (!item) ips_putq_scb_head()
2776 item->q_next = queue->head; ips_putq_scb_head()
2777 queue->head = item; ips_putq_scb_head()
2780 queue->tail = item; ips_putq_scb_head()
2799 ips_scb_t *item; ips_removeq_scb_head() local
2803 item = queue->head; ips_removeq_scb_head()
2805 if (!item) { ips_removeq_scb_head()
2809 queue->head = item->q_next; ips_removeq_scb_head()
2810 item->q_next = NULL; ips_removeq_scb_head()
2812 if (queue->tail == item) ips_removeq_scb_head()
2817 return (item); ips_removeq_scb_head()
2826 /* Remove an item from a queue */
2832 ips_removeq_scb(ips_scb_queue_t * queue, ips_scb_t * item) ips_removeq_scb() argument
2838 if (!item) ips_removeq_scb()
2841 if (item == queue->head) { ips_removeq_scb()
2847 while ((p) && (item != p->q_next)) ips_removeq_scb()
2852 p->q_next = item->q_next; ips_removeq_scb()
2854 if (!item->q_next) ips_removeq_scb()
2857 item->q_next = NULL; ips_removeq_scb()
2860 return (item); ips_removeq_scb()
2872 /* Add an item to the tail of the queue */
2877 static void ips_putq_wait_tail(ips_wait_queue_t *queue, struct scsi_cmnd *item) ips_putq_wait_tail() argument
2881 if (!item) ips_putq_wait_tail()
2884 item->host_scribble = NULL; ips_putq_wait_tail()
2887 queue->tail->host_scribble = (char *) item; ips_putq_wait_tail()
2889 queue->tail = item; ips_putq_wait_tail()
2892 queue->head = item; ips_putq_wait_tail()
2910 struct scsi_cmnd *item; ips_removeq_wait_head() local
2914 item = queue->head; ips_removeq_wait_head()
2916 if (!item) { ips_removeq_wait_head()
2920 queue->head = (struct scsi_cmnd *) item->host_scribble; ips_removeq_wait_head()
2921 item->host_scribble = NULL; ips_removeq_wait_head()
2923 if (queue->tail == item) ips_removeq_wait_head()
2928 return (item); ips_removeq_wait_head()
2937 /* Remove an item from a queue */
2943 struct scsi_cmnd *item) ips_removeq_wait()
2949 if (!item) ips_removeq_wait()
2952 if (item == queue->head) { ips_removeq_wait()
2958 while ((p) && (item != (struct scsi_cmnd *) p->host_scribble)) ips_removeq_wait()
2963 p->host_scribble = item->host_scribble; ips_removeq_wait()
2965 if (!item->host_scribble) ips_removeq_wait()
2968 item->host_scribble = NULL; ips_removeq_wait()
2971 return (item); ips_removeq_wait()
2983 /* Add an item to the tail of the queue */
2989 ips_putq_copp_tail(ips_copp_queue_t * queue, ips_copp_wait_item_t * item) ips_putq_copp_tail() argument
2993 if (!item) ips_putq_copp_tail()
2996 item->next = NULL; ips_putq_copp_tail()
2999 queue->tail->next = item; ips_putq_copp_tail()
3001 queue->tail = item; ips_putq_copp_tail()
3004 queue->head = item; ips_putq_copp_tail()
3023 ips_copp_wait_item_t *item; ips_removeq_copp_head() local
3027 item = queue->head; ips_removeq_copp_head()
3029 if (!item) { ips_removeq_copp_head()
3033 queue->head = item->next; ips_removeq_copp_head()
3034 item->next = NULL; ips_removeq_copp_head()
3036 if (queue->tail == item) ips_removeq_copp_head()
3041 return (item); ips_removeq_copp_head()
3050 /* Remove an item from a queue */
3056 ips_removeq_copp(ips_copp_queue_t * queue, ips_copp_wait_item_t * item) ips_removeq_copp() argument
3062 if (!item) ips_removeq_copp()
3065 if (item == queue->head) { ips_removeq_copp()
3071 while ((p) && (item != p->next)) ips_removeq_copp()
3076 p->next = item->next; ips_removeq_copp()
3078 if (!item->next) ips_removeq_copp()
3081 item->next = NULL; ips_removeq_copp()
3084 return (item); ips_removeq_copp()
3865 /* Remove the item from the active queue */ ips_chkstatus()
2942 ips_removeq_wait(ips_wait_queue_t *queue, struct scsi_cmnd *item) ips_removeq_wait() argument
/linux-4.4.14/sound/drivers/
H A Ddummy.c236 /* ops must be the first item */
373 /* ops must be the first item */
835 value->value.enumerated.item[0] = dummy->iobox; snd_dummy_iobox_get()
845 if (value->value.enumerated.item[0] > 1) snd_dummy_iobox_put()
848 changed = value->value.enumerated.item[0] != dummy->iobox; snd_dummy_iobox_put()
850 dummy->iobox = value->value.enumerated.item[0]; snd_dummy_iobox_put()
962 #define FIELD_ENTRY(item, fmt) { \
963 .name = #item, \
965 .offset = offsetof(struct snd_pcm_hardware, item), \
966 .size = sizeof(dummy_pcm_hardware.item) }
1011 char item[20]; dummy_proc_write() local
1016 ptr = snd_info_get_str(item, line, sizeof(item)); dummy_proc_write()
1018 if (!strcmp(item, fields[i].name)) dummy_proc_write()
1023 snd_info_get_str(item, ptr, sizeof(item)); dummy_proc_write()
1024 if (kstrtoull(item, 0, &val)) dummy_proc_write()
/linux-4.4.14/sound/pci/asihpi/
H A Dasihpi.c1725 ucontrol->value.enumerated.item[0] = 0; snd_asihpi_aesebu_format_get()
1730 ucontrol->value.enumerated.item[0] = 1; snd_asihpi_aesebu_format_get()
1732 ucontrol->value.enumerated.item[0] = 2; snd_asihpi_aesebu_format_get()
1746 if (ucontrol->value.enumerated.item[0] == 1) snd_asihpi_aesebu_format_put()
1748 if (ucontrol->value.enumerated.item[0] == 2) snd_asihpi_aesebu_format_put()
1958 ucontrol->value.enumerated.item[0] = -1; snd_asihpi_tuner_band_get()
1961 ucontrol->value.enumerated.item[0] = idx; snd_asihpi_tuner_band_get()
1983 idx = ucontrol->value.enumerated.item[0]; snd_asihpi_tuner_band_put()
2217 if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) snd_asihpi_mux_info()
2218 uinfo->value.enumerated.item = snd_asihpi_mux_info()
2223 uinfo->value.enumerated.item, snd_asihpi_mux_info()
2250 ucontrol->value.enumerated.item[0] = s; snd_asihpi_mux_get()
2257 ucontrol->value.enumerated.item[0] = 0; snd_asihpi_mux_get()
2272 ucontrol->value.enumerated.item[0], snd_asihpi_mux_put()
2342 ucontrol->value.enumerated.item[0] = mode - 1; snd_asihpi_cmode_get()
2356 ucontrol->value.enumerated.item[0] + 1)); snd_asihpi_cmode_put()
2401 if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) snd_asihpi_clksrc_info()
2402 uinfo->value.enumerated.item = snd_asihpi_clksrc_info()
2406 clkcache->s[uinfo->value.enumerated.item].name); snd_asihpi_clksrc_info()
2420 ucontrol->value.enumerated.item[0] = 0; snd_asihpi_clksrc_get()
2433 ucontrol->value.enumerated.item[0] = i; snd_asihpi_clksrc_get()
2444 unsigned int item; snd_asihpi_clksrc_put() local
2449 item = ucontrol->value.enumerated.item[0]; snd_asihpi_clksrc_put()
2450 if (item >= clkcache->count) snd_asihpi_clksrc_put()
2451 item = clkcache->count-1; snd_asihpi_clksrc_put()
2454 h_control, clkcache->s[item].source)); snd_asihpi_clksrc_put()
2456 if (clkcache->s[item].source == HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT) snd_asihpi_clksrc_put()
2458 h_control, clkcache->s[item].index)); snd_asihpi_clksrc_put()
/linux-4.4.14/fs/ocfs2/dlm/
H A Ddlmrecovery.c91 static void dlm_request_all_locks_worker(struct dlm_work_item *item,
93 static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data);
157 struct dlm_work_item *item, *next; dlm_dispatch_work() local
165 list_for_each_entry(item, &tmp_list, list) { dlm_dispatch_work()
170 list_for_each_entry_safe(item, next, &tmp_list, list) { dlm_dispatch_work()
171 workfunc = item->func; dlm_dispatch_work()
172 list_del_init(&item->list); dlm_dispatch_work()
176 BUG_ON(item->dlm != dlm); dlm_dispatch_work()
180 workfunc(item, item->data); dlm_dispatch_work()
183 kfree(item); dlm_dispatch_work()
836 struct dlm_work_item *item = NULL; dlm_request_all_locks_handler() local
852 item = kzalloc(sizeof(*item), GFP_NOFS); dlm_request_all_locks_handler()
853 if (!item) { dlm_request_all_locks_handler()
861 kfree(item); dlm_request_all_locks_handler()
867 dlm_grab(dlm); /* get an extra ref for the work item */ dlm_request_all_locks_handler()
868 dlm_init_work_item(dlm, item, dlm_request_all_locks_worker, buf); dlm_request_all_locks_handler()
869 item->u.ral.reco_master = lr->node_idx; dlm_request_all_locks_handler()
870 item->u.ral.dead_node = lr->dead_node; dlm_request_all_locks_handler()
872 list_add_tail(&item->list, &dlm->work_list); dlm_request_all_locks_handler()
880 static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) dlm_request_all_locks_worker() argument
890 dlm = item->dlm; dlm_request_all_locks_worker()
891 dead_node = item->u.ral.dead_node; dlm_request_all_locks_worker()
892 reco_master = item->u.ral.reco_master; dlm_request_all_locks_worker()
1374 struct dlm_work_item *item = NULL; dlm_mig_lockres_handler() local
1396 item = kzalloc(sizeof(*item), GFP_NOFS); dlm_mig_lockres_handler()
1397 if (!buf || !item) dlm_mig_lockres_handler()
1497 dlm_grab(dlm); /* get an extra ref for the work item */ dlm_mig_lockres_handler()
1499 dlm_init_work_item(dlm, item, dlm_mig_lockres_worker, buf); dlm_mig_lockres_handler()
1500 item->u.ml.lockres = res; /* already have a ref */ dlm_mig_lockres_handler()
1501 item->u.ml.real_master = real_master; dlm_mig_lockres_handler()
1502 item->u.ml.extra_ref = extra_refs; dlm_mig_lockres_handler()
1504 list_add_tail(&item->list, &dlm->work_list); dlm_mig_lockres_handler()
1516 kfree(item); dlm_mig_lockres_handler()
1524 static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data) dlm_mig_lockres_worker() argument
1533 dlm = item->dlm; dlm_mig_lockres_worker()
1536 res = item->u.ml.lockres; dlm_mig_lockres_worker()
1537 real_master = item->u.ml.real_master; dlm_mig_lockres_worker()
1538 extra_ref = item->u.ml.extra_ref; dlm_mig_lockres_worker()
/linux-4.4.14/drivers/staging/rtl8723au/os_dep/
H A Dmlme_linux.c33 * Caching test item. rtw_reset_securitypriv23a()
/linux-4.4.14/drivers/net/wireless/ath/ath6kl/
H A Dbmi.h226 #define ath6kl_bmi_write_hi32(ar, item, val) \
231 addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \
236 #define ath6kl_bmi_read_hi32(ar, item, val) \
243 addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \
H A Dtarget.h153 * Types for each item must be fixed size across target and host platforms.
302 #define HI_ITEM(item) offsetof(struct host_interest, item)
/linux-4.4.14/sound/isa/msnd/
H A Dmsnd_pinnacle_mixer.c72 ucontrol->value.enumerated.item[0] = 0; snd_msndmix_get_mux()
75 ucontrol->value.enumerated.item[0] = 1; snd_msndmix_get_mux()
78 ucontrol->value.enumerated.item[0] = 2; snd_msndmix_get_mux()
123 return snd_msndmix_set_mux(msnd, ucontrol->value.enumerated.item[0]); snd_msndmix_put_mux()
/linux-4.4.14/drivers/staging/lustre/lustre/libcfs/
H A Dhash.c610 /** return item w/o refcount */
612 /** return item with refcount */
615 /** return item w/o refcount if existed, otherwise add */
618 /** return item with refcount if existed, otherwise add */
658 /* no match item */
698 /* hnode can be NULL, we find the first item with @key */ cfs_hash_bd_finddel_locked()
1220 * Add item @hnode to libcfs hash @hs using @key. The registered
1221 * ops->hs_get function will be called when the item is added.
1264 if (ehnode == hnode) /* new item added */ cfs_hash_find_or_add()
1274 * Add item @hnode to libcfs hash @hs using @key. The registered
1275 * ops->hs_get function will be called if the item was added.
1287 * Add item @hnode to libcfs hash @hs using @key. If this @key
1290 * Otherwise ops->hs_get is called on the item which was added.
1303 * Delete item @hnode from the libcfs hash @hs using @key. The @key
1305 * is no direct linkage from the item to the bucket. The object
1344 * Delete item given @key in libcfs hash @hs. The first @key found in
1357 * Lookup an item using @key in the libcfs hash @hs and return it.
1431 * For each item in the libcfs hash @hs call the passed callback @func
1432 * and pass to it as an argument each hash item and the private @data.
1437 * . if @removal_safe is true, use can remove current item by
1509 * Delete item from the libcfs hash @hs when @func return true.
1569 * Iterate the hash table and call @func on each item without
1573 * a. if rehash_key is enabled, an item can be moved from
1575 * b. user can remove non-zero-ref item from hash-table,
1576 * so the item can be removed from hash-table, even worse,
1671 * or the previously registered callback hs->hs_put must remove the item
1732 * For each item in the libcfs hash @hs which matches the @key call
1734 * item and the private @data. During the callback the bucket lock
H A Dmodule.c219 if (!list_empty(&hand->item)) libcfs_register_ioctl()
222 list_add_tail(&hand->item, &ioctl_list); libcfs_register_ioctl()
234 if (list_empty(&hand->item)) libcfs_deregister_ioctl()
237 list_del_init(&hand->item); libcfs_deregister_ioctl()
282 list_for_each_entry(hand, &ioctl_list, item) { libcfs_ioctl_int()
/linux-4.4.14/sound/pci/ice1712/
H A Dwm8776.c289 .max = 5, /* .enum_names item count */
307 .max = 11, /* .enum_names item count */
318 .max = 11, /* .enum_names item count */
328 .max = 8, /* .enum_names item count */
358 .max = 11, /* .enum_names item count */
369 .max = 11, /* .enum_names item count */
401 .max = 16, /* .enum_names item count */
/linux-4.4.14/sound/usb/line6/
H A Dtoneport.c203 if (uinfo->value.enumerated.item >= size) snd_toneport_source_info()
204 uinfo->value.enumerated.item = size - 1; snd_toneport_source_info()
207 toneport_source_info[uinfo->value.enumerated.item].name); snd_toneport_source_info()
219 ucontrol->value.enumerated.item[0] = toneport->source; snd_toneport_source_get()
232 source = ucontrol->value.enumerated.item[0]; snd_toneport_source_put()
/linux-4.4.14/drivers/media/usb/ttusb-dec/
H A Dttusb_dec.c519 struct list_head *item; ttusb_dec_process_filter() local
527 for (item = dec->filter_info_list.next; item != &dec->filter_info_list; ttusb_dec_process_filter()
528 item = item->next) { ttusb_dec_process_filter()
529 finfo = list_entry(item, struct filter_info, filter_info_list); ttusb_dec_process_filter()
731 struct list_head *item; ttusb_dec_process_urb_frame_list() local
737 if ((item = dec->urb_frame_list.next) != &dec->urb_frame_list) { ttusb_dec_process_urb_frame_list()
738 frame = list_entry(item, struct urb_frame, ttusb_dec_process_urb_frame_list()
1571 struct list_head *item; ttusb_dec_exit_tasklet() local
1576 while ((item = dec->urb_frame_list.next) != &dec->urb_frame_list) { ttusb_dec_exit_tasklet()
1577 frame = list_entry(item, struct urb_frame, urb_frame_list); ttusb_dec_exit_tasklet()
1591 struct list_head *item; ttusb_dec_exit_filters() local
1594 while ((item = dec->filter_info_list.next) != &dec->filter_info_list) { ttusb_dec_exit_filters()
1595 finfo = list_entry(item, struct filter_info, filter_info_list); ttusb_dec_exit_filters()
/linux-4.4.14/sound/soc/
H A Dsoc-ops.c69 unsigned int val, item; snd_soc_get_enum_double() local
77 item = snd_soc_enum_val_to_item(e, val); snd_soc_get_enum_double()
78 ucontrol->value.enumerated.item[0] = item; snd_soc_get_enum_double()
81 item = snd_soc_enum_val_to_item(e, val); snd_soc_get_enum_double()
82 ucontrol->value.enumerated.item[1] = item; snd_soc_get_enum_double()
103 unsigned int *item = ucontrol->value.enumerated.item; snd_soc_put_enum_double() local
107 if (item[0] >= e->items) snd_soc_put_enum_double()
109 val = snd_soc_enum_item_to_val(e, item[0]) << e->shift_l; snd_soc_put_enum_double()
112 if (item[1] >= e->items) snd_soc_put_enum_double()
114 val |= snd_soc_enum_item_to_val(e, item[1]) << e->shift_r; snd_soc_put_enum_double()
943 ucontrol->value.enumerated.item[0] = val ^ invert; snd_soc_get_strobe()
969 unsigned int strobe = ucontrol->value.enumerated.item[0] != 0; snd_soc_put_strobe()
/linux-4.4.14/sound/soc/intel/haswell/
H A Dsst-haswell-ipc.c1434 int ret, item; sst_hsw_dx_set_state() local
1448 for (item = 0; item < dx->entries_no; item++) { sst_hsw_dx_set_state()
1451 item, dx->mem_info[item].offset, sst_hsw_dx_set_state()
1452 dx->mem_info[item].size, sst_hsw_dx_set_state()
1453 dx->mem_info[item].source); sst_hsw_dx_set_state()
1506 u32 item, offset, size; sst_hsw_dx_state_dump() local
1530 for (item = 0; item < hsw->dx.entries_no; item++) { sst_hsw_dx_state_dump()
1531 if (hsw->dx.mem_info[item].source == SST_HSW_DX_TYPE_MEMORY_DUMP sst_hsw_dx_state_dump()
1532 && hsw->dx.mem_info[item].offset > DSP_DRAM_ADDR_OFFSET sst_hsw_dx_state_dump()
1533 && hsw->dx.mem_info[item].offset < sst_hsw_dx_state_dump()
1536 offset = hsw->dx.mem_info[item].offset sst_hsw_dx_state_dump()
1538 size = (hsw->dx.mem_info[item].size + 3) & (~3); sst_hsw_dx_state_dump()
1559 u32 item, offset, size; sst_hsw_dx_state_restore() local
1562 for (item = 0; item < hsw->dx.entries_no; item++) { sst_hsw_dx_state_restore()
1563 if (hsw->dx.mem_info[item].source == SST_HSW_DX_TYPE_MEMORY_DUMP sst_hsw_dx_state_restore()
1564 && hsw->dx.mem_info[item].offset > DSP_DRAM_ADDR_OFFSET sst_hsw_dx_state_restore()
1565 && hsw->dx.mem_info[item].offset < sst_hsw_dx_state_restore()
1568 offset = hsw->dx.mem_info[item].offset sst_hsw_dx_state_restore()
1570 size = (hsw->dx.mem_info[item].size + 3) & (~3); sst_hsw_dx_state_restore()
/linux-4.4.14/drivers/scsi/qla2xxx/
H A Dtcm_qla2xxx.c731 struct config_item *item, char *page) \
733 struct se_portal_group *se_tpg = attrib_to_tpg(item); \
741 struct config_item *item, const char *page, size_t count) \
743 struct se_portal_group *se_tpg = attrib_to_tpg(item); \
785 static ssize_t tcm_qla2xxx_tpg_enable_show(struct config_item *item, tcm_qla2xxx_tpg_enable_show() argument
788 struct se_portal_group *se_tpg = to_tpg(item); tcm_qla2xxx_tpg_enable_show()
824 static ssize_t tcm_qla2xxx_tpg_enable_store(struct config_item *item, tcm_qla2xxx_tpg_enable_store() argument
827 struct se_portal_group *se_tpg = to_tpg(item); tcm_qla2xxx_tpg_enable_store()
867 static ssize_t tcm_qla2xxx_tpg_dynamic_sessions_show(struct config_item *item, tcm_qla2xxx_tpg_dynamic_sessions_show() argument
870 return target_show_dynamic_sessions(to_tpg(item), page); tcm_qla2xxx_tpg_dynamic_sessions_show()
873 static ssize_t tcm_qla2xxx_tpg_fabric_prot_type_store(struct config_item *item, tcm_qla2xxx_tpg_fabric_prot_type_store() argument
876 struct se_portal_group *se_tpg = to_tpg(item); tcm_qla2xxx_tpg_fabric_prot_type_store()
895 static ssize_t tcm_qla2xxx_tpg_fabric_prot_type_show(struct config_item *item, tcm_qla2xxx_tpg_fabric_prot_type_show() argument
898 struct se_portal_group *se_tpg = to_tpg(item); tcm_qla2xxx_tpg_fabric_prot_type_show()
985 static ssize_t tcm_qla2xxx_npiv_tpg_enable_show(struct config_item *item, tcm_qla2xxx_npiv_tpg_enable_show() argument
988 return tcm_qla2xxx_tpg_enable_show(item, page); tcm_qla2xxx_npiv_tpg_enable_show()
991 static ssize_t tcm_qla2xxx_npiv_tpg_enable_store(struct config_item *item, tcm_qla2xxx_npiv_tpg_enable_store() argument
994 struct se_portal_group *se_tpg = to_tpg(item); tcm_qla2xxx_npiv_tpg_enable_store()
1736 static ssize_t tcm_qla2xxx_wwn_version_show(struct config_item *item, tcm_qla2xxx_wwn_version_show() argument
/linux-4.4.14/tools/lib/traceevent/
H A Devent-parse.c163 struct cmdline_list *item; cmdline_init() local
176 item = cmdlist; cmdline_init()
178 free(item); cmdline_init()
298 struct cmdline_list *item; pevent_register_comm() local
303 item = malloc(sizeof(*item)); pevent_register_comm()
304 if (!item) pevent_register_comm()
308 item->comm = strdup(comm); pevent_register_comm()
310 item->comm = strdup("<...>"); pevent_register_comm()
311 if (!item->comm) { pevent_register_comm()
312 free(item); pevent_register_comm()
315 item->pid = pid; pevent_register_comm()
316 item->next = pevent->cmdlist; pevent_register_comm()
318 pevent->cmdlist = item; pevent_register_comm()
384 struct func_list *item; func_map_init() local
400 item = funclist; func_map_init()
402 free(item); func_map_init()
556 struct func_list *item = malloc(sizeof(*item)); pevent_register_function() local
558 if (!item) pevent_register_function()
561 item->next = pevent->funclist; pevent_register_function()
562 item->func = strdup(func); pevent_register_function()
563 if (!item->func) pevent_register_function()
567 item->mod = strdup(mod); pevent_register_function()
568 if (!item->mod) pevent_register_function()
571 item->mod = NULL; pevent_register_function()
572 item->addr = addr; pevent_register_function()
574 pevent->funclist = item; pevent_register_function()
580 free(item->func); pevent_register_function()
581 item->func = NULL; pevent_register_function()
583 free(item); pevent_register_function()
639 struct printk_list *item; printk_map_init() local
654 item = printklist; printk_map_init()
656 free(item); printk_map_init()
696 struct printk_list *item = malloc(sizeof(*item)); pevent_register_print_string() local
699 if (!item) pevent_register_print_string()
702 item->next = pevent->printklist; pevent_register_print_string()
703 item->addr = addr; pevent_register_print_string()
708 item->printk = strdup(fmt); pevent_register_print_string()
709 if (!item->printk) pevent_register_print_string()
712 p = item->printk + strlen(item->printk) - 1; pevent_register_print_string()
720 pevent->printklist = item; pevent_register_print_string()
726 free(item); pevent_register_print_string()
841 free_arg(arg->typecast.item); free_arg()
1520 * the format: type [] item; event_read_fields()
2269 ret = arg_num_eval(arg->typecast.item, val); arg_num_eval()
2428 return arg_eval(arg->typecast.item); arg_eval()
2679 * The item within the parenthesis is another field that holds process_dynamic_array()
2793 * If the next token is an item or another open paren, then process_paren()
2816 arg->typecast.item = item_arg; process_paren()
3539 val = eval_num_arg(data, size, event, arg->typecast.item); eval_num_arg()
3565 larg = larg->typecast.item; eval_num_arg()
5530 * Returns an allocated array of fields. The last item in the array is NULL.
5544 * Returns an allocated array of fields. The last item in the array is NULL.
5624 print_args(args->typecast.item); print_args()
/linux-4.4.14/sound/pci/ac97/
H A Dac97_patch.c96 ucontrol->value.enumerated.item[0] = ac97->indep_surround; ac97_surround_jack_mode_get()
103 unsigned char indep = !!ucontrol->value.enumerated.item[0]; ac97_surround_jack_mode_put()
125 ucontrol->value.enumerated.item[0] = ac97->channel_mode; ac97_channel_mode_get()
132 unsigned char mode = ucontrol->value.enumerated.item[0]; ac97_channel_mode_put()
250 ucontrol->value.enumerated.item[0] = val; snd_ac97_ymf7x3_get_speaker()
260 if (ucontrol->value.enumerated.item[0] > 2) snd_ac97_ymf7x3_put_speaker()
262 val = (ucontrol->value.enumerated.item[0] + 1) << 10; snd_ac97_ymf7x3_put_speaker()
292 ucontrol->value.enumerated.item[0] = (val >> 1) & 1; snd_ac97_ymf7x3_spdif_source_get()
302 if (ucontrol->value.enumerated.item[0] > 1) snd_ac97_ymf7x3_spdif_source_put()
304 val = ucontrol->value.enumerated.item[0] << 1; snd_ac97_ymf7x3_spdif_source_put()
393 ucontrol->value.enumerated.item[0] = (val & 0x0008) ? 2 : (val & 0x0020) ? 1 : 0; snd_ac97_ymf753_spdif_output_pin_get()
402 if (ucontrol->value.enumerated.item[0] > 2) snd_ac97_ymf753_spdif_output_pin_put()
404 val = (ucontrol->value.enumerated.item[0] == 2) ? 0x0008 : snd_ac97_ymf753_spdif_output_pin_put()
405 (ucontrol->value.enumerated.item[0] == 1) ? 0x0020 : 0; snd_ac97_ymf753_spdif_output_pin_put()
1093 ucontrol->value.enumerated.item[0] = 0; snd_ac97_stac9758_output_jack_get()
1095 ucontrol->value.enumerated.item[0] = 1 + (val & 3); snd_ac97_stac9758_output_jack_get()
1105 if (ucontrol->value.enumerated.item[0] > 4) snd_ac97_stac9758_output_jack_put()
1107 if (ucontrol->value.enumerated.item[0] == 0) snd_ac97_stac9758_output_jack_put()
1110 val = 4 | (ucontrol->value.enumerated.item[0] - 1); snd_ac97_stac9758_output_jack_put()
1131 ucontrol->value.enumerated.item[0] = (val >> shift) & 7; snd_ac97_stac9758_input_jack_get()
1141 ucontrol->value.enumerated.item[0] << shift, 0); snd_ac97_stac9758_input_jack_put()
1157 ucontrol->value.enumerated.item[0] = ac97->regs[AC97_SIGMATEL_IOMISC] & 3; snd_ac97_stac9758_phonesel_get()
1166 ucontrol->value.enumerated.item[0], 0); snd_ac97_stac9758_phonesel_put()
1776 ucontrol->value.enumerated.item[0] = (val >> 2) & 1; snd_ac97_ad198x_spdif_source_get()
1785 if (ucontrol->value.enumerated.item[0] > 1) snd_ac97_ad198x_spdif_source_put()
1787 val = ucontrol->value.enumerated.item[0] << 2; snd_ac97_ad198x_spdif_source_put()
1961 ucontrol->value.enumerated.item[0] = 0; snd_ac97_ad1888_downmix_get()
1963 ucontrol->value.enumerated.item[0] = 1 + ((val >> 8) & 1); snd_ac97_ad1888_downmix_get()
1972 if (ucontrol->value.enumerated.item[0] > 2) snd_ac97_ad1888_downmix_put()
1974 if (ucontrol->value.enumerated.item[0] == 0) snd_ac97_ad1888_downmix_put()
1978 ((ucontrol->value.enumerated.item[0] - 1) << 8); snd_ac97_ad1888_downmix_put()
2117 ucontrol->value.enumerated.item[0] = reg2ctrl[val]; snd_ac97_ad1985_vrefout_get()
2128 if (ucontrol->value.enumerated.item[0] > 3) snd_ac97_ad1985_vrefout_put()
2130 val = ctrl2reg[ucontrol->value.enumerated.item[0]] snd_ac97_ad1985_vrefout_put()
2340 ucontrol->value.enumerated.item[0] = val; snd_ac97_ad1986_vrefout_get()
2355 switch (ucontrol->value.enumerated.item[0]) snd_ac97_ad1986_vrefout_put()
2723 ucontrol->value.enumerated.item[0] = val; alc655_iec958_route_get()
2732 (unsigned short)ucontrol->value.enumerated.item[0] << 12, alc655_iec958_route_put()
3008 ucontrol->value.enumerated.item[0] = (val >> 1) & 0x01; snd_ac97_cmedia_spdif_playback_source_get()
3018 (ucontrol->value.enumerated.item[0] & 0x01) << 1); snd_ac97_cmedia_spdif_playback_source_put()
3181 ucontrol->value.enumerated.item[0] = 2; /* SPDIF-loopback */ cm9761_spdif_out_source_get()
3183 ucontrol->value.enumerated.item[0] = 1; /* ADC loopback */ cm9761_spdif_out_source_get()
3185 ucontrol->value.enumerated.item[0] = 0; /* AC-link */ cm9761_spdif_out_source_get()
3193 if (ucontrol->value.enumerated.item[0] == 2) cm9761_spdif_out_source_put()
3197 ucontrol->value.enumerated.item[0] == 1 ? 0x2 : 0); cm9761_spdif_out_source_put()
3537 ucontrol->value.enumerated.item[0] = (usSM51 << 1) + usMS; snd_ac97_vt1617a_smart51_get()
3551 usSM51 = ucontrol->value.enumerated.item[0] >> 1; snd_ac97_vt1617a_smart51_put()
3552 usMS = ucontrol->value.enumerated.item[0] & 1; snd_ac97_vt1617a_smart51_put()
3708 ucontrol->value.enumerated.item[0] = uaj >> snd_ac97_vt1618_UAJ_get()
3719 ucontrol->value.enumerated.item[0]<< snd_ac97_vt1618_UAJ_put()
3737 ucontrol->value.enumerated.item[0] = snd_ac97_vt1618_aux_get()
3748 ucontrol->value.enumerated.item[0] << 3); snd_ac97_vt1618_aux_put()
3753 ucontrol->value.enumerated.item[0] << 3); snd_ac97_vt1618_aux_put()
/linux-4.4.14/drivers/target/loopback/
H A Dtcm_loop.c765 struct config_item *item, char *page) tcm_loop_tpg_attrib_fabric_prot_type_show()
767 struct se_portal_group *se_tpg = attrib_to_tpg(item); tcm_loop_tpg_attrib_fabric_prot_type_show()
775 struct config_item *item, const char *page, size_t count) tcm_loop_tpg_attrib_fabric_prot_type_store()
777 struct se_portal_group *se_tpg = attrib_to_tpg(item); tcm_loop_tpg_attrib_fabric_prot_type_store()
894 static ssize_t tcm_loop_tpg_nexus_show(struct config_item *item, char *page) tcm_loop_tpg_nexus_show() argument
896 struct se_portal_group *se_tpg = to_tpg(item); tcm_loop_tpg_nexus_show()
912 static ssize_t tcm_loop_tpg_nexus_store(struct config_item *item, tcm_loop_tpg_nexus_store() argument
915 struct se_portal_group *se_tpg = to_tpg(item); tcm_loop_tpg_nexus_store()
990 static ssize_t tcm_loop_tpg_transport_status_show(struct config_item *item, tcm_loop_tpg_transport_status_show() argument
993 struct se_portal_group *se_tpg = to_tpg(item); tcm_loop_tpg_transport_status_show()
1016 static ssize_t tcm_loop_tpg_transport_status_store(struct config_item *item, tcm_loop_tpg_transport_status_store() argument
1019 struct se_portal_group *se_tpg = to_tpg(item); tcm_loop_tpg_transport_status_store()
1212 static ssize_t tcm_loop_wwn_version_show(struct config_item *item, char *page) tcm_loop_wwn_version_show() argument
764 tcm_loop_tpg_attrib_fabric_prot_type_show( struct config_item *item, char *page) tcm_loop_tpg_attrib_fabric_prot_type_show() argument
774 tcm_loop_tpg_attrib_fabric_prot_type_store( struct config_item *item, const char *page, size_t count) tcm_loop_tpg_attrib_fabric_prot_type_store() argument
/linux-4.4.14/net/irda/
H A Dirqueue.c230 * Insert item first in queue.
528 * Check if this item is the currently selected item, and in hashbin_remove_first()
616 * Check if this item is the currently selected item, and in hashbin_remove()
686 * Check if this item is the currently selected item, and in hashbin_remove_this()
706 * Find item with the given hashv or name
758 * Find item with the given hashv or name
787 * Find an item with the given hashv or name, and its successor
805 * This allow to check if the current item is still in the hashbin_find_next()
851 * Did not find any item in hashbin hashbin_get_first()
860 * Get next item in hashbin. A series of hashbin_get_next() calls must
/linux-4.4.14/sound/pci/hda/
H A Dhda_auto_parser.c128 struct auto_pin_cfg_item *item, can_be_headset_mic()
133 if (item->type != AUTO_PIN_MIC) can_be_headset_mic()
136 if (item->is_headset_mic || item->is_headphone_mic) can_be_headset_mic()
139 def_conf = snd_hda_codec_get_pincfg(codec, item->pin); can_be_headset_mic()
474 * @item: ping config item to refer
483 const struct auto_pin_cfg_item *item, hda_get_input_pin_label()
496 if (item && item->is_headset_mic) hda_get_input_pin_label()
498 if (item && item->is_headphone_mic) hda_get_input_pin_label()
566 * Get a label for the given input pin defined by the autocfg item.
127 can_be_headset_mic(struct hda_codec *codec, struct auto_pin_cfg_item *item, int seq_number) can_be_headset_mic() argument
482 hda_get_input_pin_label(struct hda_codec *codec, const struct auto_pin_cfg_item *item, hda_nid_t pin, bool check_location) hda_get_input_pin_label() argument
/linux-4.4.14/drivers/video/fbdev/nvidia/
H A Dnv_dma.h30 |* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
34 |* ment only as a commercial end item. Consistent with 48 C.F.R. *|
H A Dnv_local.h29 |* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
33 |* ment only as a commercial end item. Consistent with 48 C.F.R. *|
/linux-4.4.14/sound/aoa/soundbus/i2sbus/
H A Dcontrol.c69 list_add(&i2sdev->item, &c->list); i2sbus_control_add_dev()
78 list_del(&i2sdev->item); i2sbus_control_remove_dev()
H A Di2sbus.h76 struct list_head item; member in struct:i2sbus_dev
/linux-4.4.14/drivers/media/usb/gspca/gl860/
H A Dgl860.h61 struct gspca_dev gspca_dev; /* !! must be the first item */
/linux-4.4.14/drivers/net/wireless/b43/
H A Dlo.h66 * the item really expired when the 15 second timer hits, we
/linux-4.4.14/drivers/platform/x86/
H A Dsony-laptop.c974 struct sony_nc_value *item = sony_nc_sysfs_show() local
977 if (!*item->acpiget) sony_nc_sysfs_show()
980 ret = sony_nc_int_call(sony_nc_acpi_handle, *item->acpiget, NULL, sony_nc_sysfs_show()
985 if (item->validate) sony_nc_sysfs_show()
986 value = item->validate(SNC_VALIDATE_OUT, value); sony_nc_sysfs_show()
997 struct sony_nc_value *item = sony_nc_sysfs_store() local
1000 if (!item->acpiset) sony_nc_sysfs_store()
1009 if (item->validate) sony_nc_sysfs_store()
1010 value = item->validate(SNC_VALIDATE_IN, value); sony_nc_sysfs_store()
1015 ret = sony_nc_int_call(sony_nc_acpi_handle, *item->acpiset, sony_nc_sysfs_store()
1020 item->value = value; sony_nc_sysfs_store()
1021 item->valid = 1; sony_nc_sysfs_store()
1565 struct sony_nc_value *item; sony_nc_resume() local
1567 for (item = sony_nc_values; item->name; item++) { sony_nc_resume()
1570 if (!item->valid) sony_nc_resume()
1572 ret = sony_nc_int_call(sony_nc_acpi_handle, *item->acpiset, sony_nc_resume()
1573 &item->value, NULL); sony_nc_resume()
3152 struct sony_nc_value *item; sony_nc_add() local
3207 for (item = sony_nc_values; item->name; ++item) { sony_nc_add()
3209 if (!debug && item->debug) sony_nc_add()
3213 for (; item->acpiget && *item->acpiget; ++item->acpiget) { sony_nc_add()
3215 *item->acpiget)) { sony_nc_add()
3217 item->name, *item->acpiget); sony_nc_add()
3218 item->devattr.attr.mode |= S_IRUGO; sony_nc_add()
3224 for (; item->acpiset && *item->acpiset; ++item->acpiset) { sony_nc_add()
3226 *item->acpiset)) { sony_nc_add()
3228 item->name, *item->acpiset); sony_nc_add()
3229 item->devattr.attr.mode |= S_IWUSR; sony_nc_add()
3234 if (item->devattr.attr.mode != 0) { sony_nc_add()
3237 &item->devattr); sony_nc_add()
3247 for (item = sony_nc_values; item->name; ++item) { sony_nc_add()
3248 device_remove_file(&sony_pf_device->dev, &item->devattr); sony_nc_add()
3267 struct sony_nc_value *item; sony_nc_remove() local
3273 for (item = sony_nc_values; item->name; ++item) { sony_nc_remove()
3274 device_remove_file(&sony_pf_device->dev, &item->devattr); sony_nc_remove()
/linux-4.4.14/tools/testing/ktest/
H A Dktest.pl3059 foreach my $item (keys %a) {
3060 if (defined($b{$item}) && $b{$item} ne $a{$item}) {
3061 $ret{$item} = $b{$item};
3078 foreach my $item (keys %b) {
3079 if (!defined($a{$item})) {
3080 $ret{$item} = $b{$item};
3089 # +1 if a and b have a different item.
3100 foreach my $item (keys %b) {
3101 if (!defined($a{$item})) {
3104 if ($a{$item} ne $b{$item}) {
3109 foreach my $item (keys %a) {
3110 if (!defined($b{$item})) {
3220 foreach my $item (@diff_arr) {
3221 $tmp_config{$item} = $good_configs{$item};
3242 foreach my $item (@tophalf) {
3243 $tmp_config{$item} = $good_configs{$item};
3256 foreach my $item (@bottomhalf) {
3257 $tmp_config{$item} = $good_configs{$item};
3446 foreach my $item (@list) {
3447 my $sha1 = $item;
3450 doprint "\nProcessing commit \"$item\"\n\n";
3456 if ($item eq $list[0] ||
3457 $item eq $list[$#list]) {
/linux-4.4.14/drivers/staging/lustre/include/linux/libcfs/
H A Dlibcfs_ioctl.h92 struct list_head item; member in struct:libcfs_ioctl_handler
98 /* .item = */ LIST_HEAD_INIT(ident.item), \
/linux-4.4.14/drivers/infiniband/hw/mlx5/
H A Dcq.c379 struct ib_sig_err *item) get_sig_err_item()
388 item->err_type = IB_SIG_BAD_GUARD; get_sig_err_item()
389 item->expected = be32_to_cpu(cqe->expected_trans_sig) >> 16; get_sig_err_item()
390 item->actual = be32_to_cpu(cqe->actual_trans_sig) >> 16; get_sig_err_item()
393 item->err_type = IB_SIG_BAD_REFTAG; get_sig_err_item()
394 item->expected = be32_to_cpu(cqe->expected_reftag); get_sig_err_item()
395 item->actual = be32_to_cpu(cqe->actual_reftag); get_sig_err_item()
398 item->err_type = IB_SIG_BAD_APPTAG; get_sig_err_item()
399 item->expected = be32_to_cpu(cqe->expected_trans_sig) & 0xffff; get_sig_err_item()
400 item->actual = be32_to_cpu(cqe->actual_trans_sig) & 0xffff; get_sig_err_item()
406 item->sig_err_offset = be64_to_cpu(cqe->err_offset); get_sig_err_item()
407 item->key = be32_to_cpu(cqe->mkey); get_sig_err_item()
378 get_sig_err_item(struct mlx5_sig_err_cqe *cqe, struct ib_sig_err *item) get_sig_err_item() argument
/linux-4.4.14/drivers/gpu/drm/radeon/
H A Dradeon_mn.c64 * @work: previously sheduled work item
66 * Lazy destroys the notifier from a work item
100 * Shedule a work item to lazy destroy our notifier.
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_mn.c64 * @work: previously sheduled work item
66 * Lazy destroys the notifier from a work item
100 * Shedule a work item to lazy destroy our notifier.
/linux-4.4.14/drivers/target/sbp/
H A Dsbp_target.c2112 static ssize_t sbp_wwn_version_show(struct config_item *item, char *page) sbp_wwn_version_show() argument
2124 static ssize_t sbp_tpg_directory_id_show(struct config_item *item, char *page) sbp_tpg_directory_id_show() argument
2126 struct se_portal_group *se_tpg = to_tpg(item); sbp_tpg_directory_id_show()
2136 static ssize_t sbp_tpg_directory_id_store(struct config_item *item, sbp_tpg_directory_id_store() argument
2139 struct se_portal_group *se_tpg = to_tpg(item); sbp_tpg_directory_id_store()
2163 static ssize_t sbp_tpg_enable_show(struct config_item *item, char *page) sbp_tpg_enable_show() argument
2165 struct se_portal_group *se_tpg = to_tpg(item); sbp_tpg_enable_show()
2171 static ssize_t sbp_tpg_enable_store(struct config_item *item, sbp_tpg_enable_store() argument
2174 struct se_portal_group *se_tpg = to_tpg(item); sbp_tpg_enable_store()
2223 static ssize_t sbp_tpg_attrib_mgt_orb_timeout_show(struct config_item *item, sbp_tpg_attrib_mgt_orb_timeout_show() argument
2226 struct se_portal_group *se_tpg = attrib_to_tpg(item); sbp_tpg_attrib_mgt_orb_timeout_show()
2232 static ssize_t sbp_tpg_attrib_mgt_orb_timeout_store(struct config_item *item, sbp_tpg_attrib_mgt_orb_timeout_store() argument
2235 struct se_portal_group *se_tpg = attrib_to_tpg(item); sbp_tpg_attrib_mgt_orb_timeout_store()
2258 static ssize_t sbp_tpg_attrib_max_reconnect_timeout_show(struct config_item *item, sbp_tpg_attrib_max_reconnect_timeout_show() argument
2261 struct se_portal_group *se_tpg = attrib_to_tpg(item); sbp_tpg_attrib_max_reconnect_timeout_show()
2267 static ssize_t sbp_tpg_attrib_max_reconnect_timeout_store(struct config_item *item, sbp_tpg_attrib_max_reconnect_timeout_store() argument
2270 struct se_portal_group *se_tpg = attrib_to_tpg(item); sbp_tpg_attrib_max_reconnect_timeout_store()
2293 static ssize_t sbp_tpg_attrib_max_logins_per_lun_show(struct config_item *item, sbp_tpg_attrib_max_logins_per_lun_show() argument
2296 struct se_portal_group *se_tpg = attrib_to_tpg(item); sbp_tpg_attrib_max_logins_per_lun_show()
2302 static ssize_t sbp_tpg_attrib_max_logins_per_lun_store(struct config_item *item, sbp_tpg_attrib_max_logins_per_lun_store() argument
2305 struct se_portal_group *se_tpg = attrib_to_tpg(item); sbp_tpg_attrib_max_logins_per_lun_store()
/linux-4.4.14/block/partitions/
H A Dldm.c606 struct list_head *item; ldm_get_disk_objid() local
610 list_for_each (item, &ldb->v_disk) { ldm_get_disk_objid()
611 struct vblk *v = list_entry (item, struct vblk, list); ldm_get_disk_objid()
639 struct list_head *item; ldm_create_data_partitions() local
656 list_for_each (item, &ldb->v_part) { ldm_create_data_partitions()
657 vb = list_entry (item, struct vblk, list); ldm_create_data_partitions()
1237 struct list_head *item; ldm_ldmdb_add() local
1270 list_for_each (item, &ldb->v_part) { ldm_ldmdb_add()
1271 struct vblk *v = list_entry (item, struct vblk, list); ldm_ldmdb_add()
1299 struct list_head *item; ldm_frag_add() local
1321 list_for_each (item, frags) { list_for_each()
1322 f = list_entry (item, struct frag, list); list_for_each()
1368 struct list_head *item, *tmp; ldm_frag_free() local
1372 list_for_each_safe (item, tmp, list) ldm_frag_free()
1373 kfree (list_entry (item, struct frag, list)); ldm_frag_free()
1390 struct list_head *item; ldm_frag_commit() local
1394 list_for_each (item, frags) { list_for_each()
1395 f = list_entry (item, struct frag, list); list_for_each()
1483 struct list_head *item, *tmp; ldm_free_vblks() local
1487 list_for_each_safe (item, tmp, lh) ldm_free_vblks()
1488 kfree (list_entry (item, struct vblk, list)); ldm_free_vblks()
/linux-4.4.14/drivers/gpu/drm/msm/hdmi/
H A Dhdmi.c327 #define HDMI_CFG(item, entry) \
328 .item ## _names = item ##_names_ ## entry, \
329 .item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry)
/linux-4.4.14/scripts/basic/
H A Dfixdep.c141 struct item { struct
142 struct item *next;
149 static struct item *hashtab[HASHSZ];
166 struct item *aux; is_defined_config()
181 struct item *aux = malloc(sizeof(*aux) + len); define_config()
/linux-4.4.14/sound/isa/
H A Dcmi8328.c194 /* find index of an item in "-1"-ended array */ array_find()
195 int array_find(int array[], int item) array_find() argument
200 if (array[i] == item) array_find()
206 int array_find_l(long array[], long item) array_find_l() argument
211 if (array[i] == item) array_find_l()

Completed in 6734 milliseconds

1234