mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
dmsetup: use noflush with force removal
When user specifies '--force' with remove/remove_all/wipe_table use '--noflush --nolockfs' resume flags, so the operation will not block when device underneath is blocked.
This commit is contained in:
parent
e0d915a873
commit
791e76ff70
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.109 -
|
Version 1.02.109 -
|
||||||
======================================
|
======================================
|
||||||
|
Use --noflush and --nolockfs when removing device with --force.
|
||||||
Parse new Overflow status string for snapshot target.
|
Parse new Overflow status string for snapshot target.
|
||||||
Check dir path components are valid if using dm_create_dir, error out if not.
|
Check dir path components are valid if using dm_create_dir, error out if not.
|
||||||
Fix /dev/mapper handling to remove dangling entries if symlinks are found.
|
Fix /dev/mapper handling to remove dangling entries if symlinks are found.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
|
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
|
||||||
* Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
|
* Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved.
|
||||||
* Copyright (C) 2005-2007 NEC Corporation
|
* Copyright (C) 2005-2007 NEC Corporation
|
||||||
*
|
*
|
||||||
* This file is part of the device-mapper userspace tools.
|
* This file is part of the device-mapper userspace tools.
|
||||||
@ -1923,6 +1923,10 @@ static int _error_device(CMD_ARGS)
|
|||||||
if (!_task_run(dmt))
|
if (!_task_run(dmt))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
|
if (_switches[FORCE_ARG])
|
||||||
|
/* Avoid hang on flushing with --force */
|
||||||
|
_switches[NOLOCKFS_ARG] = _switches[NOFLUSH_ARG] = 1;
|
||||||
|
|
||||||
if (!_simple(DM_DEVICE_RESUME, name, 0, 0)) {
|
if (!_simple(DM_DEVICE_RESUME, name, 0, 0)) {
|
||||||
_simple(DM_DEVICE_CLEAR, name, 0, 0);
|
_simple(DM_DEVICE_CLEAR, name, 0, 0);
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
Loading…
Reference in New Issue
Block a user