diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-02-01 12:02:49 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-08 03:12:49 -0500 |
commit | 3c89f396dc78671cfbc1eb20ef1d5be6a9a02780 (patch) | |
tree | 6ed2ba3d484f8b92eed00b619128a79ecd094f4d /fs/ubifs/ubifs.h | |
parent | ca2ec61d157f23ec24aaa200f8016ea0a8aeb617 (diff) |
UBIFS: introduce write-buffer size field
Currently we assume write-buffer size is always min_io_size. But
this is about to change and write-buffers may be of variable size.
Namely, they will be of max_write_size at the beginning, but will
get smaller when we are approaching the end of LEB.
This is a preparation patch which introduces 'size' field in
the write-buffer structure which carries the current write-buffer
size.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 942c1d3cb0db..362495078489 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -646,6 +646,7 @@ typedef int (*ubifs_lpt_scan_callback)(struct ubifs_info *c, | |||
646 | * @offs: write-buffer offset in this logical eraseblock | 646 | * @offs: write-buffer offset in this logical eraseblock |
647 | * @avail: number of bytes available in the write-buffer | 647 | * @avail: number of bytes available in the write-buffer |
648 | * @used: number of used bytes in the write-buffer | 648 | * @used: number of used bytes in the write-buffer |
649 | * @size: write-buffer size (in [@c->min_io_size, @c->max_write_size] range) | ||
649 | * @dtype: type of data stored in this LEB (%UBI_LONGTERM, %UBI_SHORTTERM, | 650 | * @dtype: type of data stored in this LEB (%UBI_LONGTERM, %UBI_SHORTTERM, |
650 | * %UBI_UNKNOWN) | 651 | * %UBI_UNKNOWN) |
651 | * @jhead: journal head the mutex belongs to (note, needed only to shut lockdep | 652 | * @jhead: journal head the mutex belongs to (note, needed only to shut lockdep |
@@ -680,6 +681,7 @@ struct ubifs_wbuf { | |||
680 | int offs; | 681 | int offs; |
681 | int avail; | 682 | int avail; |
682 | int used; | 683 | int used; |
684 | int size; | ||
683 | int dtype; | 685 | int dtype; |
684 | int jhead; | 686 | int jhead; |
685 | int (*sync_callback)(struct ubifs_info *c, int lnum, int free, int pad); | 687 | int (*sync_callback)(struct ubifs_info *c, int lnum, int free, int pad); |