[PATCH] dm: suspend: parameter change
Change the interface of dm_suspend() so that we can pass several options without increasing the number of parameters. The existing 'do_lockfs' integer parameter is replaced by a flag DM_SUSPEND_LOCKFS_FLAG. There is no functional change to the code. Test results: I have tested 'dmsetup suspend' command with/without the '--nolockfs' option and confirmed the do_lockfs value is correctly set. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
7485936463
commit
a3d77d35be
@@ -1272,12 +1272,13 @@ static void unlock_fs(struct mapped_device *md)
|
||||
* dm_bind_table, dm_suspend must be called to flush any in
|
||||
* flight bios and ensure that any further io gets deferred.
|
||||
*/
|
||||
int dm_suspend(struct mapped_device *md, int do_lockfs)
|
||||
int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
|
||||
{
|
||||
struct dm_table *map = NULL;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
struct bio *def;
|
||||
int r = -EINVAL;
|
||||
int do_lockfs = suspend_flags & DM_SUSPEND_LOCKFS_FLAG ? 1 : 0;
|
||||
|
||||
down(&md->suspend_lock);
|
||||
|
||||
|
Reference in New Issue
Block a user