ubifs: Add full hash lookup support
[linux-2.6-block.git] / fs / ubifs / ubifs-media.h
index aa302b11aec86bfd2d1bbd8d73b66f60dedb8b88..249124d9a801c91a533c6c35c106321f4a0bc83d 100644 (file)
@@ -530,7 +530,8 @@ struct ubifs_ino_node {
  * @padding1: reserved for future, zeroes
  * @type: type of the target inode (%UBIFS_ITYPE_REG, %UBIFS_ITYPE_DIR, etc)
  * @nlen: name length
- * @padding2: reserved for future, zeroes
+ * @cookie: A 32bits random number, used to construct a 64bits
+ *          identifier.
  * @name: zero-terminated name
  *
  * Note, do not forget to amend 'zero_dent_node_unused()' function when
@@ -543,7 +544,7 @@ struct ubifs_dent_node {
        __u8 padding1;
        __u8 type;
        __le16 nlen;
-       __u8 padding2[4]; /* Watch 'zero_dent_node_unused()' if changing! */
+       __le32 cookie;
        __u8 name[];
 } __packed;
 
@@ -553,18 +554,16 @@ struct ubifs_dent_node {
  * @key: node key
  * @size: uncompressed data size in bytes
  * @compr_type: compression type (%UBIFS_COMPR_NONE, %UBIFS_COMPR_LZO, etc)
- * @padding: reserved for future, zeroes
+ * @compr_size: compressed data size in bytes, only valid when data is encrypted
  * @data: data
  *
- * Note, do not forget to amend 'zero_data_node_unused()' function when
- * changing the padding fields.
  */
 struct ubifs_data_node {
        struct ubifs_ch ch;
        __u8 key[UBIFS_MAX_KEY_LEN];
        __le32 size;
        __le16 compr_type;
-       __u8 padding[2]; /* Watch 'zero_data_node_unused()' if changing! */
+       __le16 compr_size;
        __u8 data[];
 } __packed;