Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40392
b: refs/heads/master
c: 01ab566
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Oct 28, 2006
1 parent 13ce08c commit a162cbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 2b6e845986347ef86729e8651908af3e8a8441f5
refs/heads/master: 01ab5662f573fe3a6bcefa200f15ab3069cec8a3
7 changes: 2 additions & 5 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -4045,11 +4045,8 @@ static int update_size(mddev_t *mddev, unsigned long size)
return -EBUSY;
ITERATE_RDEV(mddev,rdev,tmp) {
sector_t avail;
if (rdev->sb_offset > rdev->data_offset)
avail = (rdev->sb_offset*2) - rdev->data_offset;
else
avail = get_capacity(rdev->bdev->bd_disk)
- rdev->data_offset;
avail = rdev->size * 2;

if (fit && (size == 0 || size > avail/2))
size = avail/2;
if (avail < ((sector_t)size << 1))
Expand Down

0 comments on commit a162cbc

Please sign in to comment.