diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2016-12-11 14:45:48 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2016-12-11 14:58:27 -0900 |
commit | 7f4191a202ea4558ca2d5eb8a47daea33c9999c7 (patch) | |
tree | 137f957291da895f78b43a8903db6f744d6e202c /util.h | |
parent | 4e158e155327d09868453ae9759a58284245175a (diff) |
add support for maximum journal entry size
also rip out prototype crypto support code - real code is in the dev
branch, with the new superblock format
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -58,14 +58,20 @@ static inline void le64_add_cpu(__le64 *var, u64 val) (void) (&_max1 == &_max2); \ _max1 > _max2 ? _max1 : _max2; }) +#define max_t(type, x, y) ({ \ + type __max1 = (x); \ + type __max2 = (y); \ + __max1 > __max2 ? __max1: __max2; }) + #define die(arg, ...) \ do { \ fprintf(stderr, arg "\n", ##__VA_ARGS__); \ exit(EXIT_FAILURE); \ } while (0) -u64 rounddown_pow_of_two(u64); unsigned ilog2(u64); +u64 rounddown_pow_of_two(u64); +u64 roundup_pow_of_two(u64); char *skip_spaces(const char *str); char *strim(char *s); |