All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response
Date: Fri, 30 Nov 2018 16:41:30 +0000	[thread overview]
Message-ID: <1543596090.185366.149.camel@acm.org> (raw)
In-Reply-To: <20181129010157.12687-7-ddiss@suse.de>

On Fri, 2018-11-30 at 15:41 +-0100, David Disseldorp wrote:
+AD4 On Fri, 30 Nov 2018 14:17:49 +-0100, David Disseldorp wrote:
+AD4 
+AD4 +AD4 +AD4 Where is the code that initializes dev-+AD4-t10+AF8-wwn.vendor to +ACI-LIO-ORG+ACI? Did I
+AD4 +AD4 +AD4 perhaps overlook something?  
+AD4 +AD4 
+AD4 +AD4 This is done in target+AF8-configure+AF8-device() .
+AD4 
+AD4 Hmm, continuing to do it there may cause a bit of confusion if vendor+AF8-id
+AD4 is set before the backstore is enabled, which would cause it to be
+AD4 overwritten. That said, we already have similarly strange behaviour for
+AD4 emulate+AF8-model+AF8-alias / product. E.g.:
+AD4 
+AD4 rapido1:/+ACM cd /sys/kernel/config/target/
+AD4 rapido1:target+ACM mkdir -p core/fileio+AF8-1/testing
+AD4 rapido1:target+ACM echo -n +ACI-fd+AF8-dev+AF8-name+AD0-/asdf,fd+AF8-dev+AF8-size+AD0-4096+ACI +AD4 core/fileio+AF8-1/testing/control
+AD4 rapido1:target+ACM echo -n +ACI-testing1+ACI +AD4 core/fileio+AF8-1/testing/wwn/vendor+AF8-id
+AD4 rapido1:target+ACM cat core/fileio+AF8-1/testing/wwn/vendor+AF8-id
+AD4 testing1
+AD4 rapido1:target+ACM echo 1 +AD4 ./core/fileio+AF8-1/testing/attrib/emulate+AF8-model+AF8-alias
+AD4 rapido1:target+ACM cat ./core/fileio+AF8-1/testing/statistics/scsi+AF8-lu/prod
+AD4 testing
+AD4 rapido1:target+ACM echo 1 +AD4 core/fileio+AF8-1/testing/enable
+AD4 rapido1:target+ACM cat core/fileio+AF8-1/testing/wwn/vendor+AF8-id
+AD4 LIO-ORG
+AD4 rapido1:target+ACM cat ./core/fileio+AF8-1/testing/statistics/scsi+AF8-lu/prod
+AD4 FILEIO
+AD4 rapido1:target+ACM cat ./core/fileio+AF8-1/testing/attrib/emulate+AF8-model+AF8-alias
+AD4 1
+AD4 
+AD4 Not sure how best to handle this...
+AD4 1. move vendor/model/rev initialization into target+AF8-alloc+AF8-device()
+AD4 2. move vendor (only) initialization into target+AF8-alloc+AF8-device()
+AD4 3. fail attempts to set emulate+AF8-model+AF8-alias or vendor+AF8-id before the
+AD4    backstore has been enabled
+AD4 4. leave as-is
+AD4 
+AD4 (1) would IMO be the most straightforward, but it's a slight change to
+AD4 the existing (IMO broken) emulate+AF8-model+AF8-alias user interface.

I'm in favor of moving some of the target+AF8-configure+AF8-device() code into the
target+AF8-alloc+AF8-device() function. Today target+AF8-configure+AF8-device() overwrites
the vendor, model and revision string and is called when +ACI-1+ACI is written
into the +ACI-enable+ACI attribute. Overwriting these attributes when enabling a
backstore seems wrong to me.

Thanks,

Bart.

      parent reply	other threads:[~2018-11-30 16:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29  1:01 [PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response David Disseldorp
2018-11-29  1:15 ` Ly, Bryant
2018-11-29  1:30 ` Lee Duncan
2018-11-29 16:35 ` Bart Van Assche
2018-11-30 13:17 ` David Disseldorp
2018-11-30 14:41 ` David Disseldorp
2018-11-30 16:41 ` Bart Van Assche [this message]

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=1543596090.185366.149.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=target-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.