Re: btrfs-progs: add arg_strtou64 break library btrfs
On Tue, May 20, 2014 at 06:15:49PM +0800, Dennis Lan (dlan) wrote: > progs # cat btrfs_mini_tst.c > /* > * gcc -o btrfs_mini_tst btrfs_mini_tst.c -lbtrfs > */ > > char btrfs_read_and_process_send_stream (); > int > main () > { > return btrfs_read_and_process_send_stream (); > } > > progs # gcc -o btrfs_mini_tst btrfs_mini_tst.c -lbtrfs > /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libbtrfs.so: > undefined reference to `arg_strtou64' > collect2: error: ld returned 1 exit status Hi, that problem was already found. A fix can be found here: http://www.spinics.net/lists/linux-btrfs/msg33434.html Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Snapper on Ubuntu
On Sun, Mar 16, 2014 at 05:58:10PM +0100, Hendrik Friedel wrote: > > Just a recommendation about the config names. At least on > > openSUSE "root" is used for /. I would suggest to use "home_root" > > for /root like the pam-snapper module does. > > thanks for the advise. > > In fact on a previous try I had -by chance- used exactly this nomenclature. > Then I restarted > > Now, can I just rename the files in /etc/snapper/configs and the entries in > /etc/sysconfig/snapper? Yes, that should work. Just make sure to kill snapperd before. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Snapper on Ubuntu
On Sat, Mar 15, 2014 at 03:05:22PM +0100, Hendrik Friedel wrote: > When I install snapper I configure it like this > snapper -c rt create-config / > snapper -c home create-config /home > snapper -c root create-config /root > snapper -c Video create-config /mnt/BTRFS/Video/ Just a recommendation about the config names. At least on openSUSE "root" is used for /. I would suggest to use "home_root" for /root like the pam-snapper module does. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
patch for ioctl.h
Hi, u64 is not known when just including btrfs/ioctl.h. I assume it should be __u64 as everywhere else in the file. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany diff --git a/ioctl.h b/ioctl.h index a589cd7..7577862 100644 --- a/ioctl.h +++ b/ioctl.h @@ -539,7 +539,7 @@ struct btrfs_ioctl_clone_range_args { struct btrfs_ioctl_search_args) #define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \ struct btrfs_ioctl_ino_lookup_args) -#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64) +#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64) #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \ struct btrfs_ioctl_space_args) #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
library version defines?
Hi, commit 46de1a6ec3dbb0db203baa6c46cb64ba9b000ea2 changed the parameters of btrfs_read_and_process_send_stream(). This breaks snapper compilation so I wonder whether we can include version defines usable for the C preprocessor. Surely it won't help in this case anymore but might in the future. Please find my proposal attached. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany diff --git a/Makefile b/Makefile index da7438e..8ee372f 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \ libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \ crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \ - extent_io.h ioctl.h ctree.h + extent_io.h ioctl.h ctree.h version.h CHECKFLAGS= -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \ -Wuninitialized -Wshadow -Wundef diff --git a/version.sh b/version.sh index b81040e..1d9fe9f 100644 --- a/version.sh +++ b/version.sh @@ -8,6 +8,10 @@ v="v0.20-rc1" +lib_major=0 +lib_minor=1 +lib_patchlevel=0 + which git &> /dev/null if [ $? == 0 -a -d .git ]; then if head=`git rev-parse --verify HEAD 2>/dev/null`; then @@ -46,7 +50,17 @@ fi echo "#ifndef __BUILD_VERSION" > .build-version.h echo "#define __BUILD_VERSION" >> .build-version.h +echo >> .build-version.h echo "#define BTRFS_BUILD_VERSION \"Btrfs $v\"" >> .build-version.h +echo >> .build-version.h +echo "#define BTRFS_LIB_MAJOR $lib_major" >> .build-version.h +echo "#define BTRFS_LIB_MINOR $lib_minor" >> .build-version.h +echo "#define BTRFS_LIB_PATCHLEVEL $lib_patchlevel" >> .build-version.h +echo >> .build-version.h +echo "#define BTRFS_LIB_VERSION ( BTRFS_LIB_MAJOR * 1 + \\" >> .build-version.h +echo "BTRFS_LIB_MINOR * 100 + \\" >> .build-version.h +echo "BTRFS_LIB_PATCHLEVEL )" >> .build-version.h +echo >> .build-version.h echo "#endif" >> .build-version.h diff -q version.h .build-version.h >& /dev/null
Re: Diff using send-receive code / RFC
On Sun, Feb 10, 2013 at 10:21:31PM +0530, nafisa mandliwala wrote: > Hello, > We're a team of 4 final year computer science students and are > working on generating a diff between file system snapshots using the > send receive code. This was just implemented in snapper. Unfortunately I was in a hurry so the code doesn't look so good. Instead of improving the code in snapper (C++) I thought about implementing it in C so that it can be included in btrfsprogs (and libbtrfs). Here is an example: # btrfs send -a -p /testsuite/.snapshots/1/snapshot /testsuite/.snapshots/2/snapshot | cat At subvol /testsuite/.snapshots/2/snapshot Comparing testsuite/.snapshots/1/snapshot and testsuite/.snapshots/2/snapshot. + /foo + /foo/bar + /foo/bar/world Attached you can find my current state. It's completely unfinished and only works from some test-cases. To get it compiled you either need some patches posted here earlier (e.g. NO_FILE_DATA) or must make minor modifications. But I would like to get feedback about this feature on the list. Kind Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany /* * Copyright (c) 2013 Arvin Schnell * * All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 021110-1307, USA. */ #define _GNU_SOURCE #include #include #include #include #include #include "btrfs/send.h" #include "btrfs/send-stream.h" #include "btrfs/rbtree.h" #include "btrfs/send-analyser.h" struct tree_root { struct rb_root rb_root; }; struct tree_node { struct rb_node rb_node; char *name; unsigned int status; struct tree_root children; }; static void tree_root_init(struct tree_root *root) { root->rb_root = RB_ROOT; } static struct tree_node *tree_node_init(const char *name) { struct tree_node *node = malloc(sizeof(struct tree_node)); node->name = strdup(name); node->status = 0; tree_root_init(&node->children); return node; } static struct tree_node *tree_find(struct tree_root *root, const char *name) { struct rb_node *rb_node = root->rb_root.rb_node; while (rb_node) { struct tree_node *data = rb_entry(rb_node, struct tree_node, rb_node); int result = strcmp(name, data->name); if (result < 0) rb_node = rb_node->rb_left; else if (result > 0) rb_node = rb_node->rb_right; else return data; } return NULL; } static int tree_insert(struct tree_root *root, struct tree_node *node) { struct rb_node **new = &(root->rb_root.rb_node); struct rb_node *parent = NULL; while (*new) { struct tree_node *this = rb_entry(*new, struct tree_node, rb_node); parent = *new; int result = strcmp(node->name, this->name); if (result < 0) new = &(*new)->rb_left; else if (result > 0) new = &(*new)->rb_right; else return 0; } rb_link_node(&node->rb_node, parent, new); rb_insert_color(&node->rb_node, &root->rb_root); return 1; } /* find node or create new one, return 1 if already existing */ static int tree_find_or_insert(struct tree_root *root, const char *name, struct tree_node **node) { struct rb_node **new = &(root->rb_root.rb_node); struct rb_node *parent = NULL; while (*new) { struct tree_node *this = rb_entry(*new, struct tree_node, rb_node); parent = *new; int result = strcmp(name, this->name); if (result < 0) new = &(*new)->rb_left; else if (result > 0) new = &(*new)->rb_right; else { *node = this; return 1; } } *node = tree_node_init(name); rb_link_node(&(*node)->rb_node, parent, new); rb_insert_color(&(*node)->rb_node, &root->rb_root); return 0; } static void tree_remove(struct tree_root *root, struct tree_node *node) { rb_erase(&node->rb_node, &root->rb_root); free(node->name); free(node); } static void tree_cut(struct tree_root *root, struct tree_node *node) { rb_erase(&node->rb_node, &root->rb_root); } static struct tree_node *tree_node_first(struct tree_root *root) { struct rb_node *rb_node = rb_first(&root->rb_root); if (!rb_node) return NULL;
[PATCH] trivial patch for btrfs-progs
Hi, please find attached a trivial patch for btrfs-progs. Likely not strictly needed but I noticed valgrind complaining about uninitialised memory in the ioctl call. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany diff --git a/cmds-send.c b/cmds-send.c index 9b47e70..aa8c5a3 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -271,6 +271,7 @@ static int do_send(struct btrfs_send *send, u64 root_id, u64 parent_root) goto out; } + memset(&io_send, 0, sizeof(io_send)); io_send.send_fd = pipefd[1]; send->send_fd = pipefd[0];
Re: [PATCH 2/3] btrfs-progs: libify some parts of btrfs-progs
On Tue, Jan 15, 2013 at 02:46:50PM +0200, Ilya Dryomov wrote: > On Mon, Jan 14, 2013 at 03:18:14PM +0100, Arvin Schnell wrote: > > > > Hi, > > > > please find attached a patch to make the new libbtrfs usable from > > C++ (at least for the parts snapper will likely need). > Why exactly do we need this in a non-header file? Oh, that's clearly a mistake. Thanks for noticing. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] btrfs-progs: libify some parts of btrfs-progs
On Mon, Jan 14, 2013 at 10:14:03AM -0800, Mark Fasheh wrote: > Hi Arvin! > > On Mon, Jan 14, 2013 at 03:18:14PM +0100, Arvin Schnell wrote: > > please find attached a patch to make the new libbtrfs usable from > > C++ (at least for the parts snapper will likely need). > > Thanks, that looks great. I'll integrate it into my stack of patches and > send it out with the next set. > > Can I put: > > Signed-off-by: Arvin Schnell > > at the bottom of the patch to indicate that started with you? Sure. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] btrfs-progs: libify some parts of btrfs-progs
Hi, please find attached a patch to make the new libbtrfs usable from C++ (at least for the parts snapper will likely need). Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany diff --git a/cmds-send.c b/cmds-send.c index 9b47e70..c51310a 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -40,6 +40,10 @@ #include "send.h" #include "send-utils.h" +#ifdef __cplusplus +extern "C" { +#endif + static int g_verbose = 0; struct btrfs_send { @@ -654,3 +658,7 @@ int cmd_send(int argc, char **argv) { return cmd_send_start(argc, argv); } + +#ifdef __cplusplus +} +#endif diff --git a/extent_io.c b/extent_io.c index ebb35b2..70ecc48 100644 --- a/extent_io.c +++ b/extent_io.c @@ -48,7 +48,7 @@ static struct extent_state *alloc_extent_state(void) return NULL; state->refs = 1; state->state = 0; - state->private = 0; + state->xprivate = 0; return state; } @@ -509,7 +509,7 @@ int set_state_private(struct extent_io_tree *tree, u64 start, u64 private) ret = -ENOENT; goto out; } - state->private = private; + state->xprivate = private; out: return ret; } @@ -530,7 +530,7 @@ int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private) ret = -ENOENT; goto out; } - *private = state->private; + *private = state->xprivate; out: return ret; } diff --git a/extent_io.h b/extent_io.h index 4553859..6d8404d 100644 --- a/extent_io.h +++ b/extent_io.h @@ -54,7 +54,7 @@ struct extent_state { u64 end; int refs; unsigned long state; - u64 private; + u64 xprivate; }; struct extent_buffer { @@ -93,8 +93,8 @@ int extent_buffer_uptodate(struct extent_buffer *eb); int set_extent_buffer_uptodate(struct extent_buffer *eb); int clear_extent_buffer_uptodate(struct extent_io_tree *tree, struct extent_buffer *eb); -int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); -int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); +int set_state_private(struct extent_io_tree *tree, u64 start, u64 xprivate); +int get_state_private(struct extent_io_tree *tree, u64 start, u64 *xprivate); struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, u64 bytenr, u32 blocksize); struct extent_buffer *find_first_extent_buffer(struct extent_io_tree *tree, diff --git a/ioctl.h b/ioctl.h index b7f1ce3..56de39f 100644 --- a/ioctl.h +++ b/ioctl.h @@ -22,6 +22,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_VOL_NAME_MAX 255 @@ -439,4 +443,9 @@ struct btrfs_ioctl_clone_range_args { struct btrfs_ioctl_qgroup_create_args) #define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \ struct btrfs_ioctl_qgroup_limit_args) + +#ifdef __cplusplus +} +#endif + #endif diff --git a/list.h b/list.h index d31090c..50f4619 100644 --- a/list.h +++ b/list.h @@ -19,8 +19,8 @@ #ifndef _LINUX_LIST_H #define _LINUX_LIST_H -#define LIST_POISON1 ((void *) 0x00100100) -#define LIST_POISON2 ((void *) 0x00200200) +#define LIST_POISON1 ((struct list_head *) 0x00100100) +#define LIST_POISON2 ((struct list_head *) 0x00200200) /* * Simple doubly linked list implementation. @@ -54,17 +54,17 @@ static inline void INIT_LIST_HEAD(struct list_head *list) * the prev/next entries already! */ #ifndef CONFIG_DEBUG_LIST -static inline void __list_add(struct list_head *new, +static inline void __list_add(struct list_head *xnew, struct list_head *prev, struct list_head *next) { - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; + next->prev = xnew; + xnew->next = next; + xnew->prev = prev; + prev->next = xnew; } #else -extern void __list_add(struct list_head *new, +extern void __list_add(struct list_head *xnew, struct list_head *prev, struct list_head *next); #endif @@ -78,12 +78,12 @@ extern void __list_add(struct list_head *new, * This is good for implementing stacks. */ #ifndef CONFIG_DEBUG_LIST -static inline void list_add(struct list_head *new, struct list_head *head) +static inline void list_add(struct list_head *xnew, struct list_head *head) { - __list_add(new, head, head->next); + __list_add(xnew, head, head->next); } #else -extern void list_add(struct list_head *new, struct list_head *head); +extern void list_add(struct list_head *xnew, struct list_head *head); #endif @@ -95,9 +95,9 @@ extern void list_add(struct list_head *new, struct list_head *head); * Insert a new entry before the specified head. * This is useful for implementing queues. */ -static inline void list_add_tail(struct list_head *new, struct list_head *head) +static inline void list_add_tail(struct list_head *xnew, struct list_head *head)
Re: Snapper snapshot comparison algorithm - send/receive questions
On Sat, Dec 01, 2012 at 01:24:20PM +0530, nafisa mandliwala wrote: > I needed help with understanding the snapshot comparison algorithm > that snapper uses and its shortcomings. From reading the code, what I > understood is that it does a block by block compare. I'm not very sure > if that's the best way to go about it. Also, since the send receive > code is still in development stages, is there a scope to add more > functionality to it? Mainly snapper does a directory traversal and a block-by-block comparison of files which is indeed a inefficient comparison algorithm. I already had a look at using the new send/receive ioctl to improve the comparison and have a few question: 1. snapper only needs to know that a file has changed but the send stream also contains the new content which might has to be read from disk. Mark Fasheh has made a patch for a flag for the send ioctl to not include the content (don't know if he posted it here since I was kicked of the list twice). With no write commands in the stream how can I detect a file content change? Currently there seems to be a truncate after the write but is that guaranteed? Btw: There are many apparently useless truncates, e.g. after a chmod. What are these good for? 2. Is it possible to add a ioctl for send that takes open file-descriptors for parent_root and clone_sources? Otherwise it's insecure to use from snapper (which has root privileges and sometimes operates in directories users can modify). Such a ioctl would also reduce the number of btrfs related functions needed. 3. Overall lots of functions are needed to use the send/receive. Are there any plans to create a btrfs-library that contains the required functions e.g. btrfs_read_and_process_send_stream, subvol_uuid_search and tree_search? Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: snapper for Ubuntu? (WAS: btrfs auto snapshot)
On Tue, Apr 10, 2012 at 09:50:32PM +0700, Fajar A. Nugraha wrote: > On Tue, Apr 10, 2012 at 9:35 PM, Matthias G. Eckermann wrote: > > On 2012-04-10 T 20:48 +0700 Fajar A. Nugraha wrote: > >> How can I create config for /data or other directories (other than > >> manually creating the config file and .snapshots directory)? > > > > This should do it: > > > > sudo snapper -c home create-config /home > > sudo snapper -c data create-config /data > > > > The reasons for the extra "-c " is that you have to > > tell snapper, which name to choose for the configuration > > you want to create. This name is the one you can reference > > in future actions such as create/modify/delete. > > Great! That works, thanks. > > Is there an oposite of create-config, i.e. delete for just one subvolume? > delete-config seems to delete everything (configs for all subvolume > and all snapshots). delete-config only deletes one config. Otherwise that is a bug. > Also, one minor detail, I noticed that the cron configuration file is > /etc/sysconfig/snapper. It should be /etc/default/snapper in > ubuntu/debian. Thanks for the hint. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Snapper packages for Ubuntu
On Tue, Apr 10, 2012 at 08:08:15PM +0700, Fajar A. Nugraha wrote: > On Tue, Apr 10, 2012 at 6:50 PM, Arvin Schnell wrote: > > libblocxx is not required for snapper anymore since about a > > month. It's checked during configure. > > You're right. I just tested it, and not having libblocxx during > compilation results in less dependencies (namely libblocxx itself, > plus libssl, libcrypto, and libpcre). > > What functionality, if any, is not available when not using libblocxx? > Since it's still used when present during configure, I assume it's > good for something. It's just used for logging. With blocxx an application linking libsnapper can use blocxx functions to control and redirect logging. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Snapper packages for Ubuntu
On Tue, Apr 10, 2012 at 05:37:38PM +0700, Fajar A. Nugraha wrote: > Hi, > > I've created snapper packages for Ubuntu, available on > https://launchpad.net/~snapper/+archive/stable. For those new to > snapper, it's a tool for managing btrfs snapshots > (http://en.opensuse.org/Portal:Snapper). It depends on libblocxx > available from https://launchpad.net/~bjoern-esser-n/+archive/blocxx , > and currently uses git source up to commit 50dec40. I've done some > limited testing and it seems to to work correctly so far. libblocxx is not required for snapper anymore since about a month. It's checked during configure. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: snapper for Ubuntu? (WAS: btrfs auto snapshot)
On Mon, Apr 09, 2012 at 08:18:45AM +0700, Fajar A. Nugraha wrote: > On Thu, Mar 1, 2012 at 8:48 PM, Arvin Schnell wrote: > > We have now created a project in the openSUSE buildservice were > > we provide snapper packages for various distributions, e.g. RHEL6 > > and Fedora 16. Please find the downloads at: > > > > http://download.opensuse.org/repositories/filesystems:/snapper/ > > > > I'll also add a link from the snapper home page: > > > > http://en.opensuse.org/Portal:Snapper. > > > > I have tested snapper on Fedora 16 and found no problems. > > Hi Arvin, > > I noticed that openSUSE buildservice now provides debs for ubuntu as > well. I can't seem to find a way to add it to apt source list though, > using the usual line > > deb uri distribution [component1] You can use these commands: echo 'deb http://download.opensuse.org/repositories/filesystems:/snapper/Debian_6.0/ /' >> /etc/apt/sources.list apt-get update apt-get install snapper Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [RFC] Add btrfs autosnap feature
On Thu, Mar 01, 2012 at 05:54:40AM -0600, cwillu wrote: > There doesn't appear to be any reason for the scratch file to exist at > all (one can build up the hash while reading the directories), and > keeping a scratch file in /etc/ is poor practice in the first place > (that's what /tmp and/or /var/run is for). It's also a lot of io to > stat every file in the subvolume every time you make a snapshot, and > I'm not convinced that the walk is actually correctly implemented: > what stops an autosnap of / from including all of /proc and /sys in > the hash? > > Perhaps all that is unnecessary: rather than doing the walk, why not > make use of btrfs subvolume find-new (or rather, the syscalls it > uses)? While developing snapper I faced similar problems and looked at find-new but unfortunately it is not sufficient. E.g. when a file is deleted find-new does not report anything, see the reply to my mail here one year ago [1]. Also for newly created empty files find-new reports nothing, the same with metadata changes. If I'm wrong or find-new gets extended I happy to implement it in snapper. Regards, Arvin [1] http://www.spinics.net/lists/linux-btrfs/msg08683.html -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] btrfs auto snapshot
On Thu, Feb 23, 2012 at 04:54:06PM +0700, Fajar A. Nugraha wrote: > On Thu, Aug 18, 2011 at 12:38 AM, Matthias G. Eckermann wrote: > > are available in the openSUSE buildservice at: > > > > http://download.opensuse.org/repositories/home:/mge1512:/snapper/ > > > > Hi Matthias, > > I'm testing your packages on top of RHEL6 + kernel 3.2.7. A small > suggestion, you should include /etc/sysconfig/snapper in the package > (at least for RHEL6, haven't tested the other ones). Even if it just > contains > > SNAPPER_CONFIGS="" Hi Fajar, thanks for reporting that issue, I have fixed it now. We have now created a project in the openSUSE buildservice were we provide snapper packages for various distributions, e.g. RHEL6 and Fedora 16. Please find the downloads at: http://download.opensuse.org/repositories/filesystems:/snapper/ I'll also add a link from the snapper home page: http://en.opensuse.org/Portal:Snapper. I have tested snapper on Fedora 16 and found no problems. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Comparing snapshots?
Hi, for a backup program I have to find all differing files (including metadata) in two snapshots taken from the same subvolume. Having looked at the find-new command I thought about this process: 1. Get the two transids when the two snapshots were created. 2. Query modifications to the original subvolume between the two transids. Is the general process corrent or have I overseen something? AFAIS the btrfs tool does not provide the required information/commands. Would it be possible to add those? Thanks in advance, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html