FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 06-24-2008, 06:59 AM
Takashi Sato
 
Default freeze feature ver 1.6

Hi Andrew and Alexander,

I have implemented the ioctls for the filesystem freeze feature
and discussed its implementation on the ML (linux-ext4, xfs,
linux-fsdevel, linux-kernel) for five months. All of the comments are
addressed in my patch-set.
Could you consider merging it into Linux?

The filesystem freeze feature can suspend accesses to the filesystem
keeping the filesystem's consistency. We can take the consistent backup
with it cooperating with the backup software.

The patches are re-based from linux-2.6.26-rc3 to linux-2.6.26-rc7
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
I have modified to set the suitable error number (EOPNOTSUPP)
in case the filesystem doesn't support the 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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-24-2008, 09:38 PM
Andrew Morton
 
Default freeze feature ver 1.6

On Tue, 24 Jun 2008 15:59:19 +0900
Takashi Sato <t-sato@yk.jp.nec.com> wrote:

> Hi Andrew and Alexander,
>
> I have implemented the ioctls for the filesystem freeze feature
> and discussed its implementation on the ML (linux-ext4, xfs,
> linux-fsdevel, linux-kernel) for five months. All of the comments are
> addressed in my patch-set.
> Could you consider merging it into Linux?
>
> The filesystem freeze feature can suspend accesses to the filesystem
> keeping the filesystem's consistency. We can take the consistent backup
> with it cooperating with the backup software.
>
> The patches are re-based from linux-2.6.26-rc3 to linux-2.6.26-rc7
> 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
> I have modified to set the suitable error number (EOPNOTSUPP)
> in case the filesystem doesn't support the 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.

umm, OK, but nowhere in this patch series can I find a justification or
reason for making these changes to Linux. Why do we want to do this?
What is the benefit? What is the motivation. What are the use-cases,
etc?

Thanks.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-25-2008, 06:36 AM
"Takashi Sato"
 
Default freeze feature ver 1.6

Hi,


umm, OK, but nowhere in this patch series can I find a justification or
reason for making these changes to Linux. Why do we want to do this?
What is the benefit? What is the motivation. What are the use-cases,
etc?


Currently, ext3 in mainline Linux doesn't have the freeze feature which
suspends write requests. So, we cannot take a backup which keeps
the filesystem's consistency with the storage device's features
(snapshot and replication) while it is mounted.
In many case, a commercial filesystem (e.g. VxFS) has
the freeze feature and it would be used to get the consistent backup.
If Linux's standard filesytem ext3 has the freeze feature, we can do it
without a commercial filesystem.

So I have implemented the ioctls of the freeze feature.
I think we can take the consistent backup with the following steps.
1. Freeze the filesystem with the freeze ioctl.
2. Separate the replication volume or create the snapshot
with the storage device's feature.
3. Unfreeze the filesystem with the unfreeze ioctl.
4. Take the backup from the separated replication volume
or the snapshot.

Cheers, Takashi


On Tue, 24 Jun 2008 15:59:19 +0900
Takashi Sato <t-sato@yk.jp.nec.com> wrote:


Hi Andrew and Alexander,

I have implemented the ioctls for the filesystem freeze feature
and discussed its implementation on the ML (linux-ext4, xfs,
linux-fsdevel, linux-kernel) for five months. All of the comments are
addressed in my patch-set.
Could you consider merging it into Linux?

The filesystem freeze feature can suspend accesses to the filesystem
keeping the filesystem's consistency. We can take the consistent backup
with it cooperating with the backup software.

The patches are re-based from linux-2.6.26-rc3 to linux-2.6.26-rc7
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
I have modified to set the suitable error number (EOPNOTSUPP)
in case the filesystem doesn't support the 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.


umm, OK, but nowhere in this patch series can I find a justification or
reason for making these changes to Linux. Why do we want to do this?
What is the benefit? What is the motivation. What are the use-cases,

etc?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-25-2008, 09:45 PM
"Larry Dickson"
 
Default freeze feature ver 1.6

Hi all,
*
I just signed up for dm-devel, so I don't know if this will get posted; but it looks like this freeze feature may answer a need of mine. Could one of you tell me if I'm on the right track?
*
Over an LVM volume is mounted a file system that gets a lot of streaming writes, and has been set up so that almost all access is sequential, with data coming out of big FIFO caches. But readers may want access to the existing files. If too many readers try to access, it will cause lots of seeks and slow down the write access enough to cause data loss, which is not OK. I can*see this coming*by noticing that the FIFOs are filling up.

*
What I need is to freeze read access when this happens, but permit write access to continue. Then the seeks stop happening, and the FIFOs drain. After they have reached a certain point, I unfreeze read access; so the (probably NFS) readers may see slowness and jerkiness, but their stuff runs.

*
Can this freeze feature do that? I was thinking of working an XON/XOFF through the proc file system, and patching in some special code of my own, but it would be much nicer if it were more standard.
*
Larry Dickson
Cutting Edge Networked Storage
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-25-2008, 10:53 PM
Alasdair G Kergon
 
Default freeze feature ver 1.6

You could experiment adding the dm 'delay' target into your device stack,
which lets you route reads and writes down different paths - then have
separate linear targets underneath each recombining them back into
the same path, and then use the existing dmsetup suspend/resume only on the
read path.

Alasdair
--
agk@redhat.com

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 05:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org