Should a block device enforce block atomicity?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Erez Zilber
Date: Sunday, June 29, 2008 - 11:51 pm

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Should a block device enforce block atomicity?, Erez Zilber, (Sun Jun 29, 11:51 pm)
Re: Should a block device enforce block atomicity?, Jens Axboe, (Sun Jun 29, 11:55 pm)
Re: Should a block device enforce block atomicity?, Erez Zilber, (Mon Jun 30, 12:58 am)
Re: Should a block device enforce block atomicity?, Boaz Harrosh, (Mon Jun 30, 1:24 am)
Re: Should a block device enforce block atomicity?, Zhao Forrest, (Mon Jun 30, 1:47 am)
Re: Should a block device enforce block atomicity?, Jens Axboe, (Mon Jun 30, 1:55 am)