Lines Matching refs:top

71 	struct lu_object_header *top;
77 top = o->lo_header;
88 LASSERT(top->loh_hash.next == NULL
89 && top->loh_hash.pprev == NULL);
90 LASSERT(list_empty(&top->loh_lru));
91 if (!atomic_dec_and_test(&top->loh_ref))
93 list_for_each_entry_reverse(o, &top->loh_layers, lo_linkage) {
101 cfs_hash_bd_get(site->ls_obj_hash, &top->loh_fid, &bd);
104 if (!cfs_hash_bd_dec_and_lock(site->ls_obj_hash, &bd, &top->loh_ref)) {
105 if (lu_object_is_dying(top)) {
122 list_for_each_entry_reverse(o, &top->loh_layers, lo_linkage) {
127 if (!lu_object_is_dying(top)) {
128 LASSERT(list_empty(&top->loh_lru));
129 list_add_tail(&top->loh_lru, &bkt->lsb_lru);
145 if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags))
146 cfs_hash_bd_del_locked(site->ls_obj_hash, &bd, &top->loh_hash);
173 struct lu_object_header *top;
175 top = o->lo_header;
176 set_bit(LU_OBJECT_HEARD_BANSHEE, &top->loh_flags);
177 if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) {
181 cfs_hash_bd_get_and_lock(obj_hash, &top->loh_fid, &bd, 1);
182 list_del_init(&top->loh_lru);
183 cfs_hash_bd_del_locked(obj_hash, &bd, &top->loh_hash);
201 struct lu_object *top;
209 * Create top-level object slice. This will also create
212 top = dev->ld_ops->ldo_object_alloc(env, NULL, dev);
213 if (top == NULL)
215 if (IS_ERR(top))
216 return top;
221 top->lo_header->loh_fid = *f;
222 layers = &top->lo_header->loh_layers;
235 scan->lo_header = top->lo_header;
238 lu_object_free(env, top);
251 lu_object_free(env, top);
258 return top;
287 * top-level slice.
293 * Free layers in bottom-to-top order, so that object header
495 struct lu_object_header *top;
498 top = o->lo_header;
499 lu_object_header_print(env, cookie, printer, top);
502 list_for_each_entry(o, &top->loh_layers, lo_linkage) {
515 (*printer)(env, cookie, "} header@%p\n", top);
524 struct lu_object_header *top;
526 top = o->lo_header;
527 list_for_each_entry(o, &top->loh_layers, lo_linkage) {
694 * Much like lu_object_find(), but top level device of object is specifically
695 * \a dev rather than top level device of the site. This interface allows
730 struct lu_object *top;
733 top = lu_object_find(env, dev, f, conf);
734 if (!IS_ERR(top)) {
735 obj = lu_object_locate(top->lo_header, dev->ld_type);
737 lu_object_put(env, top);
739 obj = top;
972 * Initialize site \a s, with \a d as the top level device.
983 int lu_site_init(struct lu_site *s, struct lu_device *top)
993 snprintf(name, 16, "lu_site_%s", top->ld_type->ldt_name);
1040 s->ls_top_dev = top;
1041 top->ld_site = s;
1042 lu_device_get(top);
1043 lu_ref_add(&top->ld_reference, "site-top", s);
1048 lu_dev_add_linkage(s, top);
1070 lu_ref_del(&s->ls_top_dev->ld_reference, "site-top", s);
1191 * This is typically called by the ->ldo_object_alloc() method of top-level
1265 void lu_stack_fini(const struct lu_env *env, struct lu_device *top)
1267 struct lu_site *site = top->ld_site;
1272 for (scan = top; scan != NULL; scan = next) {
1281 for (scan = top; scan != NULL; scan = next) {
1830 * Lustre on top of ZFS. This occurs between one of ZFS's