Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
793a06d9
Commit
793a06d9
authored
Sep 23, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Fixes for building in userspace
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
03ef80b4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
2 deletions
+27
-2
fs/bcachefs/checksum.c
fs/bcachefs/checksum.c
+20
-0
fs/bcachefs/checksum.h
fs/bcachefs/checksum.h
+3
-0
fs/bcachefs/fs.h
fs/bcachefs/fs.h
+1
-1
fs/bcachefs/io_read.c
fs/bcachefs/io_read.c
+2
-0
fs/bcachefs/super-io.c
fs/bcachefs/super-io.c
+1
-1
No files found.
fs/bcachefs/checksum.c
View file @
793a06d9
...
...
@@ -559,6 +559,26 @@ int bch2_request_key(struct bch_sb *sb, struct bch_key *key)
return
ret
;
}
#ifndef __KERNEL__
int
bch2_revoke_key
(
struct
bch_sb
*
sb
)
{
key_serial_t
key_id
;
struct
printbuf
key_description
=
PRINTBUF
;
prt_printf
(
&
key_description
,
"bcachefs:"
);
pr_uuid
(
&
key_description
,
sb
->
user_uuid
.
b
);
key_id
=
request_key
(
"user"
,
key_description
.
buf
,
NULL
,
KEY_SPEC_USER_KEYRING
);
printbuf_exit
(
&
key_description
);
if
(
key_id
<
0
)
return
errno
;
keyctl_revoke
(
key_id
);
return
0
;
}
#endif
int
bch2_decrypt_sb_key
(
struct
bch_fs
*
c
,
struct
bch_sb_field_crypt
*
crypt
,
struct
bch_key
*
key
)
...
...
fs/bcachefs/checksum.h
View file @
793a06d9
...
...
@@ -47,6 +47,9 @@ struct bch_csum bch2_checksum(struct bch_fs *, unsigned, struct nonce,
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
);
...
...
fs/bcachefs/fs.h
View file @
793a06d9
...
...
@@ -197,7 +197,7 @@ int bch2_vfs_init(void);
#else
#define bch2_inode_update_after_write(_trans, _inode, _inode_u, _fields)
do {} while (0
)
#define bch2_inode_update_after_write(_trans, _inode, _inode_u, _fields)
({ do {} while (0); }
)
static
inline
void
bch2_evict_subvolume_inodes
(
struct
bch_fs
*
c
,
snapshot_id_list
*
s
)
{}
...
...
fs/bcachefs/io_read.c
View file @
793a06d9
...
...
@@ -24,6 +24,8 @@
#include "subvolume.h"
#include "trace.h"
#include <linux/sched/mm.h>
#ifndef CONFIG_BCACHEFS_NO_LATENCY_ACCT
static
bool
bch2_target_congested
(
struct
bch_fs
*
c
,
u16
target
)
...
...
fs/bcachefs/super-io.c
View file @
793a06d9
...
...
@@ -675,7 +675,7 @@ int bch2_read_super(const char *path, struct bch_opts *opts,
#ifndef __KERNEL__
if
(
opt_get
(
*
opts
,
direct_io
)
==
false
)
sb
->
mode
|=
FMODE
_BUFFERED
;
sb
->
mode
|=
BLK_OPEN
_BUFFERED
;
#endif
if
(
!
opt_get
(
*
opts
,
noexcl
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment