Re: [PATCH 0/4] btrfs-progs: better support for external users of send, V2

2013-01-16 Thread Arne Jansen
Hi Mark, On 16.01.2013 23:30, Mark Fasheh wrote: > Hi, > > The following 4 patches make changes to btrfs-progs in order to > provide support for external software that wants to make use of the > excellent btrfs send ioctl. > > The first patch introduces support for the BTRFS_SEND_FLAG_NO_F

[PATCH V2 2/2] Btrfs: make raid attr array more readable

2013-01-16 Thread Miao Xie
The current code of raid attr arry is hard to understand and it is easy to introduce some problem if we modify the array. So I changed it and made it more readable. Cc: Liu Bo Signed-off-by: Miao Xie --- Changelog v1 -> v2: - fix missing initialization for single profile --- fs/btrfs/ctree.h

Re: [PATCH 05/11] Btrfs: protect fs_info->alloc_start

2013-01-16 Thread Miao Xie
On wed, 16 Jan 2013 13:43:00 +0100, David Sterba wrote: > On Mon, Jan 14, 2013 at 04:04:59PM +0800, Miao Xie wrote: >> On Thu, 10 Jan 2013 18:10:40 +0100, David Sterba wrote: >>> On Thu, Jan 10, 2013 at 08:48:00PM +0800, Miao Xie wrote: fs_info->alloc_start was not protected strictly, it might

[PATCH 0/4] btrfs-progs: better support for external users of send, V2

2013-01-16 Thread Mark Fasheh
Hi, The following 4 patches make changes to btrfs-progs in order to provide support for external software that wants to make use of the excellent btrfs send ioctl. The first patch introduces support for the BTRFS_SEND_FLAG_NO_FILE_DATA flag which is introduced in my kernel patch titled:

[PATCH 3/4] btrfs-progs: add send-test

2013-01-16 Thread Mark Fasheh
send-test.c links against libbtrfs and uses the send functionality provided to decode and print a send stream to the console. Signed-off-by: Mark Fasheh --- Makefile|5 +- send-test.c | 458 +++ 2 files changed, 462 insertions(+),

[PATCH 4/4] btrfs-progs: make libbtrfs usable from C++

2013-01-16 Thread Mark Fasheh
From: Arvin Schnell Please find attached a patch to make the new libbtrfs usable from C++ (at least for the parts snapper will likely need). Signed-off-by: Arvin Schnell Signed-off-by: Mark Fasheh --- extent_io.c |6 +++--- extent_io.h |6 +++--- ioctl.h |9 + li

[PATCH 2/4] btrfs-progs: libify some parts of btrfs-progs

2013-01-16 Thread Mark Fasheh
External software wanting to use the functionality provided by the btrfs send ioctl has a hard time doing so without replicating tons of work. Of particular interest are functions like btrfs_read_and_process_send_stream() and subvol_uuid_search(). As that functionality requires a bit more than just

[PATCH 1/4] btrfs-progs: Add support for BTRFS_SEND_FLAG_NO_FILE_DATA

2013-01-16 Thread Mark Fasheh
The flag and command are synced from kernel to user. Also, this patch adds a callback for the BTRFS_SEND_C_UPDATE_EXTENT in struct btrfs_send_ops. read_and_process_cmd() is updated to decode BTRFS_SEND_C_UPDATE_EXTENT and send the values through the right callback. I did not add a callback definiti

Re: [PATCH 2/3] btrfs-progs: libify some parts of btrfs-progs

2013-01-16 Thread Mark Fasheh
On Tue, Jan 15, 2013 at 04:06:42PM +0800, Anand Jain wrote: > better if its there (man libbtrfs). pls create if you could. Hmm, I'm confused though - what exactly goes into a file system library man page? Could you point me to an example one? --Mark -- Mark Fasheh -- To unsubscribe from

Re: How to refresh degraded BTRFS? free space fragmentation, file fragmentation...

2013-01-16 Thread Martin Steigerwald
Am Sonntag, 9. Dezember 2012 schrieb Martin Steigerwald: > Hi! > > I have BTRFS on some systems since more than two years. My experience so > far is: Performance at the beginning is pretty good, but some of my more > often used BTRFS filesystem degrade badly in different areas. On some > workload

Re: Rendering a btrfs filesystem unmountable with the btrfs command

2013-01-16 Thread Eric Hopper
On Tue, Jan 15, 2013 at 02:06:01PM -0800, hop...@omnifarious.org wrote: > Here is a sample fix that I believe will allow the offending filesystem > to at least be mounted. It hasn't been tested at all. I got this patch into a kernel and tested it. It does indeed allow the offending filesystem to

Re: [PATCH V2] mm/slab: add a leak decoder callback

2013-01-16 Thread Christoph Lameter
On Wed, 16 Jan 2013, Liu Bo wrote: > --- a/include/linux/slub_def.h > +++ b/include/linux/slub_def.h > @@ -93,6 +93,7 @@ struct kmem_cache { > gfp_t allocflags; /* gfp flags to use on each alloc */ > int refcount; /* Refcount for slab cache destroy */ > void (*cto

Re: [PATCH 2/2] Btrfs: make raid attr array more readable

2013-01-16 Thread David Sterba
On Wed, Jan 16, 2013 at 07:33:15PM +0800, Miao Xie wrote: > As the title said, this patch just make raid attr array more readable. Nice cleanup, thanks. > --- a/fs/btrfs/volumes.c > +++ b/fs/btrfs/volumes.c > @@ -3492,13 +3492,48 @@ static int btrfs_cmp_device_info(const void *a, const > void *b

Re: partition question

2013-01-16 Thread David Sterba
On Fri, Jan 11, 2013 at 10:38:45PM +, Hugo Mills wrote: > On Fri, Jan 11, 2013 at 03:34:25PM -0700, Chris Murphy wrote: > > Swap still needs to be on a separate partition, as I don't think > > Btrfs is supporting swapfiles yet still, but maybe someone else can > > comment on the status of that.

Re: [PATCH 10/11] Btrfs: use bit operation for ->fs_state

2013-01-16 Thread David Sterba
On Mon, Jan 14, 2013 at 03:50:31PM +0800, Miao Xie wrote: > Onthu, 10 Jan 2013 18:57:35 +0100, David Sterba wrote: > > On Thu, Jan 10, 2013 at 08:51:59PM +0800, Miao Xie wrote: > >> There is no lock to protect fs_info->fs_state, it will introduce some > >> problems, > >> such as the value may

Re: [PATCH 05/11] Btrfs: protect fs_info->alloc_start

2013-01-16 Thread David Sterba
On Mon, Jan 14, 2013 at 04:04:59PM +0800, Miao Xie wrote: > On Thu, 10 Jan 2013 18:10:40 +0100, David Sterba wrote: > > On Thu, Jan 10, 2013 at 08:48:00PM +0800, Miao Xie wrote: > >> fs_info->alloc_start was not protected strictly, it might be changed while > >> we were accessing it. This patch fix

[PATCH V5] Btrfs: snapshot-aware defrag

2013-01-16 Thread Liu Bo
This comes from one of btrfs's project ideas, As we defragment files, we break any sharing from other snapshots. The balancing code will preserve the sharing, and defrag needs to grow this as well. Now we're able to fill the blank with this patch, in which we make full use of backref walking stuff

Re: [PATCH 1/2] Btrfs: fix wrong max device number for single profile

2013-01-16 Thread Liu Bo
On Wed, Jan 16, 2013 at 07:27:17PM +0800, Miao Xie wrote: > The max device number of single profile is 1, not 0 (0 means 'as many as > possible'). Fix it. Reviewed-by: Liu Bo > > Cc: Liu Bo > Signed-off-by: Miao Xie > --- > fs/btrfs/volumes.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH 2/2] Btrfs: make raid attr array more readable

2013-01-16 Thread Matthias Prager
One small error (see below): > As the title said, this patch just make raid attr array more readable. > > Cc: Liu Bo > Signed-off-by: Miao Xie > --- > fs/btrfs/ctree.h | 10 +- > fs/btrfs/extent-tree.c | 22 +- > fs/btrfs/volumes.c | 47 +++

[PATCH 2/2] Btrfs: make raid attr array more readable

2013-01-16 Thread Miao Xie
As the title said, this patch just make raid attr array more readable. Cc: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/ctree.h | 10 +- fs/btrfs/extent-tree.c | 22 +- fs/btrfs/volumes.c | 47 +-- 3 files changed,

[PATCH 1/2] Btrfs: fix wrong max device number for single profile

2013-01-16 Thread Miao Xie
The max device number of single profile is 1, not 0 (0 means 'as many as possible'). Fix it. Cc: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 86279c3..7fa9773 100644 --- a/

Re: btrfs for files > 10GB = random spontaneous CRC failure.

2013-01-16 Thread Bernd Schubert
On 01/16/2013 12:32 AM, Tom Kusmierz wrote: p.s. bizzare that when I "fill" ext4 partition with test data everything check's up OK (crc over all files), but with Chris tool it gets corrupted - for both Adaptec crappy pcie controller and for mother board built in one. Also since courses of histor