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
50479406
Commit
50479406
authored
May 26, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Replace bare EEXIST with private error codes
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
f648b6c1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
+12
-8
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+1
-1
fs/bcachefs/errcode.h
fs/bcachefs/errcode.h
+3
-0
fs/bcachefs/fs-ioctl.c
fs/bcachefs/fs-ioctl.c
+1
-1
fs/bcachefs/str_hash.h
fs/bcachefs/str_hash.h
+1
-1
fs/bcachefs/super.c
fs/bcachefs/super.c
+6
-5
No files found.
fs/bcachefs/alloc_background.c
View file @
50479406
...
...
@@ -1643,7 +1643,7 @@ static int discard_in_flight_add(struct bch_fs *c, struct bpos bucket)
mutex_lock
(
&
c
->
discard_buckets_in_flight_lock
);
darray_for_each
(
c
->
discard_buckets_in_flight
,
i
)
if
(
bkey_eq
(
*
i
,
bucket
))
{
ret
=
-
EEXIST
;
ret
=
-
BCH_ERR_EEXIST_discard_in_flight_add
;
goto
out
;
}
...
...
fs/bcachefs/errcode.h
View file @
50479406
...
...
@@ -116,6 +116,9 @@
x(ENOENT, ENOENT_dev_idx_not_found) \
x(ENOTEMPTY, ENOTEMPTY_dir_not_empty) \
x(ENOTEMPTY, ENOTEMPTY_subvol_not_empty) \
x(EEXIST, EEXIST_str_hash_set) \
x(EEXIST, EEXIST_discard_in_flight_add) \
x(EEXIST, EEXIST_subvolume_create) \
x(0, open_buckets_empty) \
x(0, freelist_empty) \
x(BCH_ERR_freelist_empty, no_buckets_found) \
...
...
fs/bcachefs/fs-ioctl.c
View file @
50479406
...
...
@@ -373,7 +373,7 @@ static long bch2_ioctl_subvolume_create(struct bch_fs *c, struct file *filp,
}
if
(
dst_dentry
->
d_inode
)
{
error
=
-
EEXIST
;
error
=
-
BCH_ERR_EEXIST_subvolume_create
;
goto
err3
;
}
...
...
fs/bcachefs/str_hash.h
View file @
50479406
...
...
@@ -300,7 +300,7 @@ int bch2_hash_set_in_snapshot(struct btree_trans *trans,
if
(
!
found
&&
(
flags
&
STR_HASH_must_replace
))
{
ret
=
-
BCH_ERR_ENOENT_str_hash_set_must_replace
;
}
else
if
(
found
&&
(
flags
&
STR_HASH_must_create
))
{
ret
=
-
EEXIST
;
ret
=
-
BCH_ERR_EEXIST_str_hash_set
;
}
else
{
if
(
!
found
&&
slot
.
path
)
swap
(
iter
,
slot
);
...
...
fs/bcachefs/super.c
View file @
50479406
...
...
@@ -931,12 +931,13 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
if
(
ret
)
goto
err
;
for
(
i
=
0
;
i
<
c
->
sb
.
nr_devices
;
i
++
)
if
(
bch2_member_exists
(
c
->
disk_sb
.
sb
,
i
)
&&
bch2_dev_alloc
(
c
,
i
))
{
ret
=
-
EEXIST
;
for
(
i
=
0
;
i
<
c
->
sb
.
nr_devices
;
i
++
)
{
if
(
!
bch2_member_exists
(
c
->
disk_sb
.
sb
,
i
))
continue
;
ret
=
bch2_dev_alloc
(
c
,
i
);
if
(
ret
)
goto
err
;
}
}
bch2_journal_entry_res_resize
(
&
c
->
journal
,
&
c
->
btree_root_journal_res
,
...
...
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