Whamcloud - gitweb
dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
[tools/e2fsprogs.git] / lib / ext2fs / ext2fs.h
index 15d0b6f..d6e9194 100644 (file)
@@ -65,6 +65,7 @@ typedef __u32         blk_t;
 typedef __u32          dgrp_t;
 typedef __u32          ext2_off_t;
 typedef __s64          e2_blkcnt_t;
+typedef __u32          ext2_dirhash_t;
 
 #if EXT2_FLAT_INCLUDES
 #include "com_err.h"
@@ -289,6 +290,11 @@ struct struct_ext2_filsys {
 #endif
 
 /*
+ * Flags for directory block reading and writing functions
+ */
+#define EXT2_DIRBLOCK_V2_STRUCT        0x0001
+
+/*
  * Return flags for the directory iterator functions
  */
 #define DIRENT_CHANGED 1
@@ -406,6 +412,7 @@ typedef struct ext2_icount *ext2_icount_t;
 #define EXT2_LIB_FEATURE_COMPAT_SUPP   (EXT2_FEATURE_COMPAT_DIR_PREALLOC|\
                                         EXT2_FEATURE_COMPAT_IMAGIC_INODES|\
                                         EXT3_FEATURE_COMPAT_HAS_JOURNAL|\
+                                        EXT2_FEATURE_COMPAT_DIR_INDEX|\
                                         EXT2_FEATURE_COMPAT_EXT_ATTR)
 
 /* This #ifdef is temporary until compression is fully supported */
@@ -596,8 +603,17 @@ extern errcode_t
 /* dirblock.c */
 extern errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
                                       void *buf);
+extern errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block,
+                                       void *buf, int flags);
 extern errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
                                        void *buf);
+extern errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block,
+                                        void *buf, int flags);
+
+/* dirhash.c */
+extern errcode_t ext2fs_dirhash(int version, const char *name, int len,
+                               ext2_dirhash_t *ret_hash);
+
 
 /* dir_iterate.c */
 extern errcode_t ext2fs_dir_iterate(ext2_filsys fs,