Skip to contentSkip to conversation

Barrier support in device mapper

DISCUSSION Nikanth Karthikesan 2 participants 2 messages Sep 18, 2008 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi Milan

I was able to talk to Alasdair on Freenode#device-mapper and he is also of the opinion full-barrier support is the way to go.

Quoted 10 lines · Milan Broz

Andi's patch is not complete and I think there can be several problems with it:

- imagine DM device which has barrier support switched on by this simple patch and you try to run pvmove on it. How is the barrier request processed by underlying devices now?

-> mapping can change online (pvmove, lvextend, lvconvert, ...) to more complicated mapping - who reset barrier flag support?

I think these things will not create problems.

Quoted 7 lines

- what about stacking devices? Imagine crypto - there is one device per table possible under linear target (where you enable barriers by this patch).
dm-crypt will need to implement some queue flushes to properly support barriers. Another example - partition mapping over multipath (kpartx), ... Are you sure that is it safe with Andi's patch?
...

I do not have knowledge of dm-crypt, but yes, dm-crypt might possibly reorder. Either they should flush the queues or atleast return -EOPNOTSUPP if we need to use Andi's patch.

Quoted 4 lines

It is dangerous to use that patch IMO, better not support barriers at all here. That's why we need something more robust.

I understand the possible problems.

Quoted 1 line

Unfortunately I received _no_ feedback to mentioned RFC barrier patches.

Alasdair said that he will be reviewing/queueing them next week.

Thanks
Nikanth

#1 lore raw
Quoted 13 lines · Nikanth Karthikesan

Hi Milan

I was able to talk to Alasdair on Freenode#device-mapper and he is also of the opinion full-barrier support is the way to go.

Quoted 7 lines · Milan Broz

Andi's patch is not complete and I think there can be several problems with it:

- imagine DM device which has barrier support switched on by this simple patch and you try to run pvmove on it. How is the barrier request processed by underlying devices now?

Quoted 5 lines
Quoted 3 lines

-> mapping can change online (pvmove, lvextend, lvconvert, ...) to more complicated mapping - who reset barrier flag support?

I think these things will not create problems.

Correct.

Quoted 9 lines
Quoted 8 lines

- what about stacking devices? Imagine crypto - there is one device per table possible under linear target (where you enable barriers by this patch).
dm-crypt will need to implement some queue flushes to properly support barriers. Another example - partition mapping over multipath (kpartx), ... Are you sure that is it safe with Andi's patch?
...

Quoted 3 lines

I do not have knowledge of dm-crypt, but yes, dm-crypt might possibly reorder. Either they should flush the queues or atleast return -EOPNOTSUPP if we need to use Andi's patch.

That's already done because it doesn't call dm_table_support_barrier() on its target. Only the simple remapper does.

All the scenarios you guys are describing (except for pvmove which just seems to be confused thinking) would happen when the ->barrier_supported target flag wasn't there, but it really is.

Quoted 5 lines
Quoted 3 lines

It is dangerous to use that patch IMO, better not support barriers at all here. That's why we need something more robust.

I understand the possible problems.

Sorry, but Milan is just wrong on all of them as far as I know.

-Andi

Signature · 1 line
[email protected]