[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] Does dm avoid container/member loops?



On Thu, Oct 05, 2006 at 03:42:24PM +1000, Neil Brown wrote:
>  As both dm and md  create a block device using other block
>  devices as components, and as components can be added after creation,
>  it is theoretically possible to create a loop.

Userspace LVM2 code takes steps to catch the most likely cases:
  exclusive open is required to create a PV;
  device-mapper dependencies are checked for loops when adding a PV to a VG.

The general problem is harder as you also have to track through filesystems
(losetup) etc.

>  This would probably give lockdep a major headache, but should detect
>  loops reliably, including loops involving both md and dm.

I reckon the solution involves bd_claim* preventing loops in the device
dependency tree.

Alasdair
-- 
agk redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]