btrfs: Free correct pointer after using strsep

2010-08-30 Thread Tero Roponen
We must save and free the original kstrdup()'ed pointer because strsep() modifies its first argument. Signed-off-by: Tero Roponen tero.ropo...@gmail.com diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 1776dbd..9e2c9ec 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -260,7 +260,7

Re: remote mirroring in the works?

2010-08-30 Thread Fred van Zwieten
Hi there, I would like to know if there is something functionally equivalent to NetApp's SnapMirror in the works or planning? It would require block level access to a snap and the ability to rebuild (subvolumes including it's) snap's on another machine. If not, what would be the best way to

Re: remote mirroring in the works?

2010-08-30 Thread Bryan Whitehead
LVM Snapshot. lvm -s -n SnapShotName /dev/VolumeGroup/SourceLogicalVolumeName you may need to pass -l or -L to give an initial size for the COW. (as for rebuilding on another machine, that would require shared storage or additional LVM tricks to export/import - or good old fashioned dd) that

Re: remote mirroring in the works?

2010-08-30 Thread Roy Sigurd Karlsbakk
- Original Message - Hi there, I would like to know if there is something functionally equivalent to NetApp's SnapMirror in the works or planning? It would require block level access to a snap and the ability to rebuild (subvolumes including it's) snap's on another machine. If

Re: remote mirroring in the works?

2010-08-30 Thread K. Richard Pixley
On 20100830 10:07, Fred van Zwieten wrote: Hi there, I would like to know if there is something functionally equivalent to NetApp's SnapMirror in the works or planning? It would require block level access to a snap and the ability to rebuild (subvolumes including it's) snap's on another

Re: remote mirroring in the works?

2010-08-30 Thread Roy Sigurd Karlsbakk
I think drbd does precisely what you want. It's not useful for fault tolerance, nor for load balancing, but it will produce a remote block copy that can be used as a sort of hot backup. drbd with heartbeat/pacemaker can provide fault tolerance... Vennlige hilsener / Best regards roy --

Re: remote mirroring in the works?

2010-08-30 Thread K. Richard Pixley
On 20100830 10:59, Roy Sigurd Karlsbakk wrote: I think drbd does precisely what you want. It's not useful for fault tolerance, nor for load balancing, but it will produce a remote block copy that can be used as a sort of hot backup. drbd with heartbeat/pacemaker can provide fault tolerance

Re: remote mirroring in the works?

2010-08-30 Thread Fred van Zwieten
level. Fred On Mon, Aug 30, 2010 at 7:55 PM, K. Richard Pixley r...@noir.com wrote:  On 20100830 10:07, Fred van Zwieten wrote: Hi there, I would like to know if there is something functionally equivalent to NetApp's SnapMirror in the works or planning? It would require block level access

Re: remote mirroring in the works?

2010-08-30 Thread Freddie Cash
On Mon, Aug 30, 2010 at 2:15 PM, Fred van Zwieten fvzwie...@gmail.com wrote: I just glanced over the DRBD/LVM combi, but I don't see it being functionally equal to SnapMirror. Let me (try to) explain how snapmirror works: On system A there is a volume (vol1). We let this vol1(A) replicate

[PATCH V4 1/8] Cleancache: Documentation

2010-08-30 Thread Dan Magenheimer
[PATCH V4 1/8] Cleancache: Documentation Add cleancache documentation to Documentation/vm and sysfs ABI documentation to Documentation/ABI Signed-off-by: Dan Magenheimer dan.magenhei...@oracle.com Diffstat: ABI/testing/sysfs-kernel-mm-cleancache | 11 vm/cleancache.txt

[PATCH V4 0/8] Cleancache: overview

2010-08-30 Thread Dan Magenheimer
[PATCH V4 0/8] Cleancache: overview Changes from V3 to V4: - Rebased to 2.6.36-rc3 - Use exportfs/filehandle for unique file identification on next-gen FS's (Many thanks to Andreas Dilger for guidance on the new exportfs interface!) See get_key and struct cleancache_filekey in cleancache.[ch]

[PATCH V4 2/8] Cleancache: cleancache_poolid in superblock

2010-08-30 Thread Dan Magenheimer
[PATCH V4 2/8] Cleancache: cleancache_poolid in superblock Add cleancache_poolid to superblock structure... not tied to CONFIG_CLEANCACHE so as to avoid unnecessary clutter. Signed-off-by: Dan Magenheimer dan.magenhei...@oracle.com Diffstat: fs.h |5

[PATCH V4 4/8] Cleancache: VFS hooks for cleancache

2010-08-30 Thread Dan Magenheimer
[PATCH V4 4/8] Cleancache: VFS hooks for cleancache Implement core hooks in VFS for: initializing cleancache per filesystem; capturing clean pages evicted by page cache; attempting to get pages from cleancache before filesystem read; and ensuring coherency between pagecache, disk, and cleancache.

[PATCH V4 3/8] Cleancache: core ops functions and configuration

2010-08-30 Thread Dan Magenheimer
[PATCH V4 3/8] Cleancache: core ops functions and configuration Cleancache core ops functions and configuration Credits: Cleancache_ops design derived from Jeremy Fitzhardinge design for tmem; sysfs code modelled after mm/ksm.c Note that CONFIG_CLEANCACHE defaults to on; all hooks devolve to a

[PATCH V4 5/8] Cleancache: ext3 hook for cleancache

2010-08-30 Thread Dan Magenheimer
[PATCH V4 5/8] Cleancache: ext3 hook for cleancache Filesystems must explicitly enable cleancache by calling cleancache_init_fs anytime a instance of the filesystem is mounted and must save the returned poolid. For ext3, all other cleancache hooks are in the VFS layer including the matching

[PATCH V4 6/8] Cleancache: btrfs hooks for cleancache

2010-08-30 Thread Dan Magenheimer
[PATCH V4 6/8] Cleancache: btrfs hooks for cleancache Filesystems must explicitly enable cleancache by calling cleancache_init_fs anytime a instance of the filesystem is mounted and must save the returned poolid. Btrfs uses its own readpage which must be hooked, but all other cleancache hooks

[PATCH V4 7/8] Cleancache: ext4 hook for cleancache

2010-08-30 Thread Dan Magenheimer
[PATCH V4 7/8] Cleancache: ext4 hook for cleancache Filesystems must explicitly enable cleancache by calling cleancache_init_fs anytime a instance of the filesystem is mounted and must save the returned poolid. For ext4, all other cleancache hooks are in the VFS layer including the matching

Re: [PATCH V4 3/8] Cleancache: core ops functions and configuration

2010-08-30 Thread Jeremy Fitzhardinge
On 08/30/2010 03:31 PM, Dan Magenheimer wrote: [PATCH V4 3/8] Cleancache: core ops functions and configuration Cleancache core ops functions and configuration Credits: Cleancache_ops design derived from Jeremy Fitzhardinge design for tmem; sysfs code modelled after mm/ksm.c Note that

Re: [PATCH V4 4/8] Cleancache: VFS hooks for cleancache

2010-08-30 Thread Jeremy Fitzhardinge
On 08/30/2010 03:32 PM, Dan Magenheimer wrote: [PATCH V4 4/8] Cleancache: VFS hooks for cleancache Implement core hooks in VFS for: initializing cleancache per filesystem; capturing clean pages evicted by page cache; attempting to get pages from cleancache before filesystem read; and

Re: [PATCH V4 5/8] Cleancache: ext3 hook for cleancache

2010-08-30 Thread Jeremy Fitzhardinge
On 08/30/2010 03:32 PM, Dan Magenheimer wrote: [PATCH V4 5/8] Cleancache: ext3 hook for cleancache Filesystems must explicitly enable cleancache by calling cleancache_init_fs anytime a instance of the filesystem is mounted and must save the returned poolid. For ext3, all other cleancache

Re: remote mirroring in the works?

2010-08-30 Thread K. Richard Pixley
to online the DB on system B on any of the snap's, or, even cooler, to replicate one of those snap's back to system A, doing a block based rollback at the filesystem level. Fred On Mon, Aug 30, 2010 at 7:55 PM, K. Richard Pixleyr...@noir.com wrote: On 20100830 10:07, Fred van Zwieten wrote: Hi

RE: [PATCH V4 3/8] Cleancache: core ops functions and configuration

2010-08-30 Thread Dan Magenheimer
+#ifdef CONFIG_CLEANCACHE +#define cleancache_enabled (cleancache_ops.init_fs) Pointers can be used in a boolean context, but it would probably be cleaner to have this evaluate to a proper boolean type. Also I'd probably go with an all-caps macro name rather than making it look like a

RE: [PATCH V4 4/8] Cleancache: VFS hooks for cleancache

2010-08-30 Thread Dan Magenheimer
+ if (s-cleancache_poolid = 0) { + int cleancache_poolid = s-cleancache_poolid; That's a lot of characters for a local in a 3-line scope. :-) OK. + s-cleancache_poolid = -1; /* avoid races */ Races with what? Something else sneaking

RE: [PATCH V4 5/8] Cleancache: ext3 hook for cleancache

2010-08-30 Thread Dan Magenheimer
@@ -1349,6 +1350,7 @@ static int ext3_setup_super(struct super } else { ext3_msg(sb, KERN_INFO, using internal journal); } + sb-cleancache_poolid = cleancache_init_fs(PAGE_SIZE); Do you really need to pass in the page size? What about just

Re: remote mirroring in the works?

2010-08-30 Thread Fred van Zwieten
rollback at the filesystem level. Fred On Mon, Aug 30, 2010 at 7:55 PM, K. Richard Pixleyr...@noir.com  wrote:  On 20100830 10:07, Fred van Zwieten wrote: Hi there, I would like to know if there is something functionally equivalent to NetApp's SnapMirror in the works or planning? It would