public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	"shinichiro.kawasaki@wdc.com" <shinichiro.kawasaki@wdc.com>,
	"hch@lst.de" <hch@lst.de>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"gjoyce@linux.ibm.com" <gjoyce@linux.ibm.com>
Subject: Re: [PATCHv2 blktests 2/2] nvme: add test for writing to file-ns just after disabling it
Date: Thu, 5 Dec 2024 16:36:26 +0530	[thread overview]
Message-ID: <fb1058c3-ca47-4a54-8c1b-7eb9fa449fa0@linux.ibm.com> (raw)
In-Reply-To: <adbeb95d-40aa-44c3-bb63-01c0a49f5182@flourine.local>



On 12/5/24 16:17, Daniel Wagner wrote:
> On Thu, Dec 05, 2024 at 03:10:23PM +0530, Nilay Shroff wrote:
>>>> +	img="$(mktemp /tmp/blk_img_XXXXXX)"
>>>> +	dd if=/dev/urandom of="$img" bs=512 count=1 status=none
>>>
>>> why can't we just use the standard block device backed ns ?
>> Using standard block device would also work however using the file backed block 
>> device would be handy in case user doesn't have a spare standard block device 
>> available which could be used for writing a random junk to it.
> 
> If I understood Chaitanya correctly, he would prefer to use the existing
> helpers to setup the backend, either file or block. If so, I am also on
> board with this idea, not to hard code backend into the test. We have
> moved this into the helpers so that it's a test parameter.
> 
>> OK I think maybe there's a confusion, let me clarify one thing here: We're
>> *not* disabling AEN functionality but only masking the ns-changed async even 
>> notification from target and I believe that's perfectly legal per spec. I 
>> shall update the comment added in the test case to avoid this confusion. 
>>
>>> Can this be an exception for some reason ?
>>>
>>> Shinichiro, Daniel any thoughts ?
> 
> I haven't really checked what the spec says on this topic. Nilay, could
> you give a pointer, so I don't spend too much time trying to find the
> right spot in the spec. Thanks!
> 
Sure, you may refer "5.27.1.8 Asynchronous Event Configuration (Feature Identifier 0Bh)"
in NVMe base spec 2.0. And then refer Figure 236, Namespace Attribute Notices: 

>>> +unsigned int ns_disable_error_inject;
>>> +module_param(ns_disable_error_inject, int, 0644);
>>> +MODULE_PARM_DESC(ns_disable_error_inject,
>>> +                "delay xa_erase() in ns-disable path in seconds 
>>> (default 0)");
>>> +
> 
> Please no. This type of debugging/testing interface is hard to use IMO.
> It should be in one of the psydo FS, sysfs, configfs or debugfs if
> really needed.
> 
> Daniel
> 
Thanks,
--Nilay


  reply	other threads:[~2024-12-05 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 11:47 [PATCHv2 blktests 0/2] add nvme test for creating sleep while atomic kernel BUG Nilay Shroff
2024-12-04 11:47 ` [PATCHv2 blktests 1/2] nvme/052: move nvmf_wait_for_ns() to common/nvme Nilay Shroff
2024-12-04 11:47 ` [PATCHv2 blktests 2/2] nvme: add test for writing to file-ns just after disabling it Nilay Shroff
2024-12-05  7:32   ` Chaitanya Kulkarni
2024-12-05  9:40     ` Nilay Shroff
2024-12-05 10:47       ` Daniel Wagner
2024-12-05 11:06         ` Nilay Shroff [this message]
2024-12-05 11:20           ` Daniel Wagner
2024-12-06  1:49             ` Shinichiro Kawasaki
2024-12-06  1:53   ` Shinichiro Kawasaki
2024-12-06 10:54     ` Nilay Shroff

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=fb1058c3-ca47-4a54-8c1b-7eb9fa449fa0@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=chaitanyak@nvidia.com \
    --cc=dwagner@suse.de \
    --cc=gjoyce@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=shinichiro.kawasaki@wdc.com \
    /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