projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disk->data_size now hold the space size usable by data inside a page.
[bertos.git]
/
bertos
/
fs
/
battfs.h
diff --git
a/bertos/fs/battfs.h
b/bertos/fs/battfs.h
index b14cb1c659ec2de231a6501dfddc6e510730f696..29cdde48a4eb202d83baf8c21a43ef75b5ba5450 100644
(file)
--- a/
bertos/fs/battfs.h
+++ b/
bertos/fs/battfs.h
@@
-192,7
+192,8
@@
typedef struct BattFsSuper
disk_page_erase_t erase; ///< Page erase.
disk_close_t close; ///< Disk deinit.
disk_page_erase_t erase; ///< Page erase.
disk_close_t close; ///< Disk deinit.
- pgaddr_t page_size; ///< Size of a disk page, in bytes.
+ pgaddr_t page_size; ///< Size of a memory page, in bytes. Used by disk low level driver.
+ pgaddr_t data_size; ///< Size of space usable for data in a disk page, in bytes. The rest is used by the page header.
pgcnt_t page_count; ///< Number of pages on disk.
/**
pgcnt_t page_count; ///< Number of pages on disk.
/**
@@
-203,7
+204,6
@@
typedef struct BattFsSuper
* the entire disk in memory.
*/
pgcnt_t *page_array;
* the entire disk in memory.
*/
pgcnt_t *page_array;
- struct BattFsPageHeader curr_hdr; ///< Current page header (cached)-
pgcnt_t curr_page; ///< Current page loaded in disk buffer.
bool cache_dirty; ///< True if current cache is dirty (nneds to be flushed).
pgcnt_t curr_page; ///< Current page loaded in disk buffer.
bool cache_dirty; ///< True if current cache is dirty (nneds to be flushed).
@@
-244,6
+244,7
@@
typedef struct BattFs
BattFsSuper *disk; ///< Disk context
filemode_t mode; ///< File open mode
pgcnt_t *start; ///< Pointer to page_array file start position.
BattFsSuper *disk; ///< Disk context
filemode_t mode; ///< File open mode
pgcnt_t *start; ///< Pointer to page_array file start position.
+ pgcnt_t max_off; ///< Max page offset allocated for the file.
} BattFs;
/**
} BattFs;
/**