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 bo.li@oracle.com Cc: Liu Bo bo.li@oracle.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com ---

[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

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 fixes this

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 be covered

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 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: [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

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 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

[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

[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

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

2013-01-16 Thread Mark Fasheh
From: Arvin Schnell aschn...@suse.de 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 aschn...@suse.de Signed-off-by: Mark Fasheh mfas...@suse.de --- extent_io.c |6 +++--- extent_io.h |

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