summaryrefslogtreecommitdiff
path: root/libbcachefs/checksum.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-09-23 18:42:30 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-09-23 20:03:23 -0400
commita053ebfb8c89e023a44c365e369f4053cfc53376 (patch)
treec39f6a6689bbdeee358e824971d3e186ac4c3877 /libbcachefs/checksum.h
parent731926b5e5fc28752433f830569d228513cceea6 (diff)
Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in userspace
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/checksum.h')
-rw-r--r--libbcachefs/checksum.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbcachefs/checksum.h b/libbcachefs/checksum.h
index 9a4898db..13998388 100644
--- a/libbcachefs/checksum.h
+++ b/libbcachefs/checksum.h
@@ -40,15 +40,16 @@ struct bch_csum bch2_checksum(struct bch_fs *, unsigned, struct nonce,
*/
#define csum_vstruct(_c, _type, _nonce, _i) \
({ \
- const void *start = ((const void *) (_i)) + sizeof((_i)->csum); \
- const void *end = vstruct_end(_i); \
+ const void *_start = ((const void *) (_i)) + sizeof((_i)->csum);\
\
- bch2_checksum(_c, _type, _nonce, start, end - start); \
+ bch2_checksum(_c, _type, _nonce, _start, vstruct_end(_i) - _start);\
})
int bch2_chacha_encrypt_key(struct bch_key *, struct nonce, void *, size_t);
int bch2_request_key(struct bch_sb *, struct bch_key *);
+#ifndef __KERNEL__
int bch2_revoke_key(struct bch_sb *);
+#endif
int bch2_encrypt(struct bch_fs *, unsigned, struct nonce,
void *data, size_t);