public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	dgilbert@interlog.com, martin.petersen@oracle.com
Subject: Re: scsi_debug: shared dev context, BUG or FEATURE?
Date: Mon, 27 Mar 2017 21:41:17 -0400	[thread overview]
Message-ID: <yq1d1d26uv6.fsf@oracle.com> (raw)
In-Reply-To: <87tw6e4o75.fsf@dmlp.sw.ru> (Dmitry Monakhov's message of "Mon, 27 Mar 2017 20:35:58 +0300")

Dmitry Monakhov <dmonakhov@openvz.org> writes:

Dmitry,

> scsi_debug has very strange structure from one point it supports
> dynamic number of devices but from other point context is common for
> all devices:

> So basically we may have many devices with single context which refers
> common data. Are any sane reason to share context between devices?
> Who use such behaviour?

As the name implies, scsi_debug was conceived to debug the SCSI layer.
Among other things, the intent was to be able to test hundreds of
controllers and LUNs without having physical hardware or storage to back
that up. Plus to have a target whose reporting could easily be tweaked
to test the SCSI core code.

So that's the reason for the oddball shared buffer setup. scsi_debug
wasn't really meant to be a "useful" storage target.

If you want something with a per-device backing store I suggest you look
at the SCSI target subsystem. With tcm_loop and ramdisk you get
essentially the same thing as scsi_debug. With the added bonus that you
can use files or block devices if you actually want the data to be
persistent.

> IMHO this is a pure bug. Please correct me if I'm wrong, I'll plan to
> fix that by allocation separate context for each dev. 

I don't have a problem with allowing it as an option as long as the
original behavior can be preserved. But again, I think target mode is a
better bet if you actually care about what's being stored on the
"media".

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2017-03-28  1:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 17:35 scsi_debug: shared dev context, BUG or FEATURE? Dmitry Monakhov
2017-03-28  1:41 ` Martin K. Petersen [this message]
2017-03-28 10:36   ` Dmitry Monakhov

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=yq1d1d26uv6.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=dgilbert@interlog.com \
    --cc=dmonakhov@openvz.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox