linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Should a block device enforce block atomicity?
@ 2008-06-30  6:51 Erez Zilber
  2008-06-30  6:55 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Erez Zilber @ 2008-06-30  6:51 UTC (permalink / raw)
  To: linux-scsi, linux-kernel

Hi,

I have a question about block devices and whether they are required to
enforce block atomicity:

I read the code of drivers/block/brd.c, and I didn't see any locking
when blocks are read/written. I also looked at the block layer code
that calls brd and didn't find any locking there. Does it mean that
there's no block atomicity (i.e. multiple threads can write a single
block at the same time)? Is there any hidden assumption here? Is this
the responsibility of the application to do that (e.g. not start a
WRITE request before other READ/WRITE requests to the same block were
completed)?

Thanks,
Erez

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

end of thread, other threads:[~2008-06-30  8:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-30  6:51 Should a block device enforce block atomicity? Erez Zilber
2008-06-30  6:55 ` Jens Axboe
2008-06-30  7:58   ` Erez Zilber
2008-06-30  8:24     ` Boaz Harrosh
2008-06-30  8:47       ` Zhao Forrest
2008-06-30  8:55         ` Jens Axboe

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