Re: [PATCH] Btrfs-progs: add check-only option for balance

2016-06-14 Thread Ashish Samant
On 06/10/2016 01:47 PM, Hans van Kranenburg wrote: Hi, Correct me if I'm wrong, On 06/09/2016 11:46 PM, Ashish Samant wrote: +/* return 0 if balance can remove a data block group, otherwise return 1 */ +static int search_data_bgs(const char *path) +{ +struct btrfs_ioctl_search_args

[PATCH] Btrfs-progs: add check-only option for balance

2016-06-09 Thread Ashish Samant
346624) -- So you now know how to babysit your btrfs in a smart way. Signed-off-by: Liu Bo <bo.li@oracle.com> Signed-off-by: Ashish Samant <ashish.sam...@oracle.com> --- cmds-balance.c | 127 +++- 1 files changed, 12

Re: fsck: to repair or not to repair

2016-05-12 Thread Ashish Samant
On 05/12/2016 10:35 AM, Nikolaus Rath wrote: On May 12 2016, Henk Slager wrote: On Wed, May 11, 2016 at 11:10 PM, Nikolaus Rath wrote: Hello, I recently ran btrfsck on one of my file systems, and got the following messages: checking extents checking

[PATCH] btrfs: Fix BUG_ON condition in scrub_setup_recheck_block()

2016-04-29 Thread Ashish Samant
pagev array in scrub_block{} is of size SCRUB_MAX_PAGES_PER_BLOCK. page_index should be checked with the same to trigger BUG_ON(). Signed-off-by: Ashish Samant <ashish.sam...@oracle.com> --- fs/btrfs/scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/scr

[PATCH] btrfs: Cleanup compress_file_range()

2016-03-25 Thread Ashish Samant
Remove unnecessary checks in compress_file_range(). Signed-off-by: Ashish Samant <ashish.sam...@oracle.com> --- fs/btrfs/inode.c | 79 +++- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/i

[PATCH V3] btrfs: Print Warning only if ENOSPC_DEBUG is enabled

2016-03-11 Thread Ashish Samant
Dont print warning for ENOSPC error unless ENOSPC_DEBUG is enabled. Use btrfs_debug if it is enabled. Signed-off-by: Ashish Samant <ashish.sam...@oracle.com> V3: - Use btrfs_debug() instead of WARN() per David Sterba's comment. V2: - Add a commit message. --- fs/btrfs/delayed-inode

[PATCH V2] btrfs: Print Warning only if ENOSPC_DEBUG is enabled

2015-11-02 Thread Ashish Samant
Dont call WARN_ON for ENOSPC error unless ENOSPC_DEBUG is enabled. Signed-off-by : Ashish Samant <ashish.sam...@oracle.com> --- fs/btrfs/delayed-inode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index a

[PATCH] btrfs: Print Warning only if ENOSPC_DEBUG is enabled

2015-10-26 Thread Ashish Samant
Signed-off-by : Ashish Samant <ashish.sam...@oracle.com> --- fs/btrfs/delayed-inode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index a2ae427..b86cfd9 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/d