+static void ocfs2_xattr_tree_set_last_eb_blk(struct ocfs2_extent_tree *et,
+ u64 blkno)
+{
+ struct ocfs2_xattr_block *xb =
+ (struct ocfs2_xattr_block *) et->root_bh->b_data;
+ struct ocfs2_xattr_tree_root *xt = &xb->xb_attrs.xb_root;
+
+ xt->xt_last_eb_blk = cpu_to_le64(blkno);
+}
+
+static u64 ocfs2_xattr_tree_get_last_eb_blk(struct ocfs2_extent_tree *et)
+{
+ struct ocfs2_xattr_block *xb =
+ (struct ocfs2_xattr_block *) et->root_bh->b_data;
+ struct ocfs2_xattr_tree_root *xt = &xb->xb_attrs.xb_root;
+
+ return le64_to_cpu(xt->xt_last_eb_blk);
+}
+
+static void ocfs2_xattr_tree_update_clusters(struct inode *inode,
+ struct ocfs2_extent_tree *et,
+ u32 clusters)
+{
+ struct ocfs2_xattr_block *xb =
+ (struct ocfs2_xattr_block *)et->root_bh->b_data;
+
+ le32_add_cpu(&xb->xb_attrs.xb_root.xt_clusters, clusters);
+}
+
+static int ocfs2_xattr_tree_sanity_check(struct inode *inode,
+ struct ocfs2_extent_tree *et)
+{
+ return 0;
+}
+
+static struct ocfs2_extent_tree_operations ocfs2_xattr_tree_et_ops = {
+ .set_last_eb_blk = ocfs2_xattr_tree_set_last_eb_blk,
+ .get_last_eb_blk = ocfs2_xattr_tree_get_last_eb_blk,
+ .update_clusters = ocfs2_xattr_tree_update_clusters,
+ .sanity_check = ocfs2_xattr_tree_sanity_check,
+};
+