Mikolaj Golub a818a4ff09 When updating the map of dirty extents, most recently used extents are
kept dirty to reduce the number of on-disk metadata updates. The
sequence of operations is:

1) acquire the activemap lock;
2) update in-memory map;
3) if the list of keepdirty extents is changed, update on-disk metadata;
4) release the lock.

On-disk updates are not frequent in comparison with in-memory updates,
while require much more time. So situations are possible when one
thread is updating on-disk metadata and another one is waiting for the
activemap lock just to update the in-memory map.

Improve this by introducing additional, on-disk map lock: when
in-memory map is updated and it is detected that the on-disk map needs
update too, the on-disk map lock is acquired and the on-memory lock is
released before flushing the map.

Reported by:	Yamagi Burmeister yamagi.org
Tested by:	Yamagi Burmeister yamagi.org
Reviewed by:	pjd
Approved by:	re (marius)
MFC after:	2 weeks
2013-09-19 20:19:08 +00:00
..
2012-01-07 16:09:33 +00:00
2012-01-07 16:09:33 +00:00
2013-06-30 17:59:40 +00:00
2012-01-07 16:09:33 +00:00
2012-03-23 20:18:48 +00:00
2012-07-01 16:26:07 +00:00
2012-02-11 16:41:52 +00:00
2013-06-29 20:13:39 +00:00
2012-01-06 12:27:17 +00:00
2012-06-11 20:27:52 +00:00