This reverts commit
c276f3ddd780c55458e509b74d80633728828950.
The namespace will be created but not yet attached, thus the block
device is not created either.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[wagi: added commit message]
Signed-off-by: Daniel Wagner <wagi@kernel.org>
err = subprocess.call(id_ns_cmd,
shell=True,
stdout=subprocess.DEVNULL)
- if err == 0:
- # enumerate new namespace block device
- self.nvme_reset_ctrl()
- # check if new namespace block device exists
- err = 0 if stat.S_ISBLK(os.stat(self.ctrl + "n" + str(nsid)).st_mode) else 1
return err
def attach_ns(self, ctrl_id, nsid):