If the freezer accesses the frozen filesystem and causes a deadlock,
the above ideas can't solve it. The timeout is useful to solve such a deadlock.
If you don't need the timeout, you can disable it by specifying "0" as the
timeout period.
[...]
I think C is appropriate and the following change makes it possible.
How do you think?
1. Add the new bit flag(BD_FREEZE_DM) in block_device.bd_state.
It means that the volume is frozen by the device-mapper.
2. Operate and check this bit flag as followings.
- Bit operations in the device-mapper's freeze/thaw
FREEZE:
dm_suspend(): set BD_FREEZE_DM
freeze_bdev():set BD_FREEZE_OP
THAW:
thaw_bdev(): clear BD_FREEZE_OP
dm_resume(): clear BD_FREEZE_DM
- Checks in FIFREEZE/FITHAW
FREEZE:
ioctl_freeze(): Not need to check BD_FREEZE_DM
freeze_bdev():set BD_FREEZE_OP
THAW:
ioctl_thaw(): If BD_FREEZE_DM is set, fail, otherwise, call thaw_bdev()
thaw_bdev(): clear BD_FREEZE_OP
Cheers, Takashi
--