* Newbie: multiple initiator contention resolution?
@ 2004-04-01 18:48 Daniel Patton
2004-04-01 20:58 ` Steven Dake
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Patton @ 2004-04-01 18:48 UTC (permalink / raw)
To: linux-scsi
Hello all,
I'm an undergraduate at a UK university, and I'm very much a newbie to
kernel development, so my apologies in advance if my questions sound
daft or have been answered before, etc.
I'm doing a project on something which involves writing a LLD for a
"fake" disk, similar to scsi_debug. However, the LLD may loaded on
multiple hosts, and they all see the same fake disk. Does the sd driver
have any kind of built-in contention resolution mechanism for such
multiple initiator setups? That is, if I mount a partition on my fake
disk simultaneously on more than one host, how do I stop the filesystem
from getting corrupted?
Many thanks in advance.
Dan Patton
djp101@ecs.soton.ac.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie: multiple initiator contention resolution?
2004-04-01 18:48 Newbie: multiple initiator contention resolution? Daniel Patton
@ 2004-04-01 20:58 ` Steven Dake
2004-04-02 20:00 ` Daniel Patton
0 siblings, 1 reply; 4+ messages in thread
From: Steven Dake @ 2004-04-01 20:58 UTC (permalink / raw)
To: Daniel Patton; +Cc: linux-scsi
On Thu, 2004-04-01 at 11:48, Daniel Patton wrote:
> Hello all,
>
> I'm an undergraduate at a UK university, and I'm very much a newbie to
> kernel development, so my apologies in advance if my questions sound
> daft or have been answered before, etc.
>
> I'm doing a project on something which involves writing a LLD for a
> "fake" disk, similar to scsi_debug. However, the LLD may loaded on
> multiple hosts, and they all see the same fake disk. Does the sd driver
> have any kind of built-in contention resolution mechanism for such
> multiple initiator setups? That is, if I mount a partition on my fake
> disk simultaneously on more than one host, how do I stop the filesystem
> from getting corrupted?
>
You have to use some form of external locking mechanism, most often.
Most filesystems do not support such a thing. Check out opengfs (use
google) for an example of one that does.
> Many thanks in advance.
>
> Dan Patton
> djp101@ecs.soton.ac.uk
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie: multiple initiator contention resolution?
2004-04-01 20:58 ` Steven Dake
@ 2004-04-02 20:00 ` Daniel Patton
2004-04-03 0:05 ` Bryan Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Patton @ 2004-04-02 20:00 UTC (permalink / raw)
To: linux-scsi; +Cc: sdake
Steven Dake wrote:
> You have to use some form of external locking mechanism, most often.
> Most filesystems do not support such a thing. Check out opengfs (use
> google) for an example of one that does.
>
Many thanks, I will look into this. I don't understand why SCSI
RESERVE/RELEASE can't be used as the locking mechanism though. Call me
stupid, but I'm only a student.
As an aside, can you (or anyone) see even the *vaguest* possible use for
my project? It basically allows you to construct a "virtual" switching
fabric with an arbitrary topology, attach a few fake disks to it, then
load an LLD on various hosts and they all see all the fake disks.
Dan Patton
djp101@ecs.soton.ac.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie: multiple initiator contention resolution?
2004-04-02 20:00 ` Daniel Patton
@ 2004-04-03 0:05 ` Bryan Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Bryan Henderson @ 2004-04-03 0:05 UTC (permalink / raw)
To: Daniel Patton; +Cc: linux-scsi, sdake
>Steven Dake wrote:
>
> You have to use some form of external locking mechanism, most often.
>> Most filesystems do not support such a thing. Check out opengfs (use
>> google) for an example of one that does.
>>
>
Daniel Patton:
>Many thanks, I will look into this. I don't understand why SCSI
>RESERVE/RELEASE can't be used as the locking mechanism though. Call me
>stupid, but I'm only a student.
You _can_ use SCSI RESERVE/RELEASE for the locking. The locking doesn't
have to be external to the SCSI channel -- it has to be external to the
device driver. The reason is that every filesystem driver I know caches
information from the disk -- above the device driver.
So the filesystem drivers on the various accessing systems would have to
use a locking mechanism (possibly with a lock based on SCSI
RESERVE/RELEASE) to communicate amongst themselves and coordinate their
caches.
There's also the matter of multi-write updates that have to be atomic.
That's a problem naturally solved with SCSI RESERVE/RELEASE, but it still
has to be handled external to the device driver.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-03 0:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-01 18:48 Newbie: multiple initiator contention resolution? Daniel Patton
2004-04-01 20:58 ` Steven Dake
2004-04-02 20:00 ` Daniel Patton
2004-04-03 0:05 ` Bryan Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox