linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nvmf question - synchronization between target/initiator regarding partitions
@ 2017-08-07 13:42 Guilherme G. Piccoli
  2017-08-07 14:20 ` Hannes Reinecke
  0 siblings, 1 reply; 5+ messages in thread
From: Guilherme G. Piccoli @ 2017-08-07 13:42 UTC (permalink / raw)
  To: linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org,
	linux-block
  Cc: Mauricio pIO, Brian J King, Murali N Iyer, vnarasimhan, gpiccoli

We observed that it's possible to perform partition operations in both
nvmf target and initiator block devices, like creating and deleting
partitions.

But there is no sync mechanism between target and initiator regarding
the partitions operations. After creating a partition on initiator, for
example, we don't see it on target side. We could format it like ext4 on
initiator, and still target cannot see it. It's possible to trigger a
BLKRRPART ioctl on target, which end up calling revalidate_disk() on
nvme driver and then partitions are perceived.

So, question: is this behavior expected/acceptable? Is it completely up
to userspace to deal with the synchronization between host/target?
I think answer might be yes since partitions are a higher level of
abstraction than nvmf (which is purely block device aware).

But if kernel could/should jump in, we possibly could try to issue a
revalidate_disk on target whenever this operation is performed on
initiator side (and vice-versa). I confess I couldn't find such sync
idea in NVMe over fabrics spec, though.
Also, reading NVMe spec 1.3, we do have the optional feature
"reservations", but seems it doesn't mention target (only multiple hosts).

Thanks in advance for any ideas on this subject.
Cheers,



Guilherme

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvmf question - synchronization between target/initiator regarding partitions
  2017-08-07 13:42 nvmf question - synchronization between target/initiator regarding partitions Guilherme G. Piccoli
@ 2017-08-07 14:20 ` Hannes Reinecke
  2017-08-07 17:29   ` Guilherme G. Piccoli
  0 siblings, 1 reply; 5+ messages in thread
From: Hannes Reinecke @ 2017-08-07 14:20 UTC (permalink / raw)
  To: Guilherme G. Piccoli, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, linux-block
  Cc: vnarasimhan, Mauricio pIO, Brian J King, Murali N Iyer

T24gMDgvMDcvMjAxNyAwMzo0MiBQTSwgR3VpbG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mcgTlZNZSBzcGVjIDEuMywgd2UgZG8g
aGF2ZSB0aGUgb3B0aW9uYWwgZmVhdHVyZQo+ICJyZXNlcnZhdGlvbnMiLCBidXQgc2VlbXMgaXQg
ZG9lc24ndCBtZW50aW9uIHRhcmdldCAob25seSBtdWx0aXBsZSBob3N0cykuCj4gClNlZSBhYm92
ZS4KTmV2ZXIgdHJ5IHRoaXMgOi0pCgpDaGVlcnMsCgpIYW5uZXMKLS0gCkRyLiBIYW5uZXMgUmVp
bmVja2UJCSAgIFRlYW1sZWFkIFN0b3JhZ2UgJiBOZXR3b3JraW5nCmhhcmVAc3VzZS5kZQkJCSAg
ICAgICAgICAgICAgICs0OSA5MTEgNzQwNTMgNjg4ClNVU0UgTElOVVggR21iSCwgTWF4ZmVsZHN0
ci4gNSwgOTA0MDkgTsO8cm5iZXJnCkdGOiBGLiBJbWVuZMO2cmZmZXIsIEouIFNtaXRoYXJkLCBK
LiBHdWlsZCwgRC4gVXBtYW55dSwgRy4gTm9ydG9uCkhSQiAyMTI4NCAoQUcgTsO8cm5iZXJnKQoK
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTGludXgtbnZt
ZSBtYWlsaW5nIGxpc3QKTGludXgtbnZtZUBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6Ly9saXN0
cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtbnZtZQo=

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvmf question - synchronization between target/initiator regarding partitions
  2017-08-07 14:20 ` Hannes Reinecke
@ 2017-08-07 17:29   ` Guilherme G. Piccoli
  2017-08-10  9:16     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Guilherme G. Piccoli @ 2017-08-07 17:29 UTC (permalink / raw)
  To: Hannes Reinecke, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, linux-block
  Cc: Mauricio pIO, Brian J King, Murali N Iyer, vnarasimhan

Thanks for your feedback Hannes, agreed!

Cheers,


Guilherme

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvmf question - synchronization between target/initiator regarding partitions
  2017-08-07 17:29   ` Guilherme G. Piccoli
@ 2017-08-10  9:16     ` Christoph Hellwig
  2017-08-10 12:37       ` Guilherme G. Piccoli
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-08-10  9:16 UTC (permalink / raw)
  To: Guilherme G. Piccoli
  Cc: Hannes Reinecke, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, linux-block, vnarasimhan,
	Mauricio pIO, Brian J King, Murali N Iyer

On Mon, Aug 07, 2017 at 02:29:47PM -0300, Guilherme G. Piccoli wrote:
> Thanks for your feedback Hannes, agreed!

And btw, you'll see similar results with the SCSI target or nbd,
so it's not really nvme specific.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvmf question - synchronization between target/initiator regarding partitions
  2017-08-10  9:16     ` Christoph Hellwig
@ 2017-08-10 12:37       ` Guilherme G. Piccoli
  0 siblings, 0 replies; 5+ messages in thread
From: Guilherme G. Piccoli @ 2017-08-10 12:37 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: vnarasimhan, Brian J King, linux-scsi@vger.kernel.org,
	linux-nvme@lists.infradead.org, linux-block, Murali N Iyer,
	Mauricio pIO, Hannes Reinecke

On 08/10/2017 06:16 AM, Christoph Hellwig wrote:
> On Mon, Aug 07, 2017 at 02:29:47PM -0300, Guilherme G. Piccoli wrote:
>> Thanks for your feedback Hannes, agreed!
> 
> And btw, you'll see similar results with the SCSI target or nbd,
> so it's not really nvme specific.

Thanks, I agree - noticed the same stuff. I've used nvmf as a "trigger"
to the subject, in order to discuss a possible generic solution. But
since everything is working as expected, no need to pursue a "fix" heheh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-10 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 13:42 nvmf question - synchronization between target/initiator regarding partitions Guilherme G. Piccoli
2017-08-07 14:20 ` Hannes Reinecke
2017-08-07 17:29   ` Guilherme G. Piccoli
2017-08-10  9:16     ` Christoph Hellwig
2017-08-10 12:37       ` Guilherme G. Piccoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).