[Devel] [PATCH RH8 3/7] ploop: Move check in ploop_ctr()
Kirill Tkhai
ktkhai at virtuozzo.com
Tue May 4 16:05:12 MSK 2021
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-target.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index 9b94f5f21c6c..97683231b0a5 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -164,6 +164,11 @@ static int ploop_ctr(struct dm_target *ti, unsigned int argc, char **argv)
ti->error = "could not parse cluster_log";
goto err;
}
+ ret = dm_set_target_max_io_len(ti, 1 << ploop->cluster_log);
+ if (ret) {
+ ti->error = "could not set max_io_len";
+ goto err;
+ }
/*
* We do not add FMODE_EXCL, because further open_table_device()
@@ -182,12 +187,6 @@ static int ploop_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto err;
}
- ret = dm_set_target_max_io_len(ti, 1 << ploop->cluster_log);
- if (ret) {
- ti->error = "could not set max_io_len";
- goto err;
- }
-
ret = -ENOMEM;
ploop->wq = alloc_ordered_workqueue("dm-" DM_MSG_PREFIX, WQ_MEM_RECLAIM);
More information about the Devel
mailing list