Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349461
b: refs/heads/master
c: fe7af2d
h: refs/heads/master
i:
  349459: ad66b2e
v: v3
  • Loading branch information
Alasdair G Kergon committed Jan 31, 2013
1 parent 29a05d7 commit ff40aa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 0f640dca08330dfc7820d610578e5935b5e654b2
refs/heads/master: fe7af2d3babefabd96a39e8b0d58ede88f3c7993
6 changes: 4 additions & 2 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,7 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
{
struct dm_target *ti;
sector_t len;
unsigned num_requests;

do {
ti = dm_table_find_target(ci->map, ci->sector);
Expand All @@ -1200,15 +1201,16 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
* reconfiguration might also have changed that since the
* check was performed.
*/
if (!get_num_requests || !get_num_requests(ti))
num_requests = get_num_requests ? get_num_requests(ti) : 0;
if (!num_requests)
return -EOPNOTSUPP;

if (is_split_required && !is_split_required(ti))
len = min(ci->sector_count, max_io_len_target_boundary(ci->sector, ti));
else
len = min(ci->sector_count, max_io_len(ci->sector, ti));

__issue_target_requests(ci, ti, ti->num_discard_requests, len);
__issue_target_requests(ci, ti, num_requests, len);

ci->sector += len;
} while (ci->sector_count -= len);
Expand Down

0 comments on commit ff40aa1

Please sign in to comment.