diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-24 07:42:05 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-08-13 04:34:27 -0400 |
commit | 547000da6412c45456ff2ff44a171d01027bd727 (patch) | |
tree | 2f99e7033dd87273876a36081cc42c9926dc6709 /fs/ubifs/ubifs.h | |
parent | f769108424a19c7758546d1d7d19f098b1a33759 (diff) |
UBIFS: improve budgeting checks
Budgeting is a crucial UBIFS subsystem - add more assertions
to improve requests checking. This is not compiled in when
UBIFS debugging is disabled.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index d342c6907244..565dca2ec0bd 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -812,17 +812,23 @@ struct ubifs_compressor { | |||
812 | struct ubifs_budget_req { | 812 | struct ubifs_budget_req { |
813 | unsigned int fast:1; | 813 | unsigned int fast:1; |
814 | unsigned int recalculate:1; | 814 | unsigned int recalculate:1; |
815 | #ifndef UBIFS_DEBUG | ||
815 | unsigned int new_page:1; | 816 | unsigned int new_page:1; |
816 | unsigned int dirtied_page:1; | 817 | unsigned int dirtied_page:1; |
817 | unsigned int new_dent:1; | 818 | unsigned int new_dent:1; |
818 | unsigned int mod_dent:1; | 819 | unsigned int mod_dent:1; |
819 | unsigned int new_ino:1; | 820 | unsigned int new_ino:1; |
820 | unsigned int new_ino_d:13; | 821 | unsigned int new_ino_d:13; |
821 | #ifndef UBIFS_DEBUG | ||
822 | unsigned int dirtied_ino:4; | 822 | unsigned int dirtied_ino:4; |
823 | unsigned int dirtied_ino_d:15; | 823 | unsigned int dirtied_ino_d:15; |
824 | #else | 824 | #else |
825 | /* Not bit-fields to check for overflows */ | 825 | /* Not bit-fields to check for overflows */ |
826 | unsigned int new_page; | ||
827 | unsigned int dirtied_page; | ||
828 | unsigned int new_dent; | ||
829 | unsigned int mod_dent; | ||
830 | unsigned int new_ino; | ||
831 | unsigned int new_ino_d; | ||
826 | unsigned int dirtied_ino; | 832 | unsigned int dirtied_ino; |
827 | unsigned int dirtied_ino_d; | 833 | unsigned int dirtied_ino_d; |
828 | #endif | 834 | #endif |