* support freeze operation like xfs_freeze
@ 2007-01-25 17:28 Vitez Gabor
2007-01-25 17:59 ` coly
2007-01-25 19:40 ` Eric Sandeen
0 siblings, 2 replies; 7+ messages in thread
From: Vitez Gabor @ 2007-01-25 17:28 UTC (permalink / raw)
To: linux-ext4
Hi,
It would be really great if ext4 supported an xfs_freeze like operation.
On xfs it spared me a lot of headaches when I was playing with unstable
kernel features.
thanks
Gabor
[note: I'm not subscribed. Please Cc: me if answering]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: support freeze operation like xfs_freeze 2007-01-25 17:28 support freeze operation like xfs_freeze Vitez Gabor @ 2007-01-25 17:59 ` coly 2007-01-25 19:40 ` Eric Sandeen 1 sibling, 0 replies; 7+ messages in thread From: coly @ 2007-01-25 17:59 UTC (permalink / raw) To: Vitez Gabor; +Cc: linux-ext4 Hi, team: This is a very cool feature. Is there any planing or schedule on it ? Coly 在 2007-01-25四的 18:28 +0100,Vitez Gabor写道: > Hi, > > It would be really great if ext4 supported an xfs_freeze like operation. > On xfs it spared me a lot of headaches when I was playing with unstable > kernel features. > > thanks > Gabor > > [note: I'm not subscribed. Please Cc: me if answering] > - > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: support freeze operation like xfs_freeze 2007-01-25 17:28 support freeze operation like xfs_freeze Vitez Gabor 2007-01-25 17:59 ` coly @ 2007-01-25 19:40 ` Eric Sandeen 2007-01-26 21:22 ` Theodore Tso 1 sibling, 1 reply; 7+ messages in thread From: Eric Sandeen @ 2007-01-25 19:40 UTC (permalink / raw) To: Vitez Gabor; +Cc: linux-ext4 Vitez Gabor wrote: > Hi, > > It would be really great if ext4 supported an xfs_freeze like operation. > On xfs it spared me a lot of headaches when I was playing with unstable > kernel features. > > thanks > Gabor > Right now ext3 and ext4 -can- be frozen, but only via devicemapper, because the call to freeze_bdev is only exposed via <dm ioctl> dev_suspend do_suspend dm_suspend lock_fs freeze_bdev <-- generic, exported kernel function on an lvm volume. So, I think ext[34] are perfectly capable of being frozen, there's just no generic userspace utility to point at a generic block device to do that freezing. xfs's collection of ioctls to do this directly got grandfathered in, I guess. :) -Eric ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: support freeze operation like xfs_freeze 2007-01-25 19:40 ` Eric Sandeen @ 2007-01-26 21:22 ` Theodore Tso 2007-01-26 22:23 ` Eric Sandeen 0 siblings, 1 reply; 7+ messages in thread From: Theodore Tso @ 2007-01-26 21:22 UTC (permalink / raw) To: Eric Sandeen; +Cc: Vitez Gabor, linux-ext4 On Thu, Jan 25, 2007 at 01:40:58PM -0600, Eric Sandeen wrote: > on an lvm volume. So, I think ext[34] are perfectly capable of being > frozen, there's just no generic userspace utility to point at a generic > block device to do that freezing. xfs's collection of ioctls to do this > directly got grandfathered in, I guess. :) xfs's collection of ioctls do the right thing if the program which freezes the filesystems exits without unfreezing the filesystem (closing the file descriptor used by the freeze ioctl should unfreeze the filesystem, I hope)? And I assume that if a setuid program which freezes filesystems forgets to catch SIGTSTP, and a hostile user types ^Z at the wrong time, that's considered a buggy setuid program? :-) One of the reasons why direct exposire to the freeze routines was always considered a little dangerous, and my guess is that's why we don't have a first class VFS interface. Then again, XFS managed to get an exemption from some of the standard kernel merging rules, including allowing the IRIX compatibility layer, and I'm guessing the xfs collection of ioctls snuck in that way too. :-) - Ted ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: support freeze operation like xfs_freeze 2007-01-26 21:22 ` Theodore Tso @ 2007-01-26 22:23 ` Eric Sandeen 2007-01-27 1:10 ` Theodore Tso 0 siblings, 1 reply; 7+ messages in thread From: Eric Sandeen @ 2007-01-26 22:23 UTC (permalink / raw) To: Theodore Tso; +Cc: Vitez Gabor, linux-ext4 Theodore Tso wrote: > On Thu, Jan 25, 2007 at 01:40:58PM -0600, Eric Sandeen wrote: >> on an lvm volume. So, I think ext[34] are perfectly capable of being >> frozen, there's just no generic userspace utility to point at a generic >> block device to do that freezing. xfs's collection of ioctls to do this >> directly got grandfathered in, I guess. :) > > xfs's collection of ioctls do the right thing if the program which > freezes the filesystems exits without unfreezing the filesystem > (closing the file descriptor used by the freeze ioctl should unfreeze > the filesystem, I hope)? And I assume that if a setuid program which > freezes filesystems forgets to catch SIGTSTP, and a hostile user types > ^Z at the wrong time, that's considered a buggy setuid program? :-) xfs_freeze is actually -designed- to exit without unfreezing the filesystem, FWIW, for better or worse. And I suppose there is all sorts of mayhem that could stem from setuid programs of all stripes... I didn't mean to imply that it was better or worse, just that those xfs ioctls went in back when ioctls weren't getting quite so much scrutiny. And it provided the freeze functionality for a linux filesystem at a time when there weren't other options. Having the lvm tools do this automatically through generic layers during snapshot is absolutely a much nicer, cleaner way to go when snapshotting. > One of the reasons why direct exposire to the freeze routines was > always considered a little dangerous, and my guess is that's why we > don't have a first class VFS interface. Then again, XFS managed to > get an exemption from some of the standard kernel merging rules, > including allowing the IRIX compatibility layer, and I'm guessing the > xfs collection of ioctls snuck in that way too. :-) > > - Ted I prefer to think of it as a portability layer... :) But anyway, on a less OT-topic, it has always seemed a little weird to me that you can -only- freeze a filesystem on an lvm block device. Surely there are occasionally legitimate reasons to freeze a filesystem on an arbitrary block device, if the filesystem can support it? I don't see how direct exposure to freezing routines via LVM ioctls is any less dangerous than direct exposure to freezing routines on /dev/hda1... heck I can issue BLKROSET ioctls too, and that's arguably a lot more dangerous, because it's going to come as a big surprise to the filesystem, rather than a coordinated freeze. -Eric ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: support freeze operation like xfs_freeze 2007-01-26 22:23 ` Eric Sandeen @ 2007-01-27 1:10 ` Theodore Tso 2007-01-29 9:57 ` Vitez Gabor 0 siblings, 1 reply; 7+ messages in thread From: Theodore Tso @ 2007-01-27 1:10 UTC (permalink / raw) To: Eric Sandeen; +Cc: Vitez Gabor, linux-ext4 On Fri, Jan 26, 2007 at 04:23:22PM -0600, Eric Sandeen wrote: > xfs_freeze is actually -designed- to exit without unfreezing the > filesystem, FWIW, for better or worse. And I suppose there is all sorts > of mayhem that could stem from setuid programs of all stripes... I had a vague memory of that, but I probably supressed the horror. :-) > But anyway, on a less OT-topic, it has always seemed a little weird to > me that you can -only- freeze a filesystem on an lvm block device. > Surely there are occasionally legitimate reasons to freeze a filesystem > on an arbitrary block device, if the filesystem can support it? The issue isn't that you can only freeze a filesystem on an LVM block device; in fact, you can't. You can only take a snapshot on an LVM block device. I wish you could take snapshots on arbitrary block devices --- the EVMS1 kernel patches allowed that --- but unfortunately they were implemented in a way that the kernel community decided was too ugly to let live, or at least merge into mainline. > I don't see how direct exposure to freezing routines via LVM ioctls is > any less dangerous than direct exposure to freezing routines on > /dev/hda1... So the issue is that you *don't* have direct expusire to the freezing routines via LVM ioctl's. All you can do is request a snapshot, and the LVM ioctl's freeze the filesystems, take the snapshot and then unfreeze the filesystem. You're right that the BLKROSET ioctls are probably just as dangerous as well, and of course root can do all sorts of things like running mkfs, or dd'ing into /dev/kmem, etc. I think though the issue was that someone requested a user mode program that was accessible via a shell script, probably because XFS had that functionality, and the concern was that few people trusted system administrators to be able to handle such power responsibly. Freezing the filesystem for hour or minutes seems like a very bad idea, and that's exactly the sort of thing that I can imagine a clueless level one system administrator doing. ("I know! I'll freeze the filesystem while I backup all 30 TB of it, and then I'll unfreeze it.") The question really is what are the legimate uses of such a facility where you wouldn't be better off taking a snapshot and then doing the backup dump on the snapshot? The real issue is that we can't take snapshots on plain block devices, but that might be the better problem to solve.... - Ted ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: support freeze operation like xfs_freeze 2007-01-27 1:10 ` Theodore Tso @ 2007-01-29 9:57 ` Vitez Gabor 0 siblings, 0 replies; 7+ messages in thread From: Vitez Gabor @ 2007-01-29 9:57 UTC (permalink / raw) To: Theodore Tso; +Cc: Eric Sandeen, linux-ext4 On Fri, Jan 26, 2007 at 08:10:13PM -0500, Theodore Tso wrote: > The question really is what are the legimate uses of such a facility > where you wouldn't be better off taking a snapshot and then doing the > backup dump on the snapshot? The real issue is that we can't take > snapshots on plain block devices, but that might be the better problem > to solve.... I personnaly use xfs_freeze to get a bit of extra protection from filesystem corruption would suspend-to-disk or suspend to ram go wrong. Read-only remount is not an option because X is running, etc.. Gabor ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-01-29 9:57 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-01-25 17:28 support freeze operation like xfs_freeze Vitez Gabor 2007-01-25 17:59 ` coly 2007-01-25 19:40 ` Eric Sandeen 2007-01-26 21:22 ` Theodore Tso 2007-01-26 22:23 ` Eric Sandeen 2007-01-27 1:10 ` Theodore Tso 2007-01-29 9:57 ` Vitez Gabor
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox