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
49a43dae
Commit
49a43dae
authored
Apr 12, 2024
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bdev: move ->bd_ro_warned to ->__bd_flags
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
ac2b6f9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
block/blk-core.c
block/blk-core.c
+3
-2
include/linux/blk_types.h
include/linux/blk_types.h
+1
-1
No files found.
block/blk-core.c
View file @
49a43dae
...
...
@@ -514,10 +514,11 @@ static inline void bio_check_ro(struct bio *bio)
if
(
op_is_flush
(
bio
->
bi_opf
)
&&
!
bio_sectors
(
bio
))
return
;
if
(
b
io
->
bi_bdev
->
bd_ro_warned
)
if
(
b
dev_test_flag
(
bio
->
bi_bdev
,
BD_RO_WARNED
)
)
return
;
bio
->
bi_bdev
->
bd_ro_warned
=
true
;
bdev_set_flag
(
bio
->
bi_bdev
,
BD_RO_WARNED
);
/*
* Use ioctl to set underlying disk of raid/dm to read-only
* will trigger this.
...
...
include/linux/blk_types.h
View file @
49a43dae
...
...
@@ -50,6 +50,7 @@ struct block_device {
#define BD_READ_ONLY (1u<<8) // read-only policy
#define BD_WRITE_HOLDER (1u<<9)
#define BD_HAS_SUBMIT_BIO (1u<<10)
#define BD_RO_WARNED (1u<<11)
dev_t
bd_dev
;
struct
inode
*
bd_inode
;
/* will die */
...
...
@@ -69,7 +70,6 @@ struct block_device {
#ifdef CONFIG_FAIL_MAKE_REQUEST
bool
bd_make_it_fail
;
#endif
bool
bd_ro_warned
;
int
bd_writers
;
/*
* keep this out-of-line as it's both big and not needed in the fast
...
...
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