]> git.sven.stormbind.net Git - sven/exfatprogs.git/blobdiff - include/exfat_fs.h
New upstream version 1.2.3
[sven/exfatprogs.git] / include / exfat_fs.h
index d35b12c02761642aa0eb6e08319e8807c7b9f809..e120707385af92f83c6017fba4c9fe4de92e58d4 100644 (file)
@@ -45,7 +45,8 @@ struct exfat {
        unsigned int            disk_bitmap_size;
        __u16                   *upcase_table;
        clus_t                  start_clu;
-       char                    *zero_cluster;
+       unsigned int            buffer_count;
+       struct buffer_desc      *lookup_buffer; /* for dentry set lookup */
 };
 
 struct exfat_dentry_loc {
@@ -64,7 +65,7 @@ struct buffer_desc {
        __u32           p_clus;
        unsigned int    offset;
        char            *buffer;
-       char            *dirty;
+       char            dirty[EXFAT_BITMAP_SIZE(4 * KB / 512)];
 };
 
 struct exfat *exfat_alloc_exfat(struct exfat_blk_dev *blk_dev, struct pbr *bs);
@@ -82,7 +83,11 @@ int exfat_resolve_path(struct path_resolve_ctx *ctx, struct exfat_inode *child);
 int exfat_resolve_path_parent(struct path_resolve_ctx *ctx,
                              struct exfat_inode *parent, struct exfat_inode *child);
 
-struct buffer_desc *exfat_alloc_buffer(int count,
-                                      unsigned int clu_size, unsigned int sect_size);
-void exfat_free_buffer(struct buffer_desc *bd, int count);
+struct buffer_desc *exfat_alloc_buffer(struct exfat *exfat);
+void exfat_free_buffer(const struct exfat *exfat, struct buffer_desc *bd);
+
+static inline unsigned int exfat_get_read_size(const struct exfat *exfat)
+{
+       return MIN(exfat->clus_size, 4 * KB);
+}
 #endif