Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360308
b: refs/heads/master
c: f13945d
h: refs/heads/master
v: v3
  • Loading branch information
Mike Snitzer authored and Alasdair G Kergon committed Mar 1, 2013
1 parent 26003a5 commit a99ead6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 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: fd7c092e711ebab55b2688d3859d95dfd0301f73
refs/heads/master: f13945d75730081830b6f3360266950e2b7c9067
9 changes: 1 addition & 8 deletions trunk/drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2443,15 +2443,8 @@ static void set_discard_limits(struct pool_c *pt, struct queue_limits *limits)
if (pt->adjusted_pf.discard_passdown) {
data_limits = &bdev_get_queue(pt->data_dev->bdev)->limits;
limits->discard_granularity = data_limits->discard_granularity;
} else if (block_size_is_power_of_two(pool))
} else
limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT;
else
/*
* Use largest power of 2 that is a factor of sectors_per_block
* but at least DATA_DEV_BLOCK_SIZE_MIN_SECTORS.
*/
limits->discard_granularity = max(1 << (ffs(pool->sectors_per_block) - 1),
DATA_DEV_BLOCK_SIZE_MIN_SECTORS) << SECTOR_SHIFT;
}

static void pool_io_hints(struct dm_target *ti, struct queue_limits *limits)
Expand Down

0 comments on commit a99ead6

Please sign in to comment.