qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ashutosh Sharma <ashutosh.dandora4@gmail.com>
To: qemu-devel@nongnu.org
Cc: peterx@redhat.com, k.jensen@samsung.com, philmd@linaro.org,
	 armbru@redhat.com, mst@redhat.com,
	lukasz.gieryk@linux.intel.com,  alex.williamson@redhat.com,
	helgaas@kernel.org, afaria@redhat.com
Subject: Format type of qemu NVMe virtual drive reverted back to its default (512 bytes block size) after performing hot plugout/plugin operation on that drive.
Date: Tue, 25 Jul 2023 16:53:09 +0530	[thread overview]
Message-ID: <CADOvtemuUgp322fE6xYrzVp_RNU_jpqOfzd-12ES-jpPoDvBaA@mail.gmail.com> (raw)

Hi,

I have a virtual system created using qemu 7.2. In that system, I
attached/hot plugged a virtual NVMe drive. This drive had a default
block size of 512 bytes.

admin@node-3:~$ sudo nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          ashudev-6f34a1cf_13  QEMU NVMe Ctrl
             1          34.36  GB /  34.36  GB    512   B +  0 B
7.1.92

After that, I formatted this drive with 4k block size and it formatted
successfully.

admin@node-3:~$ sudo nvme format /dev/nvme0n1 -f --lbaf 4
Success formatting namespace:1
admin@node-3:~$
admin@node-3:~$ sudo nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          ashudev-6f34a1cf_13  QEMU NVMe Ctrl
             1          34.36  GB /  34.36  GB      4 KiB +  0 B
7.1.92

Then, I just performed the hot plugout and then plugin operation on
that drive using qmp.execute's device_del and device_add cmd
respectively.

But, after that, the default block size of that drive reverted to 512 bytes.

admin@node-3:~$ sudo nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          ashudev-6f34a1cf_13  QEMU NVMe Ctrl
             1          34.36  GB /  34.36  GB    512   B +  0 B
7.1.92

So, I just wanted to know why the NVMe format type reverted back to
512 bytes, as I just performed the hot plugout/plugin operations only.
Drive's block size (format type) should not be changed upon
removal/insertion, right ? or am I missing something ?

Regards,
Ashutosh


             reply	other threads:[~2023-07-25 11:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 11:23 Ashutosh Sharma [this message]
2023-08-03  9:44 ` Format type of qemu NVMe virtual drive reverted back to its default (512 bytes block size) after performing hot plugout/plugin operation on that drive Klaus Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADOvtemuUgp322fE6xYrzVp_RNU_jpqOfzd-12ES-jpPoDvBaA@mail.gmail.com \
    --to=ashutosh.dandora4@gmail.com \
    --cc=afaria@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=helgaas@kernel.org \
    --cc=k.jensen@samsung.com \
    --cc=lukasz.gieryk@linux.intel.com \
    --cc=mst@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).