Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93207
b: refs/heads/master
c: 7ff14a3
h: refs/heads/master
i:
  93205: 7bc178b
  93203: 17aa52d
  93199: 6700a53
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Apr 25, 2008
1 parent 74dfaa3 commit 94dbe14
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2aebe03be60ae4da03507a00d60211d5e0327c3
refs/heads/master: 7ff14a36159d947872870e7a3e9dcaebc46b23eb
11 changes: 8 additions & 3 deletions trunk/drivers/md/dm-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions,
{
struct io io;

if (num_regions > 1 && rw != WRITE) {
if (num_regions > 1 && (rw & RW_MASK) != WRITE) {
WARN_ON(1);
return -EIO;
}
Expand Down Expand Up @@ -390,7 +390,7 @@ static int async_io(struct dm_io_client *client, unsigned int num_regions,
{
struct io *io;

if (num_regions > 1 && rw != WRITE) {
if (num_regions > 1 && (rw & RW_MASK) != WRITE) {
WARN_ON(1);
fn(1, context);
return -EIO;
Expand Down Expand Up @@ -436,7 +436,12 @@ static int dp_init(struct dm_io_request *io_req, struct dpages *dp)
}

/*
* New collapsed (a)synchronous interface
* New collapsed (a)synchronous interface.
*
* If the IO is asynchronous (i.e. it has notify.fn), you must either unplug
* the queue with blk_unplug() some time later or set the BIO_RW_SYNC bit in
* io_req->bi_rw. If you fail to do one of these, the IO will be submitted to
* the disk after q->unplug_delay, which defaults to 3ms in blk-settings.c.
*/
int dm_io(struct dm_io_request *io_req, unsigned num_regions,
struct dm_io_region *where, unsigned long *sync_error_bits)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-kcopyd.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static int run_io_job(struct kcopyd_job *job)
{
int r;
struct dm_io_request io_req = {
.bi_rw = job->rw,
.bi_rw = job->rw | (1 << BIO_RW_SYNC),
.mem.type = DM_IO_PAGE_LIST,
.mem.ptr.pl = job->pages,
.mem.offset = job->offset,
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,8 @@ static void do_mirror(struct work_struct *work)
do_reads(ms, &reads);
do_writes(ms, &writes);
do_failures(ms, &failures);

dm_table_unplug_all(ms->ti->table);
}


Expand Down

0 comments on commit 94dbe14

Please sign in to comment.