nvmf: Generate a reasonable default subsystem serial number
If the user does not specify a serial number, just set it to all 0. Change-Id: Ie1aaa4c1bf5f9eaf76fcc9ed6f6bd6ded2aeb200 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/425324 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
This commit is contained in:
parent
33ed49d2e9
commit
2eacfd8786
@ -289,6 +289,9 @@ spdk_nvmf_subsystem_create(struct spdk_nvmf_tgt *tgt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(subsystem->sn, '0', sizeof(subsystem->sn) - 1);
|
||||||
|
subsystem->sn[sizeof(subsystem->sn) - 1] = '\n';
|
||||||
|
|
||||||
tgt->subsystems[sid] = subsystem;
|
tgt->subsystems[sid] = subsystem;
|
||||||
tgt->discovery_genctr++;
|
tgt->discovery_genctr++;
|
||||||
|
|
||||||
|
@ -1354,7 +1354,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
|||||||
p.add_argument("-a", "--allow-any-host", action='store_true', help="Allow any host to connect (don't enforce host NQN whitelist)")
|
p.add_argument("-a", "--allow-any-host", action='store_true', help="Allow any host to connect (don't enforce host NQN whitelist)")
|
||||||
p.add_argument("-s", "--serial-number", help="""
|
p.add_argument("-s", "--serial-number", help="""
|
||||||
Format: 'sn' etc
|
Format: 'sn' etc
|
||||||
Example: 'SPDK00000000000001'""", default='0000:00:01.0')
|
Example: 'SPDK00000000000001'""", default='00000000000000000000')
|
||||||
p.add_argument("-n", "--namespaces", help="""Whitespace-separated list of namespaces
|
p.add_argument("-n", "--namespaces", help="""Whitespace-separated list of namespaces
|
||||||
Format: 'bdev_name1[:nsid1] bdev_name2[:nsid2] bdev_name3[:nsid3]' etc
|
Format: 'bdev_name1[:nsid1] bdev_name2[:nsid2] bdev_name3[:nsid3]' etc
|
||||||
Example: '1:Malloc0 2:Malloc1 3:Malloc2'
|
Example: '1:Malloc0 2:Malloc1 3:Malloc2'
|
||||||
@ -1375,7 +1375,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
|||||||
p.add_argument('nqn', help='Subsystem NQN (ASCII)')
|
p.add_argument('nqn', help='Subsystem NQN (ASCII)')
|
||||||
p.add_argument("-s", "--serial-number", help="""
|
p.add_argument("-s", "--serial-number", help="""
|
||||||
Format: 'sn' etc
|
Format: 'sn' etc
|
||||||
Example: 'SPDK00000000000001'""", default='0000:00:01.0')
|
Example: 'SPDK00000000000001'""", default='00000000000000000000')
|
||||||
p.add_argument("-a", "--allow-any-host", action='store_true', help="Allow any host to connect (don't enforce host NQN whitelist)")
|
p.add_argument("-a", "--allow-any-host", action='store_true', help="Allow any host to connect (don't enforce host NQN whitelist)")
|
||||||
p.add_argument("-m", "--max-namespaces", help="Maximum number of namespaces allowed",
|
p.add_argument("-m", "--max-namespaces", help="Maximum number of namespaces allowed",
|
||||||
type=int, default=0)
|
type=int, default=0)
|
||||||
|
Loading…
Reference in New Issue
Block a user