Re: [PATCH] tests/nvme: Set clear_ids for passthru targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 14, 2022 / 16:25, Alan Adamson wrote:
> 
> 
> > On Jul 6, 2022, at 8:58 AM, Alan Adamson <alan.adamson@xxxxxxxxxx> wrote:
> > 
> > 
> > 
> >> On Jul 5, 2022, at 5:18 PM, Chaitanya Kulkarni <chaitanyak@xxxxxxxxxx> wrote:
> >> 
> >> On 7/5/22 13:56, Alan Adamson wrote:
> >>> This allows to connect to passthru targets when the client and target
> >>> are on the same host.
> >>> 
> >>> Signed-off-by: Alan Adamson <alan.adamson@xxxxxxxxxx>
> >>> ---
> >>> tests/nvme/rc | 3 +++
> >>> 1 file changed, 3 insertions(+)
> >>> 
> >>> diff --git a/tests/nvme/rc b/tests/nvme/rc
> >>> index 4bebbc762cbb..5e50e69fb3f0 100644
> >>> --- a/tests/nvme/rc
> >>> +++ b/tests/nvme/rc
> >>> @@ -303,6 +303,9 @@ _create_nvmet_passthru() {
> >>> 
> >>> 	_test_dev_nvme_ctrl > "${passthru_path}/device_path"
> >>> 	echo 1 > "${passthru_path}/enable"
> >>> +	if [ -f "${passthru_path}/clear_ids" ]; then
> >>> +		echo 1 > "${passthru_path}/clear_ids"
> >>> +	fi
> >>> }
> >>> 
> >>> _remove_nvmet_passhtru() {
> >> 
> >> without looking into the code, just wondering whether we need
> >> an explicit check to ensure that both host and target on the
> >> same machine something like checking nvme_trtype=loop ?
> > 
> > If nvme_trtype=loop, this code isn’t necessary because loop defaults
> > to clear_ids, but it is necessary for tcp and rdma.  The check is
> > for necessary when running a pre 5.19 kernel where clear_ids
> > isn’t present just to prevent a error message.
> > 
> > Alan
> 
> Any other comments or feedback?

I've applied the patch with an edit to replace single bracket to double
brackets. Wish this edit is ok for you. Thanks!

-- 
Shin'ichiro Kawasaki




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux