/fs/jffs2/ |
D | xattr.c | 444 static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) in verify_xattr_ref() argument 454 if (ref_flags(ref->node) != REF_UNCHECKED) in verify_xattr_ref() 456 offset = ref_offset(ref->node); in verify_xattr_ref() 482 ref->ino = je32_to_cpu(rr.ino); in verify_xattr_ref() 483 ref->xid = je32_to_cpu(rr.xid); in verify_xattr_ref() 484 ref->xseqno = je32_to_cpu(rr.xseqno); in verify_xattr_ref() 485 if (ref->xseqno > c->highest_xseqno) in verify_xattr_ref() 486 c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); in verify_xattr_ref() 490 for (raw=ref->node; raw != (void *)ref; raw=raw->next_in_ino) { in verify_xattr_ref() 497 raw->flash_offset = ref_offset(raw) | ((ref->node==raw) ? REF_PRISTINE : REF_NORMAL); in verify_xattr_ref() [all …]
|
D | malloc.c | 204 struct jffs2_raw_node_ref **p, *ref; in jffs2_prealloc_raw_node_refs() local 210 ref = *p; in jffs2_prealloc_raw_node_refs() 215 if (ref && ref->flash_offset != REF_EMPTY_NODE) in jffs2_prealloc_raw_node_refs() 216 ref++; in jffs2_prealloc_raw_node_refs() 219 if (!ref) { in jffs2_prealloc_raw_node_refs() 221 ref = *p = jffs2_alloc_refblock(); in jffs2_prealloc_raw_node_refs() 222 if (!ref) in jffs2_prealloc_raw_node_refs() 225 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_prealloc_raw_node_refs() 226 p = &ref->next_in_ino; in jffs2_prealloc_raw_node_refs() 227 ref = *p; in jffs2_prealloc_raw_node_refs() [all …]
|
D | nodelist.c | 590 struct jffs2_raw_node_ref *ref; in jffs2_link_node_ref() local 595 ref = jeb->last_node; in jffs2_link_node_ref() 597 dbg_noderef("Last node at %p is (%08x,%p)\n", ref, ref->flash_offset, in jffs2_link_node_ref() 598 ref->next_in_ino); in jffs2_link_node_ref() 600 while (ref->flash_offset != REF_EMPTY_NODE) { in jffs2_link_node_ref() 601 if (ref->flash_offset == REF_LINK_NODE) in jffs2_link_node_ref() 602 ref = ref->next_in_ino; in jffs2_link_node_ref() 604 ref++; in jffs2_link_node_ref() 607 dbg_noderef("New ref is %p (%08x becomes %08x,%p) len 0x%x\n", ref, in jffs2_link_node_ref() 608 ref->flash_offset, ofs, ref->next_in_ino, len); in jffs2_link_node_ref() [all …]
|
D | readinode.c | 33 struct jffs2_raw_node_ref *ref = tn->fn->raw; in check_node_data() local 43 ofs = ref_offset(ref) + sizeof(struct jffs2_raw_inode); in check_node_data() 53 ref_offset(ref), tn->csize, ofs); in check_node_data() 62 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() 568 static struct jffs2_raw_node_ref *jffs2_first_valid_node(struct jffs2_raw_node_ref *ref) in jffs2_first_valid_node() argument 570 while (ref && ref->next_in_ino) { in jffs2_first_valid_node() [all …]
|
D | nodemgmt.c | 579 void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref) in jffs2_mark_node_obsolete() argument 588 if(unlikely(!ref)) { in jffs2_mark_node_obsolete() 592 if (ref_obsolete(ref)) { in jffs2_mark_node_obsolete() 594 __func__, ref_offset(ref)); in jffs2_mark_node_obsolete() 597 blocknr = ref->flash_offset / c->sector_size; in jffs2_mark_node_obsolete() 600 ref->flash_offset); in jffs2_mark_node_obsolete() 618 freed_len = ref_totlen(c, jeb, ref); in jffs2_mark_node_obsolete() 620 if (ref_flags(ref) == REF_UNCHECKED) { in jffs2_mark_node_obsolete() 624 ref->flash_offset, jeb->used_size); in jffs2_mark_node_obsolete() 628 ref_offset(ref), freed_len); in jffs2_mark_node_obsolete() [all …]
|
D | nodelist.h | 101 static inline struct jffs2_raw_node_ref *ref_next(struct jffs2_raw_node_ref *ref) in ref_next() argument 103 ref++; in ref_next() 106 if (ref->flash_offset == REF_LINK_NODE) { in ref_next() 107 ref = ref->next_in_ino; in ref_next() 108 if (!ref) in ref_next() 109 return ref; in ref_next() 113 if (ref->flash_offset == REF_EMPTY_NODE) in ref_next() 116 return ref; in ref_next() 136 #define ref_flags(ref) ((ref)->flash_offset & 3) argument 137 #define ref_offset(ref) ((ref)->flash_offset & ~3) argument [all …]
|
D | erase.c | 209 struct jffs2_raw_node_ref *ref, struct jffs2_eraseblock *jeb) in jffs2_remove_node_refs_from_ino_list() argument 214 prev = &ref->next_in_ino; in jffs2_remove_node_refs_from_ino_list() 235 if (this == ref) in jffs2_remove_node_refs_from_ino_list() 291 struct jffs2_raw_node_ref *block, *ref; in jffs2_free_jeb_node_refs() local 295 block = ref = jeb->first_node; in jffs2_free_jeb_node_refs() 297 while (ref) { in jffs2_free_jeb_node_refs() 298 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_free_jeb_node_refs() 299 ref = ref->next_in_ino; in jffs2_free_jeb_node_refs() 301 block = ref; in jffs2_free_jeb_node_refs() 304 if (ref->flash_offset != REF_EMPTY_NODE && ref->next_in_ino) in jffs2_free_jeb_node_refs() [all …]
|
D | xattr.h | 66 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() 86 extern int jffs2_garbage_collect_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref, 90 extern void jffs2_release_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref);
|
D | scan.c | 387 struct jffs2_xattr_ref *ref; in jffs2_scan_xref_node() local 409 ref = jffs2_alloc_xattr_ref(); in jffs2_scan_xref_node() 410 if (!ref) in jffs2_scan_xref_node() 422 ref->ino = je32_to_cpu(rr->ino); in jffs2_scan_xref_node() 423 ref->xid = je32_to_cpu(rr->xid); in jffs2_scan_xref_node() 424 ref->xseqno = je32_to_cpu(rr->xseqno); in jffs2_scan_xref_node() 425 if (ref->xseqno > c->highest_xseqno) in jffs2_scan_xref_node() 426 c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); in jffs2_scan_xref_node() 427 ref->next = c->xref_temp; in jffs2_scan_xref_node() 428 c->xref_temp = ref; in jffs2_scan_xref_node() [all …]
|
/fs/btrfs/ |
D | ref-verify.c | 51 struct ref_entry ref; member 162 struct ref_entry *ref) in insert_ref_entry() argument 172 cmp = comp_refs(entry, ref); in insert_ref_entry() 181 rb_link_node(&ref->node, parent_node, p); in insert_ref_entry() 182 rb_insert_color(&ref->node, root); in insert_ref_entry() 235 struct ref_entry *ref; in free_block_entry() local 246 ref = rb_entry(n, struct ref_entry, node); in free_block_entry() 247 rb_erase(&ref->node, &be->refs); in free_block_entry() 248 kfree(ref); in free_block_entry() 312 struct ref_entry *ref = NULL, *exist; in add_tree_block() local [all …]
|
D | delayed-ref.c | 418 struct btrfs_delayed_ref_node *ref) in drop_delayed_ref() argument 421 rb_erase_cached(&ref->ref_node, &head->ref_tree); in drop_delayed_ref() 422 RB_CLEAR_NODE(&ref->ref_node); in drop_delayed_ref() 423 if (!list_empty(&ref->add_list)) in drop_delayed_ref() 424 list_del(&ref->add_list); in drop_delayed_ref() 425 ref->in_tree = 0; in drop_delayed_ref() 426 btrfs_put_delayed_ref(ref); in drop_delayed_ref() 433 struct btrfs_delayed_ref_node *ref, in merge_ref() argument 437 struct rb_node *node = rb_next(&ref->ref_node); in merge_ref() 447 if (comp_refs(ref, next, false)) in merge_ref() [all …]
|
D | backref.c | 165 static void free_pref(struct prelim_ref *ref) in free_pref() argument 167 kmem_cache_free(btrfs_prelim_ref_cache, ref); in free_pref() 231 struct prelim_ref *ref; in prelim_ref_insert() local 240 ref = rb_entry(parent, struct prelim_ref, rbnode); in prelim_ref_insert() 241 result = prelim_ref_compare(ref, newref); in prelim_ref_insert() 249 struct extent_inode_elem *eie = ref->inode_list; in prelim_ref_insert() 255 ref->inode_list = newref->inode_list; in prelim_ref_insert() 258 trace_btrfs_prelim_ref_merge(fs_info, ref, newref, in prelim_ref_insert() 265 update_share_count(sc, ref->count, in prelim_ref_insert() 266 ref->count + newref->count); in prelim_ref_insert() [all …]
|
D | inode-item.c | 15 struct btrfs_inode_ref *ref; in btrfs_find_name_in_backref() local 25 ref = (struct btrfs_inode_ref *)(ptr + cur_offset); in btrfs_find_name_in_backref() 26 len = btrfs_inode_ref_name_len(leaf, ref); in btrfs_find_name_in_backref() 27 name_ptr = (unsigned long)(ref + 1); in btrfs_find_name_in_backref() 28 cur_offset += len + sizeof(*ref); in btrfs_find_name_in_backref() 32 return ref; in btrfs_find_name_in_backref() 178 struct btrfs_inode_ref *ref; in btrfs_del_inode_ref() local 186 int del_len = name_len + sizeof(*ref); in btrfs_del_inode_ref() 207 ref = btrfs_find_name_in_backref(path->nodes[0], path->slots[0], name, in btrfs_del_inode_ref() 209 if (!ref) { in btrfs_del_inode_ref() [all …]
|
D | extent-tree.c | 87 static u64 generic_ref_to_space_flags(struct btrfs_ref *ref) in generic_ref_to_space_flags() argument 89 if (ref->type == BTRFS_REF_METADATA) { in generic_ref_to_space_flags() 90 if (ref->tree_ref.root == BTRFS_CHUNK_TREE_OBJECTID) in generic_ref_to_space_flags() 99 struct btrfs_ref *ref) in add_pinned_bytes() argument 102 u64 flags = generic_ref_to_space_flags(ref); in add_pinned_bytes() 106 percpu_counter_add_batch(&space_info->total_bytes_pinned, ref->len, in add_pinned_bytes() 111 struct btrfs_ref *ref) in sub_pinned_bytes() argument 114 u64 flags = generic_ref_to_space_flags(ref); in sub_pinned_bytes() 118 percpu_counter_add_batch(&space_info->total_bytes_pinned, -ref->len, in sub_pinned_bytes() 458 struct btrfs_extent_data_ref *ref) in hash_extent_data_ref_item() argument [all …]
|
D | root-tree.c | 358 struct btrfs_root_ref *ref; in btrfs_del_root_ref() local 377 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref() 379 ptr = (unsigned long)(ref + 1); in btrfs_del_root_ref() 380 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref() 381 (btrfs_root_ref_name_len(leaf, ref) != name_len) || in btrfs_del_root_ref() 386 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref() 432 struct btrfs_root_ref *ref; in btrfs_add_root_ref() local 445 sizeof(*ref) + name_len); in btrfs_add_root_ref() 453 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref() 454 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref() [all …]
|
D | delayed-ref.h | 309 static inline void btrfs_put_delayed_ref(struct btrfs_delayed_ref_node *ref) in btrfs_put_delayed_ref() argument 311 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref() 312 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref() 313 WARN_ON(ref->in_tree); in btrfs_put_delayed_ref() 314 switch (ref->type) { in btrfs_put_delayed_ref() 317 kmem_cache_free(btrfs_delayed_tree_ref_cachep, ref); in btrfs_put_delayed_ref() 321 kmem_cache_free(btrfs_delayed_data_ref_cachep, ref); in btrfs_put_delayed_ref()
|
/fs/cifs/ |
D | cifs_dfs_ref.c | 137 const struct dfs_info3_param *ref, in cifs_compose_mount_options() argument 153 if (strlen(fullpath) - ref->path_consumed) { in cifs_compose_mount_options() 154 prepath = fullpath + ref->path_consumed; in cifs_compose_mount_options() 160 name = cifs_build_devname(ref->node_name, prepath); in cifs_compose_mount_options() 251 const char *fullpath, const struct dfs_info3_param *ref) in cifs_dfs_do_refmount() argument 269 fullpath + 1, ref, NULL); in cifs_dfs_do_refmount() 281 static void dump_referral(const struct dfs_info3_param *ref) in dump_referral() argument 283 cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name); in dump_referral() 284 cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name); in dump_referral() 286 ref->flags, ref->server_type); in dump_referral() [all …]
|
D | dfs_cache.c | 258 const struct dfs_info3_param *ref = &refs[i]; in dump_refs() local 269 ref->flags, ref->path_consumed, ref->server_type, in dump_refs() 270 ref->ref_flag, ref->path_name, ref->node_name, in dump_refs() 271 ref->ttl, ref->ttl / 60); in dump_refs() 727 struct dfs_info3_param *ref, const char *tgt) in setup_ref() argument 733 memset(ref, 0, sizeof(*ref)); in setup_ref() 735 ref->path_name = kstrndup(path, strlen(path), GFP_KERNEL); in setup_ref() 736 if (!ref->path_name) in setup_ref() 739 ref->path_consumed = ce->ce_path_consumed; in setup_ref() 741 ref->node_name = kstrndup(tgt, strlen(tgt), GFP_KERNEL); in setup_ref() [all …]
|
D | misc.c | 696 struct dfs_referral_level_3 *ref; in parse_dfs_referrals() local 707 ref = (struct dfs_referral_level_3 *) &(rsp->referrals); in parse_dfs_referrals() 708 if (ref->VersionNumber != cpu_to_le16(3)) { in parse_dfs_referrals() 710 le16_to_cpu(ref->VersionNumber)); in parse_dfs_referrals() 751 node->server_type = le16_to_cpu(ref->ServerType); in parse_dfs_referrals() 752 node->ref_flag = le16_to_cpu(ref->ReferralEntryFlags); in parse_dfs_referrals() 755 temp = (char *)ref + le16_to_cpu(ref->DfsPathOffset); in parse_dfs_referrals() 765 temp = (char *)ref + le16_to_cpu(ref->NetworkAddressOffset); in parse_dfs_referrals() 774 node->ttl = le32_to_cpu(ref->TimeToLive); in parse_dfs_referrals() 776 ref++; in parse_dfs_referrals()
|
D | dfs_cache.h | 31 const char *path, struct dfs_info3_param *ref, 33 extern int dfs_cache_noreq_find(const char *path, struct dfs_info3_param *ref, 45 struct dfs_info3_param *ref);
|
/fs/ubifs/ |
D | log.c | 168 struct ubifs_ref_node *ref; in ubifs_add_bud_to_log() local 173 ref = kzalloc(c->ref_node_alsz, GFP_NOFS); in ubifs_add_bud_to_log() 174 if (!ref) { in ubifs_add_bud_to_log() 229 ref->ch.node_type = UBIFS_REF_NODE; in ubifs_add_bud_to_log() 230 ref->lnum = cpu_to_le32(bud->lnum); in ubifs_add_bud_to_log() 231 ref->offs = cpu_to_le32(bud->start); in ubifs_add_bud_to_log() 232 ref->jhead = cpu_to_le32(jhead); in ubifs_add_bud_to_log() 262 err = ubifs_write_node(c, ref, UBIFS_REF_NODE_SZ, c->lhead_lnum, in ubifs_add_bud_to_log() 267 err = ubifs_shash_update(c, c->log_hash, ref, UBIFS_REF_NODE_SZ); in ubifs_add_bud_to_log() 280 kfree(ref); in ubifs_add_bud_to_log() [all …]
|
/fs/quota/ |
D | quota_tree.c | 303 __le32 *ref; in do_insert_tree() local 323 ref = (__le32 *)buf; in do_insert_tree() 324 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in do_insert_tree() 332 le32_to_cpu(ref[get_index(info, in do_insert_tree() 343 ref[get_index(info, dquot->dq_id, depth)] = in do_insert_tree() 480 __le32 *ref = (__le32 *)buf; in remove_tree() local 490 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in remove_tree() 499 ref[get_index(info, dquot->dq_id, depth)] = cpu_to_le32(0); in remove_tree() 501 for (i = 0; i < (info->dqi_usable_bs >> 2) && !ref[i]; i++) in remove_tree() 576 __le32 *ref = (__le32 *)buf; in find_tree_dqentry() local [all …]
|
/fs/orangefs/ |
D | namei.c | 25 struct orangefs_object_kref ref; in orangefs_create() local 60 ref = new_op->downcall.resp.create.refn; in orangefs_create() 62 inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, &ref); in orangefs_create() 224 struct orangefs_object_kref ref; in orangefs_symlink() local 267 ref = new_op->downcall.resp.sym.refn; in orangefs_symlink() 269 inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref); in orangefs_symlink() 310 struct orangefs_object_kref ref; in orangefs_mkdir() local 341 ref = new_op->downcall.resp.mkdir.refn; in orangefs_mkdir() 343 inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, &ref); in orangefs_mkdir()
|
D | inode.c | 1044 static inline ino_t orangefs_handle_hash(struct orangefs_object_kref *ref) in orangefs_handle_hash() argument 1046 if (!ref) in orangefs_handle_hash() 1048 return orangefs_khandle_to_ino(&(ref->khandle)); in orangefs_handle_hash() 1056 struct orangefs_object_kref *ref = (struct orangefs_object_kref *) data; in orangefs_set_inode() local 1057 ORANGEFS_I(inode)->refn.fs_id = ref->fs_id; in orangefs_set_inode() 1058 ORANGEFS_I(inode)->refn.khandle = ref->khandle; in orangefs_set_inode() 1071 struct orangefs_object_kref *ref = (struct orangefs_object_kref *) data; in orangefs_test_inode() local 1077 &(ref->khandle)) && in orangefs_test_inode() 1078 orangefs_inode->refn.fs_id == ref->fs_id); in orangefs_test_inode() 1089 struct orangefs_object_kref *ref) in orangefs_iget() argument [all …]
|
/fs/nfs/ |
D | pnfs_dev.c | 86 if (atomic_read(&d->ref)) in _lookup_deviceid() 179 if (d != NULL && !atomic_inc_not_zero(&d->ref)) in __nfs4_find_get_deviceid() 209 atomic_inc(&new->ref); in nfs4_find_get_deviceid() 257 atomic_set(&d->ref, 1); in nfs4_init_deviceid_node() 275 if (atomic_add_unless(&d->ref, -1, 2)) in nfs4_put_deviceid_node() 279 if (!atomic_dec_and_test(&d->ref)) in nfs4_put_deviceid_node() 332 if (d->nfs_client == clp && atomic_read(&d->ref)) { in _deviceid_purge_client()
|