Lines Matching defs:leaf
34 * beginning of the leaf block. The dirents reside in leaves when
41 * used as an array of 64-bit block pointers pointing to the leaf blocks. The
43 * block pointer in the array that points to the same leaf. In fact, when a
45 * point to the same leaf.
47 * When a leaf is completely full, the size of the hash table can be
771 * get_leaf_nr - Get a leaf number associated with the index
818 struct gfs2_leaf *leaf;
836 leaf = (struct gfs2_leaf *)bh->b_data;
837 ln = be64_to_cpu(leaf->lf_next);
869 struct gfs2_leaf *leaf;
883 leaf = (struct gfs2_leaf *)bh->b_data;
884 leaf->lf_depth = cpu_to_be16(depth);
885 leaf->lf_entries = 0;
886 leaf->lf_dirent_format = cpu_to_be32(GFS2_FORMAT_DE);
887 leaf->lf_next = 0;
888 leaf->lf_inode = cpu_to_be64(ip->i_no_addr);
889 leaf->lf_dist = cpu_to_be32(1);
890 leaf->lf_nsec = cpu_to_be32(tv.tv_nsec);
891 leaf->lf_sec = cpu_to_be64(tv.tv_sec);
892 memset(leaf->lf_reserved2, 0, sizeof(leaf->lf_reserved2));
893 dent = (struct gfs2_dirent *)(leaf+1);
896 return leaf;
913 struct gfs2_leaf *leaf;
924 /* Turn over a new leaf */
926 leaf = new_leaf(inode, &bh, 0);
927 if (!leaf)
932 leaf->lf_entries = cpu_to_be16(dip->i_entries);
967 /* We're done with the new leaf block, now setup the new
993 * dir_split_leaf - Split a leaf block into two
1019 /* Get the old leaf block */
1039 /* Compute the start and len of leaf pointers in the hash table. */
1316 current leaf */
1377 unsigned leaves = 0, leaf = 0, offset, sort_offset;
1408 * zone in case the number of entries in the leaf is corrupt.
1410 * leaf block.
1436 "leaf %llu, entries2 (%u) != "
1445 sort_id = gfs2_set_cookies(sdp, bh, leaf, &darr[offset],
1451 larr[leaf++] = bh;
1453 larr[leaf++] = NULL;
1462 for(i = 0; i < leaf; i++)
1470 * gfs2_dir_readahead - Issue read-ahead requests for leaf blocks.
1473 * have the leaf, and therefore we don't have the depth, and therefore we
1703 * dir_new_leaf - Add a new leaf onto hash chain
1707 * This adds a new dir leaf onto an existing leaf when there is not
1710 * leaf blocks, so it will only occur for very large directories.
1712 * The dist parameter is set to 1 for leaf blocks directly attached
1714 * etc. We are thus able to tell the difference between an old leaf
1725 struct gfs2_leaf *leaf, *oleaf;
1749 leaf = new_leaf(inode, &bh, be16_to_cpu(oleaf->lf_depth));
1750 if (!leaf) {
1754 leaf->lf_dist = cpu_to_be32(dist);
1800 struct gfs2_leaf *leaf;
1817 leaf = (struct gfs2_leaf *)bh->b_data;
1818 be16_add_cpu(&leaf->lf_entries, 1);
1819 leaf->lf_nsec = cpu_to_be32(tv.tv_nsec);
1820 leaf->lf_sec = cpu_to_be64(tv.tv_sec);
1898 struct gfs2_leaf *leaf = (struct gfs2_leaf *)bh->b_data;
1899 u16 entries = be16_to_cpu(leaf->lf_entries);
1902 leaf->lf_entries = cpu_to_be16(--entries);
1903 leaf->lf_nsec = cpu_to_be32(tv.tv_nsec);
1904 leaf->lf_sec = cpu_to_be64(tv.tv_sec);
1957 * leaf_dealloc - Deallocate a directory leaf
1960 * @len: the number of pointers to this leaf
1961 * @leaf_no: the leaf number
1962 * @leaf_bh: buffer_head for the starting leaf
1963 * last_dealloc: 1 if this is the final dealloc for the leaf, else 0
2087 * gfs2_dir_exhash_dealloc - free all the leaf blocks in a directory
2099 struct gfs2_leaf *leaf;
2118 leaf = (struct gfs2_leaf *)bh->b_data;
2119 len = BIT(dip->i_depth - be16_to_cpu(leaf->lf_depth));