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
dbaee468
Commit
dbaee468
authored
Jan 20, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: fix error message in device remove path
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
919dbbd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
fs/bcachefs/super.c
fs/bcachefs/super.c
+2
-2
fs/bcachefs/util.c
fs/bcachefs/util.c
+5
-1
No files found.
fs/bcachefs/super.c
View file @
dbaee468
...
@@ -1258,8 +1258,8 @@ int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags)
...
@@ -1258,8 +1258,8 @@ int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags)
if
(
data
)
{
if
(
data
)
{
char
data_has_str
[
100
];
char
data_has_str
[
100
];
bch2_
string_opt
_to_text
(
&
PBUF
(
data_has_str
),
bch2_
flags
_to_text
(
&
PBUF
(
data_has_str
),
bch2_data_types
,
data
);
bch2_data_types
,
data
);
bch_err
(
ca
,
"Remove failed, still has data (%s)"
,
data_has_str
);
bch_err
(
ca
,
"Remove failed, still has data (%s)"
,
data_has_str
);
ret
=
-
EBUSY
;
ret
=
-
EBUSY
;
goto
err
;
goto
err
;
...
...
fs/bcachefs/util.c
View file @
dbaee468
...
@@ -134,6 +134,7 @@ void bch2_flags_to_text(struct printbuf *out,
...
@@ -134,6 +134,7 @@ void bch2_flags_to_text(struct printbuf *out,
const
char
*
const
list
[],
u64
flags
)
const
char
*
const
list
[],
u64
flags
)
{
{
unsigned
bit
,
nr
=
0
;
unsigned
bit
,
nr
=
0
;
bool
first
=
true
;
if
(
out
->
pos
!=
out
->
end
)
if
(
out
->
pos
!=
out
->
end
)
*
out
->
pos
=
'\0'
;
*
out
->
pos
=
'\0'
;
...
@@ -142,7 +143,10 @@ void bch2_flags_to_text(struct printbuf *out,
...
@@ -142,7 +143,10 @@ void bch2_flags_to_text(struct printbuf *out,
nr
++
;
nr
++
;
while
(
flags
&&
(
bit
=
__ffs
(
flags
))
<
nr
)
{
while
(
flags
&&
(
bit
=
__ffs
(
flags
))
<
nr
)
{
pr_buf
(
out
,
"%s,"
,
list
[
bit
]);
pr_buf
(
out
,
"%s"
,
list
[
bit
]);
if
(
!
first
)
pr_buf
(
out
,
","
);
first
=
false
;
flags
^=
1
<<
bit
;
flags
^=
1
<<
bit
;
}
}
}
}
...
...
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