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

Re: [dm-devel] racing libdevmapper calls



Neither libdevmapper nor dmsetup does any locking.

It's easy to make the case for dmsetup to include locking - but
dmsetup is only meant as a diagnostic tool so it's hardly an 
important feature to add.

DM_DEVICE_CREATE with a table supplied is *not* an atomic
operation.  It only exists to provide backwards-compatibility for
the original version of the ioctls (when it *was* atomic).  It's 
perfectly OK still to use it when convenient, but you have to 
remember it's actually performing *two* ioctls:

  DM_DEV_CREATE
  DM_TABLE_LOAD

If you need finer-level control, you may be better off calling
those two separately i.e. DM_DEVICE_CREATE without a table 
(if the device doesn't already exist) then DM_DEVICE_RELOAD.

Alasdair
-- 
agk redhat com


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