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
nexedi
linux
Commits
e66d8d5a
Commit
e66d8d5a
authored
Jun 29, 2018
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: raid56: use new helper for async_read_rebuild
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
cf6a4a75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
fs/btrfs/raid56.c
fs/btrfs/raid56.c
+3
-12
No files found.
fs/btrfs/raid56.c
View file @
e66d8d5a
...
@@ -162,7 +162,6 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio);
...
@@ -162,7 +162,6 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio);
static
noinline
void
finish_rmw
(
struct
btrfs_raid_bio
*
rbio
);
static
noinline
void
finish_rmw
(
struct
btrfs_raid_bio
*
rbio
);
static
void
rmw_work
(
struct
btrfs_work
*
work
);
static
void
rmw_work
(
struct
btrfs_work
*
work
);
static
void
read_rebuild_work
(
struct
btrfs_work
*
work
);
static
void
read_rebuild_work
(
struct
btrfs_work
*
work
);
static
void
async_read_rebuild
(
struct
btrfs_raid_bio
*
rbio
);
static
int
fail_bio_stripe
(
struct
btrfs_raid_bio
*
rbio
,
struct
bio
*
bio
);
static
int
fail_bio_stripe
(
struct
btrfs_raid_bio
*
rbio
,
struct
bio
*
bio
);
static
int
fail_rbio_index
(
struct
btrfs_raid_bio
*
rbio
,
int
failed
);
static
int
fail_rbio_index
(
struct
btrfs_raid_bio
*
rbio
,
int
failed
);
static
void
__free_raid_bio
(
struct
btrfs_raid_bio
*
rbio
);
static
void
__free_raid_bio
(
struct
btrfs_raid_bio
*
rbio
);
...
@@ -804,10 +803,10 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
...
@@ -804,10 +803,10 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
spin_unlock_irqrestore
(
&
h
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
h
->
lock
,
flags
);
if
(
next
->
operation
==
BTRFS_RBIO_READ_REBUILD
)
if
(
next
->
operation
==
BTRFS_RBIO_READ_REBUILD
)
async_read_rebuild
(
next
);
start_async_work
(
next
,
read_rebuild_work
);
else
if
(
next
->
operation
==
BTRFS_RBIO_REBUILD_MISSING
)
{
else
if
(
next
->
operation
==
BTRFS_RBIO_REBUILD_MISSING
)
{
steal_rbio
(
rbio
,
next
);
steal_rbio
(
rbio
,
next
);
async_read_rebuild
(
next
);
start_async_work
(
next
,
read_rebuild_work
);
}
else
if
(
next
->
operation
==
BTRFS_RBIO_WRITE
)
{
}
else
if
(
next
->
operation
==
BTRFS_RBIO_WRITE
)
{
steal_rbio
(
rbio
,
next
);
steal_rbio
(
rbio
,
next
);
start_async_work
(
next
,
rmw_work
);
start_async_work
(
next
,
rmw_work
);
...
@@ -1500,14 +1499,6 @@ static void raid_rmw_end_io(struct bio *bio)
...
@@ -1500,14 +1499,6 @@ static void raid_rmw_end_io(struct bio *bio)
rbio_orig_end_io
(
rbio
,
BLK_STS_IOERR
);
rbio_orig_end_io
(
rbio
,
BLK_STS_IOERR
);
}
}
static
void
async_read_rebuild
(
struct
btrfs_raid_bio
*
rbio
)
{
btrfs_init_work
(
&
rbio
->
work
,
btrfs_rmw_helper
,
read_rebuild_work
,
NULL
,
NULL
);
btrfs_queue_work
(
rbio
->
fs_info
->
rmw_workers
,
&
rbio
->
work
);
}
/*
/*
* the stripe must be locked by the caller. It will
* the stripe must be locked by the caller. It will
* unlock after all the writes are done
* unlock after all the writes are done
...
@@ -2765,5 +2756,5 @@ raid56_alloc_missing_rbio(struct btrfs_fs_info *fs_info, struct bio *bio,
...
@@ -2765,5 +2756,5 @@ raid56_alloc_missing_rbio(struct btrfs_fs_info *fs_info, struct bio *bio,
void
raid56_submit_missing_rbio
(
struct
btrfs_raid_bio
*
rbio
)
void
raid56_submit_missing_rbio
(
struct
btrfs_raid_bio
*
rbio
)
{
{
if
(
!
lock_stripe_add
(
rbio
))
if
(
!
lock_stripe_add
(
rbio
))
async_read_rebuild
(
rbio
);
start_async_work
(
rbio
,
read_rebuild_work
);
}
}
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