X-Git-Url: http://git.sven.stormbind.net/?a=blobdiff_plain;f=include%2Fexfat_fs.h;h=e120707385af92f83c6017fba4c9fe4de92e58d4;hb=2a0281992d71d123dc8caa7028d0faf6f2adc08b;hp=d35b12c02761642aa0eb6e08319e8807c7b9f809;hpb=fa2bead8d3f2203fb7b22d801443109a52808490;p=sven%2Fexfatprogs.git diff --git a/include/exfat_fs.h b/include/exfat_fs.h index d35b12c..e120707 100644 --- a/include/exfat_fs.h +++ b/include/exfat_fs.h @@ -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