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
ba2541f2
Commit
ba2541f2
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] rename end_request in floppy() and raid1
In preparation of getting rid of the LOCAL_END_REQUEST mess.
parent
4b28bcb3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
drivers/block/floppy.c
drivers/block/floppy.c
+3
-3
drivers/block/floppy98.c
drivers/block/floppy98.c
+3
-3
drivers/md/raid1.c
drivers/md/raid1.c
+5
-5
No files found.
drivers/block/floppy.c
View file @
ba2541f2
...
...
@@ -2293,7 +2293,7 @@ static int do_format(kdev_t device, struct format_descr *tmp_format_req)
* =============================
*/
static
inline
void
end_request
(
struct
request
*
req
,
int
uptodate
)
static
void
floppy_
end_request
(
struct
request
*
req
,
int
uptodate
)
{
if
(
end_that_request_first
(
req
,
uptodate
,
current_count_sectors
))
return
;
...
...
@@ -2334,7 +2334,7 @@ static void request_done(int uptodate)
/* unlock chained buffers */
spin_lock_irqsave
(
q
->
queue_lock
,
flags
);
end_request
(
req
,
1
);
floppy_
end_request
(
req
,
1
);
spin_unlock_irqrestore
(
q
->
queue_lock
,
flags
);
}
else
{
if
(
rq_data_dir
(
req
)
==
WRITE
)
{
...
...
@@ -2348,7 +2348,7 @@ static void request_done(int uptodate)
DRWE
->
last_error_generation
=
DRS
->
generation
;
}
spin_lock_irqsave
(
q
->
queue_lock
,
flags
);
end_request
(
req
,
0
);
floppy_
end_request
(
req
,
0
);
spin_unlock_irqrestore
(
q
->
queue_lock
,
flags
);
}
}
...
...
drivers/block/floppy98.c
View file @
ba2541f2
...
...
@@ -2348,7 +2348,7 @@ static int do_format(kdev_t device, struct format_descr *tmp_format_req)
* =============================
*/
static
inline
void
end_request
(
struct
request
*
req
,
int
uptodate
)
static
void
floppy_
end_request
(
struct
request
*
req
,
int
uptodate
)
{
if
(
end_that_request_first
(
req
,
uptodate
,
current_count_sectors
))
return
;
...
...
@@ -2389,7 +2389,7 @@ static void request_done(int uptodate)
/* unlock chained buffers */
spin_lock_irqsave
(
q
->
queue_lock
,
flags
);
end_request
(
req
,
1
);
floppy_
end_request
(
req
,
1
);
spin_unlock_irqrestore
(
q
->
queue_lock
,
flags
);
}
else
{
if
(
rq_data_dir
(
req
)
==
WRITE
)
{
...
...
@@ -2403,7 +2403,7 @@ static void request_done(int uptodate)
DRWE
->
last_error_generation
=
DRS
->
generation
;
}
spin_lock_irqsave
(
q
->
queue_lock
,
flags
);
end_request
(
req
,
0
);
floppy_
end_request
(
req
,
0
);
spin_unlock_irqrestore
(
q
->
queue_lock
,
flags
);
}
}
...
...
drivers/md/raid1.c
View file @
ba2541f2
...
...
@@ -258,7 +258,7 @@ static inline void update_head_pos(int disk, r1bio_t *r1_bio)
r1_bio
->
sector
+
(
r1_bio
->
master_bio
->
bi_size
>>
9
);
}
static
int
end_request
(
struct
bio
*
bio
,
unsigned
int
bytes_done
,
int
error
)
static
int
raid1_
end_request
(
struct
bio
*
bio
,
unsigned
int
bytes_done
,
int
error
)
{
int
uptodate
=
test_bit
(
BIO_UPTODATE
,
&
bio
->
bi_flags
);
r1bio_t
*
r1_bio
=
(
r1bio_t
*
)(
bio
->
bi_private
);
...
...
@@ -496,7 +496,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
read_bio
->
bi_sector
=
r1_bio
->
sector
+
mirror
->
rdev
->
data_offset
;
read_bio
->
bi_bdev
=
mirror
->
rdev
->
bdev
;
read_bio
->
bi_end_io
=
end_request
;
read_bio
->
bi_end_io
=
raid1_
end_request
;
read_bio
->
bi_rw
=
r1_bio
->
cmd
;
read_bio
->
bi_private
=
r1_bio
;
...
...
@@ -531,7 +531,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
mbio
->
bi_sector
=
r1_bio
->
sector
+
conf
->
mirrors
[
i
].
rdev
->
data_offset
;
mbio
->
bi_bdev
=
conf
->
mirrors
[
i
].
rdev
->
bdev
;
mbio
->
bi_end_io
=
end_request
;
mbio
->
bi_end_io
=
raid1_
end_request
;
mbio
->
bi_rw
=
r1_bio
->
cmd
;
mbio
->
bi_private
=
r1_bio
;
...
...
@@ -551,11 +551,11 @@ static int make_request(request_queue_t *q, struct bio * bio)
/*
* We have to be a bit careful about the semaphore above, thats
* why we start the requests separately. Since generic_make_request()
* can sleep, this is the safer solution. Imagine, end_request
* can sleep, this is the safer solution. Imagine,
raid1_
end_request
* decreasing the semaphore before we could have set it up ...
* We could play tricks with the semaphore (presetting it and
* correcting at the end if sum_bios is not 'n' but we have to
* do end_request by hand if all requests finish until we had a
* do
raid1_
end_request by hand if all requests finish until we had a
* chance to set up the semaphore correctly ... lots of races).
*/
...
...
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