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
ca8895d9
Commit
ca8895d9
authored
Nov 26, 2014
by
Goldwyn Rodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return MD_SB_CLUSTERED if mddev is clustered
Signed-off-by:
Goldwyn Rodrigues
<
rgoldwyn@suse.com
>
parent
c4ce867f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
drivers/md/md.c
drivers/md/md.c
+3
-0
include/uapi/linux/raid/md_p.h
include/uapi/linux/raid/md_p.h
+1
-0
No files found.
drivers/md/md.c
View file @
ca8895d9
...
@@ -5634,6 +5634,9 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
...
@@ -5634,6 +5634,9 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
info
.
state
=
(
1
<<
MD_SB_CLEAN
);
info
.
state
=
(
1
<<
MD_SB_CLEAN
);
if
(
mddev
->
bitmap
&&
mddev
->
bitmap_info
.
offset
)
if
(
mddev
->
bitmap
&&
mddev
->
bitmap_info
.
offset
)
info
.
state
|=
(
1
<<
MD_SB_BITMAP_PRESENT
);
info
.
state
|=
(
1
<<
MD_SB_BITMAP_PRESENT
);
if
(
mddev_is_clustered
(
mddev
))
info
.
state
|=
(
1
<<
MD_SB_CLUSTERED
);
info
.
active_disks
=
insync
;
info
.
active_disks
=
insync
;
info
.
working_disks
=
working
;
info
.
working_disks
=
working
;
info
.
failed_disks
=
failed
;
info
.
failed_disks
=
failed
;
...
...
include/uapi/linux/raid/md_p.h
View file @
ca8895d9
...
@@ -101,6 +101,7 @@ typedef struct mdp_device_descriptor_s {
...
@@ -101,6 +101,7 @@ typedef struct mdp_device_descriptor_s {
#define MD_SB_CLEAN 0
#define MD_SB_CLEAN 0
#define MD_SB_ERRORS 1
#define MD_SB_ERRORS 1
#define MD_SB_CLUSTERED 5
/* MD is clustered */
#define MD_SB_BITMAP_PRESENT 8
/* bitmap may be present nearby */
#define MD_SB_BITMAP_PRESENT 8
/* bitmap may be present nearby */
/*
/*
...
...
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