]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/dmerror: fix nonsensical arguments handling
authorZorro Lang <zlang@redhat.com>
Tue, 5 Jul 2016 09:30:23 +0000 (17:30 +0800)
committerEryu Guan <eguan@redhat.com>
Tue, 5 Jul 2016 10:42:25 +0000 (18:42 +0800)
commit4cd659be9cbc28fa5b62c35c22c4a491b301afeb
treefe8f6af6f6ea4023a89db8ee48942d1e9989179c
parent76eb2b1f6e57e3bb4ab3019528d4c87b2317b060
common/dmerror: fix nonsensical arguments handling

By default, _dmerror_load_*_table() suspends the dm device with
"--nolockfs" option. Callers have to feed two arguments to these
functions to change the behavior, with the second being 1, but the
first argument is not used at all, which doesn't make sense.

Fix it by checking if the first argument is "lockfs" and removing
"--nolockfs" option if so, or passing all options to dmsetup.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/dmerror