[PATCH] Btrfs: correctly flush data on defrag when compression is enabled

2014-03-01 Thread Filipe David Borba Manana
When the defrag flag BTRFS_DEFRAG_RANGE_START_IO is set and compression enabled, we weren't flushing completely, as writing compressed extents is a 2 steps process, one to compress the data and another one to write the compressed data to disk. Signed-off-by: Filipe David Borba Manana

[PATCH] Btrfs: make defrag not fragment files when using prealloc extents

2014-03-01 Thread Filipe David Borba Manana
When using prealloc extents, a file defragment operation may actually fragment the file and increase the amount of data space used by the file. This change fixes that behaviour. Example: $ mkfs.btrfs -f /dev/sdb3 $ mount /dev/sdb3 /mnt $ cd /mnt $ xfs_io -f -c 'falloc 0 1048576' foobar sync $

Re: How to identify if a partition containing a btrfs volume is mounted and where

2014-03-01 Thread Anand Jain
Hi Mike, On 27/02/2014 05:50, Mike Fleetwood wrote: On 25 February 2014 10:28, Mike Fleetwood mike.fleetw...@googlemail.com wrote: On 25 February 2014 03:01, Anand Jain anand.j...@oracle.com wrote: # mkfs.btrfs /dev/sdb2 /dev/sdb3 /dev/sdb4 # mount /dev/sdb2 /mnt/1 # btrfs device delete

Re: 3.14.0-rc3 btrfs scrub is preventing my laptop from going to sleep

2014-03-01 Thread Marc MERLIN
On Fri, Feb 28, 2014 at 09:09:37PM -0800, Marc MERLIN wrote: On Fri, Feb 28, 2014 at 09:18:06AM +0800, Wang Shilong wrote: Could you run the following command when scrub is blocked, we can know more why scrub is blocked here. # echo w /proc/sysrq-trigger # dmesg Yes, there you go:

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-01 Thread Alex Lyakas
Hi Miao, On Wed, Jan 15, 2014 at 2:00 PM, Miao Xie mi...@cn.fujitsu.com wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free space BTRFS error (device xxx): failed to load free

Re: [PATCH] Btrfs: use btrfs_crc32c everywhere instead of libcrc32c

2014-03-01 Thread WorMzy Tykashi
On 27 February 2014 12:43, Filipe David Manana fdman...@gmail.com wrote: On Wed, Feb 26, 2014 at 11:26 PM, WorMzy Tykashi wormzy.tyka...@gmail.com wrote: Hi, Hi Hi again, Sorry for the delay in replying, I've not had the time to gather my thoughts and write a coherent reply. Ever since