Because we first write metadata into new place and then trash old place we
don't want situation where old size is equal to new size, as we will trash newly written metadata. MFC after: 1 week
This commit is contained in:
parent
08e51b6267
commit
c7c339d606
@ -1302,6 +1302,10 @@ eli_resize(struct gctl_req *req)
|
||||
gctl_error(req, "Invalid oldsize: Out of range.");
|
||||
goto out;
|
||||
}
|
||||
if (oldsize == mediasize) {
|
||||
gctl_error(req, "Size hasn't changed.");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Read metadata from the 'oldsize' offset. */
|
||||
if (pread(provfd, sector, secsize, oldsize - secsize) != secsize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user