lkml.org 
[lkml]   [2008]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectShould a block device enforce block atomicity?
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


\
 
 \ /
  Last update: 2008-06-30 08:55    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site