summaryrefslogtreecommitdiffstats
path: root/include/exfat_fs.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:56:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:56:46 +0000
commit38da4eee80f4b01610d38c264cb03cb28048131f (patch)
tree1ef86b5dd7f73f7d756985339dc1d6bff16233aa /include/exfat_fs.h
parentAdding upstream version 1.2.2. (diff)
downloadexfatprogs-38da4eee80f4b01610d38c264cb03cb28048131f.tar.xz
exfatprogs-38da4eee80f4b01610d38c264cb03cb28048131f.zip
Adding upstream version 1.2.3.upstream/1.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--include/exfat_fs.h15
1 files changed, 10 insertions, 5 deletions
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