u32 len;
};
+/*
+ * Filenames and xattrs can be obfuscated so they don't appear in the image
+ * dump. In basic mode (NAMES) a random string will be generated but such names
+ * do not match the direntry hashes. The advanced mode (COLLISIONS) tries to
+ * generate names that appear random but also match the hashes. This however
+ * may take significantly more time than the basic mode. And may not even
+ * succeed.
+ */
+enum sanitize_mode {
+ SANITIZE_NONE,
+ SANITIZE_NAMES,
+ SANITIZE_COLLISIONS
+};
+
+void sanitize_name(enum sanitize_mode sanitize, struct rb_root *name_tree,
+ u8 *dst, struct extent_buffer *src, struct btrfs_key *key,
+ int slot);
+
#endif