diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2006-12-08 05:41:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:09 -0500 |
commit | a3d77d35be6f416a250c528c3ed5c70013a915e8 (patch) | |
tree | 6aaecdf78b4da52f8a3b3ded2bd320812e3db6df /drivers/md/dm.c | |
parent | 74859364633963cb660c4fa518adca9ab1ca4229 (diff) |
[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>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index dd50e30b6dcf..b42e71bb9e67 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1272,12 +1272,13 @@ static void unlock_fs(struct mapped_device *md) | |||
1272 | * dm_bind_table, dm_suspend must be called to flush any in | 1272 | * dm_bind_table, dm_suspend must be called to flush any in |
1273 | * flight bios and ensure that any further io gets deferred. | 1273 | * flight bios and ensure that any further io gets deferred. |
1274 | */ | 1274 | */ |
1275 | int dm_suspend(struct mapped_device *md, int do_lockfs) | 1275 | int dm_suspend(struct mapped_device *md, unsigned suspend_flags) |
1276 | { | 1276 | { |
1277 | struct dm_table *map = NULL; | 1277 | struct dm_table *map = NULL; |
1278 | DECLARE_WAITQUEUE(wait, current); | 1278 | DECLARE_WAITQUEUE(wait, current); |
1279 | struct bio *def; | 1279 | struct bio *def; |
1280 | int r = -EINVAL; | 1280 | int r = -EINVAL; |
1281 | int do_lockfs = suspend_flags & DM_SUSPEND_LOCKFS_FLAG ? 1 : 0; | ||
1281 | 1282 | ||
1282 | down(&md->suspend_lock); | 1283 | down(&md->suspend_lock); |
1283 | 1284 | ||