When '-N' is specified we really should not write anything to the
device, neither we should attempt to discard the device.
This commit fixes xfs_mkfs to not attempt to discard the device in the
case user specified '-N' flag.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
}
}
- if (discard) {
+ if (discard && !Nflag) {
discard_blocks(xi.ddev, xi.dsize);
if (xi.rtdev)
discard_blocks(xi.rtdev, xi.rtsize);