Home
last modified time | relevance | path

Searched refs:ref (Results 1 – 25 of 32) sorted by relevance

12

/fs/btrfs/
Dref-cache.c38 struct btrfs_leaf_ref *ref; in btrfs_alloc_leaf_ref() local
41 ref = kmalloc(size, GFP_NOFS); in btrfs_alloc_leaf_ref()
42 if (ref) { in btrfs_alloc_leaf_ref()
47 memset(ref, 0, sizeof(*ref)); in btrfs_alloc_leaf_ref()
48 atomic_set(&ref->usage, 1); in btrfs_alloc_leaf_ref()
49 INIT_LIST_HEAD(&ref->list); in btrfs_alloc_leaf_ref()
51 return ref; in btrfs_alloc_leaf_ref()
58 void btrfs_free_leaf_ref(struct btrfs_root *root, struct btrfs_leaf_ref *ref) in btrfs_free_leaf_ref() argument
60 if (!ref) in btrfs_free_leaf_ref()
62 WARN_ON(atomic_read(&ref->usage) == 0); in btrfs_free_leaf_ref()
[all …]
Dinode-item.c27 struct btrfs_inode_ref *ref; in find_name_in_backref() local
38 ref = (struct btrfs_inode_ref *)(ptr + cur_offset); in find_name_in_backref()
39 len = btrfs_inode_ref_name_len(leaf, ref); in find_name_in_backref()
40 name_ptr = (unsigned long)(ref + 1); in find_name_in_backref()
41 cur_offset += len + sizeof(*ref); in find_name_in_backref()
45 *ref_ret = ref; in find_name_in_backref()
59 struct btrfs_inode_ref *ref; in btrfs_del_inode_ref() local
66 int del_len = name_len + sizeof(*ref); in btrfs_del_inode_ref()
83 if (!find_name_in_backref(path, name, name_len, &ref)) { in btrfs_del_inode_ref()
91 *index = btrfs_inode_ref_index(leaf, ref); in btrfs_del_inode_ref()
[all …]
Dprint-tree.c61 struct btrfs_extent_ref *ref; in btrfs_print_leaf() local
108 ref = btrfs_item_ptr(l, i, struct btrfs_extent_ref); in btrfs_print_leaf()
111 (unsigned long long)btrfs_ref_root(l, ref), in btrfs_print_leaf()
112 (unsigned long long)btrfs_ref_generation(l, ref), in btrfs_print_leaf()
113 (unsigned long long)btrfs_ref_objectid(l, ref), in btrfs_print_leaf()
114 (unsigned long)btrfs_ref_num_refs(l, ref)); in btrfs_print_leaf()
Dextent-tree.c524 struct btrfs_extent_ref *ref; in lookup_extent_backref() local
542 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref); in lookup_extent_backref()
543 ref_objectid = btrfs_ref_objectid(leaf, ref); in lookup_extent_backref()
544 if (btrfs_ref_root(leaf, ref) != ref_root || in lookup_extent_backref()
545 btrfs_ref_generation(leaf, ref) != ref_generation || in lookup_extent_backref()
567 struct btrfs_extent_ref *ref; in update_backrefs() local
589 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref); in update_backrefs()
591 ref_objectid = btrfs_ref_objectid(leaf, ref); in update_backrefs()
593 if (btrfs_ref_root(leaf, ref) != ref_root || in update_backrefs()
594 btrfs_ref_generation(leaf, ref) != op->orig_generation || in update_backrefs()
[all …]
Droot-tree.c340 struct btrfs_root_ref *ref; in btrfs_add_root_ref() local
352 sizeof(*ref) + name_len); in btrfs_add_root_ref()
356 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
357 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
358 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref()
359 btrfs_set_root_ref_name_len(leaf, ref, name_len); in btrfs_add_root_ref()
360 ptr = (unsigned long)(ref + 1); in btrfs_add_root_ref()
Dref-cache.h68 void btrfs_free_leaf_ref(struct btrfs_root *root, struct btrfs_leaf_ref *ref);
71 int btrfs_add_leaf_ref(struct btrfs_root *root, struct btrfs_leaf_ref *ref,
75 int btrfs_remove_leaf_ref(struct btrfs_root *root, struct btrfs_leaf_ref *ref);
Dtree-log.c666 struct btrfs_inode_ref *ref; in backref_in_log() local
684 ref = (struct btrfs_inode_ref *)ptr; in backref_in_log()
685 found_name_len = btrfs_inode_ref_name_len(path->nodes[0], ref); in backref_in_log()
687 name_ptr = (unsigned long)(ref + 1); in backref_in_log()
695 ptr = (unsigned long)(ref + 1) + found_name_len; in backref_in_log()
719 struct btrfs_inode_ref *ref; in add_inode_ref() local
748 ref = (struct btrfs_inode_ref *)ref_ptr; in add_inode_ref()
750 namelen = btrfs_inode_ref_name_len(eb, ref); in add_inode_ref()
754 read_extent_buffer(eb, name, (unsigned long)(ref + 1), namelen); in add_inode_ref()
758 btrfs_inode_ref_index(eb, ref), in add_inode_ref()
[all …]
DMakefile10 ref-cache.o export.o tree-log.o acl.o free-space-cache.o zlib.o \
/fs/jffs2/
Dxattr.c437 static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) in verify_xattr_ref() argument
447 if (ref_flags(ref->node) != REF_UNCHECKED) in verify_xattr_ref()
449 offset = ref_offset(ref->node); in verify_xattr_ref()
475 ref->ino = je32_to_cpu(rr.ino); in verify_xattr_ref()
476 ref->xid = je32_to_cpu(rr.xid); in verify_xattr_ref()
477 ref->xseqno = je32_to_cpu(rr.xseqno); in verify_xattr_ref()
478 if (ref->xseqno > c->highest_xseqno) in verify_xattr_ref()
479 c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); in verify_xattr_ref()
483 for (raw=ref->node; raw != (void *)ref; raw=raw->next_in_ino) { in verify_xattr_ref()
490 raw->flash_offset = ref_offset(raw) | ((ref->node==raw) ? REF_PRISTINE : REF_NORMAL); in verify_xattr_ref()
[all …]
Dmalloc.c211 struct jffs2_raw_node_ref **p, *ref; in jffs2_prealloc_raw_node_refs() local
217 ref = *p; in jffs2_prealloc_raw_node_refs()
222 if (ref && ref->flash_offset != REF_EMPTY_NODE) in jffs2_prealloc_raw_node_refs()
223 ref++; in jffs2_prealloc_raw_node_refs()
226 if (!ref) { in jffs2_prealloc_raw_node_refs()
228 ref = *p = jffs2_alloc_refblock(); in jffs2_prealloc_raw_node_refs()
229 if (!ref) in jffs2_prealloc_raw_node_refs()
232 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_prealloc_raw_node_refs()
233 p = &ref->next_in_ino; in jffs2_prealloc_raw_node_refs()
234 ref = *p; in jffs2_prealloc_raw_node_refs()
[all …]
Dreadinode.c31 struct jffs2_raw_node_ref *ref = tn->fn->raw; in check_node_data() local
41 ofs = ref_offset(ref) + sizeof(struct jffs2_raw_inode); in check_node_data()
51 ref_offset(ref), tn->csize, ofs); in check_node_data()
60 ref_offset(ref), tn->csize, tn->partial_crc, tn->data_crc, ofs - len, ofs, len); in check_node_data()
109 ref_offset(ref), tn->data_crc, crc); in check_node_data()
114 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in check_node_data()
115 len = ref_totlen(c, jeb, ref); in check_node_data()
120 ref->flash_offset |= REF_PRISTINE; in check_node_data()
585 static struct jffs2_raw_node_ref *jffs2_first_valid_node(struct jffs2_raw_node_ref *ref) in jffs2_first_valid_node() argument
587 while (ref && ref->next_in_ino) { in jffs2_first_valid_node()
[all …]
Dnodelist.c613 struct jffs2_raw_node_ref *ref; in jffs2_link_node_ref() local
618 ref = jeb->last_node; in jffs2_link_node_ref()
620 dbg_noderef("Last node at %p is (%08x,%p)\n", ref, ref->flash_offset, in jffs2_link_node_ref()
621 ref->next_in_ino); in jffs2_link_node_ref()
623 while (ref->flash_offset != REF_EMPTY_NODE) { in jffs2_link_node_ref()
624 if (ref->flash_offset == REF_LINK_NODE) in jffs2_link_node_ref()
625 ref = ref->next_in_ino; in jffs2_link_node_ref()
627 ref++; in jffs2_link_node_ref()
630 dbg_noderef("New ref is %p (%08x becomes %08x,%p) len 0x%x\n", ref, in jffs2_link_node_ref()
631 ref->flash_offset, ofs, ref->next_in_ino, len); in jffs2_link_node_ref()
[all …]
Dnodemgmt.c491 void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref) in jffs2_mark_node_obsolete() argument
500 if(unlikely(!ref)) { in jffs2_mark_node_obsolete()
504 if (ref_obsolete(ref)) { in jffs2_mark_node_obsolete()
505 …_DEBUG "jffs2_mark_node_obsolete called with already obsolete node at 0x%08x\n", ref_offset(ref))); in jffs2_mark_node_obsolete()
508 blocknr = ref->flash_offset / c->sector_size; in jffs2_mark_node_obsolete()
510 printk(KERN_NOTICE "raw node at 0x%08x is off the end of device!\n", ref->flash_offset); in jffs2_mark_node_obsolete()
528 freed_len = ref_totlen(c, jeb, ref); in jffs2_mark_node_obsolete()
530 if (ref_flags(ref) == REF_UNCHECKED) { in jffs2_mark_node_obsolete()
533 freed_len, blocknr, ref->flash_offset, jeb->used_size); in jffs2_mark_node_obsolete()
536 …D1(printk(KERN_DEBUG "Obsoleting previously unchecked node at 0x%08x of len %x: ", ref_offset(ref)… in jffs2_mark_node_obsolete()
[all …]
Dnodelist.h102 static inline struct jffs2_raw_node_ref *ref_next(struct jffs2_raw_node_ref *ref) in ref_next() argument
104 ref++; in ref_next()
107 if (ref->flash_offset == REF_LINK_NODE) { in ref_next()
108 ref = ref->next_in_ino; in ref_next()
109 if (!ref) in ref_next()
110 return ref; in ref_next()
114 if (ref->flash_offset == REF_EMPTY_NODE) in ref_next()
117 return ref; in ref_next()
137 #define ref_flags(ref) ((ref)->flash_offset & 3) argument
138 #define ref_offset(ref) ((ref)->flash_offset & ~3) argument
[all …]
Derase.c225 struct jffs2_raw_node_ref *ref, struct jffs2_eraseblock *jeb) in jffs2_remove_node_refs_from_ino_list() argument
230 prev = &ref->next_in_ino; in jffs2_remove_node_refs_from_ino_list()
251 if (this == ref) in jffs2_remove_node_refs_from_ino_list()
305 struct jffs2_raw_node_ref *block, *ref; in jffs2_free_jeb_node_refs() local
308 block = ref = jeb->first_node; in jffs2_free_jeb_node_refs()
310 while (ref) { in jffs2_free_jeb_node_refs()
311 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_free_jeb_node_refs()
312 ref = ref->next_in_ino; in jffs2_free_jeb_node_refs()
314 block = ref; in jffs2_free_jeb_node_refs()
317 if (ref->flash_offset != REF_EMPTY_NODE && ref->next_in_ino) in jffs2_free_jeb_node_refs()
[all …]
Dxattr.h66 static inline int is_xattr_ref_dead(struct jffs2_xattr_ref *ref) in is_xattr_ref_dead() argument
68 return ((ref->xseqno & XREF_DELETE_MARKER) != 0); in is_xattr_ref_dead()
85 extern int jffs2_garbage_collect_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref,
89 extern void jffs2_release_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref);
Dscan.c377 struct jffs2_xattr_ref *ref; in jffs2_scan_xref_node() local
399 ref = jffs2_alloc_xattr_ref(); in jffs2_scan_xref_node()
400 if (!ref) in jffs2_scan_xref_node()
412 ref->ino = je32_to_cpu(rr->ino); in jffs2_scan_xref_node()
413 ref->xid = je32_to_cpu(rr->xid); in jffs2_scan_xref_node()
414 ref->xseqno = je32_to_cpu(rr->xseqno); in jffs2_scan_xref_node()
415 if (ref->xseqno > c->highest_xseqno) in jffs2_scan_xref_node()
416 c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); in jffs2_scan_xref_node()
417 ref->next = c->xref_temp; in jffs2_scan_xref_node()
418 c->xref_temp = ref; in jffs2_scan_xref_node()
[all …]
Dsummary.c518 struct jffs2_xattr_ref *ref; in jffs2_sum_process_sum_data() local
527 ref = jffs2_alloc_xattr_ref(); in jffs2_sum_process_sum_data()
528 if (!ref) { in jffs2_sum_process_sum_data()
532 ref->next = c->xref_temp; in jffs2_sum_process_sum_data()
533 c->xref_temp = ref; in jffs2_sum_process_sum_data()
536 PAD(sizeof(struct jffs2_raw_xref)), (void *)ref); in jffs2_sum_process_sum_data()
538 *pseudo_random += ref->node->flash_offset; in jffs2_sum_process_sum_data()
Ddebug.c396 struct jffs2_raw_node_ref *ref; in __jffs2_dbg_dump_node_refs_nolock() local
406 for (ref = jeb->first_node; ; ref = ref_next(ref)) { in __jffs2_dbg_dump_node_refs_nolock()
407 printk("%#08x", ref_offset(ref)); in __jffs2_dbg_dump_node_refs_nolock()
409 printk("(%x)", ref->__totlen); in __jffs2_dbg_dump_node_refs_nolock()
411 if (ref_next(ref)) in __jffs2_dbg_dump_node_refs_nolock()
/fs/cifs/
Dcifs_dfs_ref.c121 const struct dfs_info3_param *ref, in compose_mount_options() argument
136 *devname = cifs_get_share_name(ref->node_name); in compose_mount_options()
148 strlen(ref->node_name) + 12; in compose_mount_options()
198 tkn_e = strchr(ref->node_name + 2, '\\'); in compose_mount_options()
217 if (tkn_e || (strlen(fullpath) - ref->path_consumed)) { in compose_mount_options()
222 strcat(mountdata, fullpath + ref->path_consumed); in compose_mount_options()
242 struct dentry *dentry, const struct dfs_info3_param *ref) in cifs_dfs_do_refmount() argument
251 dentry, ref, &devname); in cifs_dfs_do_refmount()
292 static void dump_referral(const struct dfs_info3_param *ref) in dump_referral() argument
294 cFYI(1, ("DFS: ref path: %s", ref->path_name)); in dump_referral()
[all …]
/fs/ubifs/
Dlog.c214 struct ubifs_ref_node *ref; in ubifs_add_bud_to_log() local
219 ref = kzalloc(c->ref_node_alsz, GFP_NOFS); in ubifs_add_bud_to_log()
220 if (!ref) { in ubifs_add_bud_to_log()
274 ref->ch.node_type = UBIFS_REF_NODE; in ubifs_add_bud_to_log()
275 ref->lnum = cpu_to_le32(bud->lnum); in ubifs_add_bud_to_log()
276 ref->offs = cpu_to_le32(bud->start); in ubifs_add_bud_to_log()
277 ref->jhead = cpu_to_le32(jhead); in ubifs_add_bud_to_log()
306 err = ubifs_write_node(c, ref, UBIFS_REF_NODE_SZ, c->lhead_lnum, in ubifs_add_bud_to_log()
316 kfree(ref); in ubifs_add_bud_to_log()
323 kfree(ref); in ubifs_add_bud_to_log()
[all …]
Dreplay.c791 static int validate_ref(struct ubifs_info *c, const struct ubifs_ref_node *ref) in validate_ref() argument
794 int lnum = le32_to_cpu(ref->lnum); in validate_ref()
795 unsigned int offs = le32_to_cpu(ref->offs); in validate_ref()
796 unsigned int jhead = le32_to_cpu(ref->jhead); in validate_ref()
919 const struct ubifs_ref_node *ref = snod->node; in replay_log_leb() local
921 err = validate_ref(c, ref); in replay_log_leb()
927 err = add_replay_bud(c, le32_to_cpu(ref->lnum), in replay_log_leb()
928 le32_to_cpu(ref->offs), in replay_log_leb()
929 le32_to_cpu(ref->jhead), in replay_log_leb()
/fs/
Dquota_tree.c289 __le32 *ref; in do_insert_tree() local
309 ref = (__le32 *)buf; in do_insert_tree()
310 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in do_insert_tree()
318 le32_to_cpu(ref[get_index(info, in do_insert_tree()
329 ref[get_index(info, dquot->dq_id, depth)] = in do_insert_tree()
458 __le32 *ref = (__le32 *)buf; in remove_tree() local
467 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in remove_tree()
476 ref[get_index(info, dquot->dq_id, depth)] = cpu_to_le32(0); in remove_tree()
479 i < (info->dqi_usable_bs >> 2) && !ref[i]; in remove_tree()
548 __le32 *ref = (__le32 *)buf; in find_tree_dqentry() local
[all …]
/fs/xfs/
Dxfs_filestream.c358 int ref; in xfs_fstrm_free_func() local
365 ref = xfs_filestream_put_ag(ip->i_mount, item->ag); in xfs_fstrm_free_func()
367 ASSERT(ref >= 0); in xfs_fstrm_free_func()
487 int ref; in xfs_filestream_lookup_ag() local
503 ref = xfs_filestream_peek_ag(ip->i_mount, ag); in xfs_filestream_lookup_ag()
506 TRACE_LOOKUP(ip->i_mount, ip, item->pip, ag, ref); in xfs_filestream_lookup_ag()
/fs/nfsd/
Dexport.c62 static void expkey_put(struct kref *ref) in expkey_put() argument
64 struct svc_expkey *key = container_of(ref, struct svc_expkey, h.ref); in expkey_put()
230 kref_get(&item->ek_client->ref); in expkey_init()
329 static void svc_export_put(struct kref *ref) in svc_export_put() argument
331 struct svc_export *exp = container_of(ref, struct svc_export, h.ref); in svc_export_put()
681 kref_get(&item->ex_client->ref); in svc_export_init()

12