summaryrefslogtreecommitdiff
path: root/restripe.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-05-15 12:11:18 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-05-15 12:11:18 +0100
commitf0819c18672a939ad2a6c00c6fa37f73be7a54f3 (patch)
tree8e82f1fe6b2f2979c2329eb5e2b72cb8f108048a /restripe.c
parent22464b6f492163fabe1041b09e1d2f753fd0d31a (diff)
New upstream release.
Diffstat (limited to 'restripe.c')
-rw-r--r--restripe.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/restripe.c b/restripe.c
index de85ee46..31b07e89 100644
--- a/restripe.c
+++ b/restripe.c
@@ -581,14 +581,16 @@ int save_stripes(int *source, unsigned long long *offsets,
raid_disks, level, layout);
if (dnum < 0) abort();
if (source[dnum] < 0 ||
- lseek64(source[dnum], offsets[dnum]+offset, 0) < 0 ||
- read(source[dnum], buf+disk * chunk_size, chunk_size)
- != chunk_size)
+ lseek64(source[dnum],
+ offsets[dnum] + offset, 0) < 0 ||
+ read(source[dnum], buf+disk * chunk_size,
+ chunk_size) != chunk_size) {
if (failed <= 2) {
fdisk[failed] = dnum;
fblock[failed] = disk;
failed++;
}
+ }
}
if (failed == 0 || fblock[0] >= data_disks)
/* all data disks are good */
@@ -731,8 +733,8 @@ int restore_stripes(int *dest, unsigned long long *offsets,
zero_size = chunk_size;
}
- if (stripe_buf == NULL || stripes == NULL || blocks == NULL
- || zero == NULL) {
+ if (stripe_buf == NULL || stripes == NULL || blocks == NULL ||
+ zero == NULL) {
rv = -2;
goto abort;
}