diff options
author | Joursoir <chat@joursoir.net> | 2023-01-16 03:45:54 +0400 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2023-01-16 13:33:18 +0400 |
commit | d93952a43b90635e052abfc808d5966ff750f18a (patch) | |
tree | 0e58247af86ad43f7e6972b2664a7be7afa6c7c5 | |
parent | 3cd29884742a707ff7ff765d104b3a37ea28ea52 (diff) | |
download | sbdd-d93952a43b90635e052abfc808d5966ff750f18a.tar.gz sbdd-d93952a43b90635e052abfc808d5966ff750f18a.tar.bz2 sbdd-d93952a43b90635e052abfc808d5966ff750f18a.zip |
require 2 or more disks to make a RAID0 array
Task: 2
-rw-r--r-- | sbdd.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -178,6 +178,11 @@ static int sbdd_create(void) unsigned int max_sectors; sector_t totalsize = 0; + if (__sbdd_diskcount < 2) { + pr_err("not enough disks to make a RAID0\n"); + return -EFAULT; + } + ret = bioset_init(&__sbdd_bio_set, BIO_POOL_SIZE, 0, 0); if (ret) { pr_err("create BIO set failed: %d\n", ret); |