Skip to content

RFC freeze feature ver 1.2

Takashi Sato linux-ext4 linux-fsdevel linux-xfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Implement generic freeze featurefs/block_dev.c fs/buffer.c fs/ioctl.c +2 more+101 -14 replies
1/3Implement generic freeze featurefs/block_dev.c fs/buffer.c fs/ioctl.c +2 more+101 -10 replies
2/3Remove XFS specific ioctl interfaces for freeze featurefs/xfs/linux-2.6/xfs_ioctl.c fs/xfs/linux-2.6/xfs_ioctl32.c fs/xfs/xfs_fs.h+2 -190 replies
3/3Add timeout featuredrivers/md/dm.c fs/block_dev.c fs/buffer.c +5 more+140 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] freeze feature ver 1.2

Hi,

I have re-based my freeze patches from linux-2.6.25-rc7 to linux-2.6.25.
There is no functional change from the previous version. The patch-set consists of the following three patches.

[PATCH 1/3] Implement generic freeze feature
The ioctls for the generic freeze feature are below.
o Freeze the filesystem
int ioctl(int fd, int FIFREEZE, arg)
fd: The file descriptor of the mountpoint
FIFREEZE: request code for the freeze
arg: Ignored
Return value: 0 if the operation succeeds. Otherwise, -1

o Unfreeze the filesystem
int ioctl(int fd, int FITHAW, arg)
fd: The file descriptor of the mountpoint
FITHAW: request code for unfreeze
arg: Ignored
Return value: 0 if the operation succeeds. Otherwise, -1

[PATCH 2/3] Remove XFS specific ioctl interfaces for freeze feature
It removes XFS specific ioctl interfaces and request codes for freeze feature.
This patch has been supplied by David Chinner.

[PATCH 3/3] Add timeout feature
The timeout feature is added to freeze ioctl. And new ioctl to reset the timeout period is added.
o Freeze the filesystem
int ioctl(int fd, int FIFREEZE, long *timeval)
fd: The file descriptor of the mountpoint
FIFREEZE: request code for the freeze
timeval: the timeout period in seconds
If it's 0 or 1, the timeout isn't set. This special case of "1" is implemented to keep the compatibility with XFS applications.
Return value: 0 if the operation succeeds. Otherwise, -1

o Reset the timeout period
This is useful for the application to set the timeval more accurately. For example, the freezer resets the timeval to 10 seconds every 5 seconds. In this approach, even if the freezer causes a deadlock by accessing the frozen filesystem, it will be solved by the timeout in 10 seconds and the freezer can recognize that at the next reset of timeval.
int ioctl(int fd, int FIFREEZE_RESET_TIMEOUT, long *timeval)
fd:file descriptor of mountpoint
FIFREEZE_RESET_TIMEOUT: request code for reset of timeout period
timeval: new timeout period in seconds
Return value: 0 if the operation succeeds. Otherwise, -1 Error number: If the filesystem has already been unfrozen,
errno is set to EINVAL.

Any comments are very welcome.

Cheers, Takashi