[PATCH] dm: noflush resizing (0/3)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: device-mapper development <dm-devel@...>
Cc: <linux-kernel@...>
Date: Wednesday, October 24, 2007 - 5:25 pm

Hi,

Currently, there is a restriction on resizing device-mapper device:
it cannot be resized if 'noflush' option is given for suspend.

Since both multipath-tools (dm-multipath) and LVM2 mirror use
'noflush' suspend, the restriction limits the capability of
those tools.

The following patches remove the restriction.
  [PATCH] (1/3) Add bdlookup()
  [PATCH] (2/3) Use bdlookup() on noflush suspend
  [PATCH] (3/3) Allow resizing table load on noflush suspend

The patches were tested on i686 and ia64 with LVM2,
for both 'noflush' case and normal case.

Background:

  - For some device-mapper targets (multipath and mirror),
    the mapping table sometimes has to be replaced to cope with device
    failure.
    OTOH, device-mapper flushes all pending I/Os upon table replacement
    and may result in I/O errors, if there are device failures.
    'noflush' suspend is used to let dm queue the pending I/Os
    instead of flushing them.
    Since it's not possible for user space program to tell whether
    the suspend could cause I/O error, they always use
    'noflush' to suspend mirror/multipath targets.

  - Currently resizing is disabled for 'noflush' suspend.
    Resizing occurs in the course of table replacement.
    To resize the device under use, device-mapper needs to get its
    bdev inode. However, using bdget() in this case could cause deadlock
    by waiting for I_LOCK where an I/O process holding I_LOCK is
    waiting for completion of table replacement.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] dm: noflush resizing (0/3), Jun'ichi Nomura, (Wed Oct 24, 5:25 pm)
Re: [dm-devel] [PATCH] dm: noflush resizing (0/3), Alasdair G Kergon, (Wed Oct 24, 9:24 pm)
Re: [dm-devel] [PATCH] dm: noflush resizing (0/3), Jun'ichi Nomura, (Thu Oct 25, 10:18 am)
Re: [dm-devel] [PATCH] dm: noflush resizing (0/3), Alasdair G Kergon, (Thu Oct 25, 10:48 am)
Re: [dm-devel] [PATCH] dm: noflush resizing (0/3), Jun'ichi Nomura, (Thu Oct 25, 2:46 pm)
Re: [dm-devel] [PATCH] dm: noflush resizing (0/3), Alasdair G Kergon, (Thu Oct 25, 8:37 pm)
Re: [dm-devel] [PATCH] dm: noflush resizing (0/3), Jun'ichi Nomura, (Thu Oct 25, 7:51 pm)