stgt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add WRITE_ATOMIC_16 support
@ 2015-09-09 18:43 Ronnie Sahlberg
  2015-09-09 18:43 ` [PATCH] Add support for WRITE_ATOMIC_16 Ronnie Sahlberg
  2015-09-15  9:54 ` [PATCH] Add WRITE_ATOMIC_16 support FUJITA Tomonori
  0 siblings, 2 replies; 8+ messages in thread
From: Ronnie Sahlberg @ 2015-09-09 18:43 UTC (permalink / raw)
  To: stgt; +Cc: fujita.tomonori


Tomo, All,

Please find attached a patch that adds support for the new opcode
WRITE_ATOMIC_16 to the bs_rdwr backend.

I try to make it as atomic as possible by using mmap and mlock to ensure that
both the write buffer and the file region we are writing to will be all
present and locked down in memory before I just memcpy() the data.
At that stage it is then assumed that the memcpy() will never fail short.

The patch also adds the three new write atomic fields to the block limits
vpd page and sets some sane defaults.
Maximum amount of write atomic is set to the arbitrary limit of 16MByte
and alignment and granularity is computed based on the blocksize of the
underlying filesystem.

regards
ronnie sahlberg

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] Add WRITE_ATOMIC_16 support
@ 2015-09-10 12:58 Ronnie Sahlberg
  0 siblings, 0 replies; 8+ messages in thread
From: Ronnie Sahlberg @ 2015-09-10 12:58 UTC (permalink / raw)
  To: stgt; +Cc: fujita.tomonori


Tomo, All

Version 2 of the WRITE_ATOMIC_16 patch.

Changes since version 1:
* Use msync( MS_SYNC|MS_ASYNC) depending on whether or not FUA is set or not.

 

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] Add WRITE_ATOMIC_16 support
@ 2015-09-11  0:36 Ronnie Sahlberg
  0 siblings, 0 replies; 8+ messages in thread
From: Ronnie Sahlberg @ 2015-09-11  0:36 UTC (permalink / raw)
  To: stgt; +Cc: fujita.tomonori


Tomo, All

Version 3 of the WRITE_ATOMIC_16 patch.

Changes since version 2:
* WriteAtomic with transfer-length == 0 is actually not an error.

Changes since version 1:
* Use msync( MS_SYNC|MS_ASYNC) depending on whether or not FUA is set or not.

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

end of thread, other threads:[~2015-09-23  3:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 18:43 [PATCH] Add WRITE_ATOMIC_16 support Ronnie Sahlberg
2015-09-09 18:43 ` [PATCH] Add support for WRITE_ATOMIC_16 Ronnie Sahlberg
2015-09-09 21:00   ` ronnie sahlberg
2015-09-15  9:54 ` [PATCH] Add WRITE_ATOMIC_16 support FUJITA Tomonori
2015-09-16 19:49   ` ronnie sahlberg
2015-09-23  3:16     ` FUJITA Tomonori
2015-09-10 12:58 Ronnie Sahlberg
2015-09-11  0:36 Ronnie Sahlberg

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).