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
a81b747d
Commit
a81b747d
authored
Jun 29, 2018
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: raid56: use new helper for async_scrub_parity
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
e66d8d5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
fs/btrfs/raid56.c
fs/btrfs/raid56.c
+3
-11
No files found.
fs/btrfs/raid56.c
View file @
a81b747d
...
@@ -170,7 +170,7 @@ static int alloc_rbio_pages(struct btrfs_raid_bio *rbio);
...
@@ -170,7 +170,7 @@ static int alloc_rbio_pages(struct btrfs_raid_bio *rbio);
static
noinline
void
finish_parity_scrub
(
struct
btrfs_raid_bio
*
rbio
,
static
noinline
void
finish_parity_scrub
(
struct
btrfs_raid_bio
*
rbio
,
int
need_check
);
int
need_check
);
static
void
async_scrub_parity
(
struct
btrfs_raid_bio
*
rbio
);
static
void
scrub_parity_work
(
struct
btrfs_work
*
work
);
static
void
start_async_work
(
struct
btrfs_raid_bio
*
rbio
,
btrfs_func_t
work_func
)
static
void
start_async_work
(
struct
btrfs_raid_bio
*
rbio
,
btrfs_func_t
work_func
)
{
{
...
@@ -812,7 +812,7 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
...
@@ -812,7 +812,7 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
start_async_work
(
next
,
rmw_work
);
start_async_work
(
next
,
rmw_work
);
}
else
if
(
next
->
operation
==
BTRFS_RBIO_PARITY_SCRUB
)
{
}
else
if
(
next
->
operation
==
BTRFS_RBIO_PARITY_SCRUB
)
{
steal_rbio
(
rbio
,
next
);
steal_rbio
(
rbio
,
next
);
async_scrub_parity
(
next
);
start_async_work
(
next
,
scrub_parity_work
);
}
}
goto
done_nolock
;
goto
done_nolock
;
...
@@ -2703,18 +2703,10 @@ static void scrub_parity_work(struct btrfs_work *work)
...
@@ -2703,18 +2703,10 @@ static void scrub_parity_work(struct btrfs_work *work)
raid56_parity_scrub_stripe
(
rbio
);
raid56_parity_scrub_stripe
(
rbio
);
}
}
static
void
async_scrub_parity
(
struct
btrfs_raid_bio
*
rbio
)
{
btrfs_init_work
(
&
rbio
->
work
,
btrfs_rmw_helper
,
scrub_parity_work
,
NULL
,
NULL
);
btrfs_queue_work
(
rbio
->
fs_info
->
rmw_workers
,
&
rbio
->
work
);
}
void
raid56_parity_submit_scrub_rbio
(
struct
btrfs_raid_bio
*
rbio
)
void
raid56_parity_submit_scrub_rbio
(
struct
btrfs_raid_bio
*
rbio
)
{
{
if
(
!
lock_stripe_add
(
rbio
))
if
(
!
lock_stripe_add
(
rbio
))
async_scrub_parity
(
rbio
);
start_async_work
(
rbio
,
scrub_parity_work
);
}
}
/* The following code is used for dev replace of a missing RAID 5/6 device. */
/* The following code is used for dev replace of a missing RAID 5/6 device. */
...
...
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