[PATCH 1/2] btrfs-progs: introduce test_issubvolname() for simplicity

2014-07-25 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com There are many duplicated codes to check if the given string is correct subvolume name. Introduce test_issubvolname() for this purpose for simplicity. Signed-off-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com --- cmds-subvolume.c | 21

[PATCH 2/2] btrfs-progs: Unify the messy error message formats

2014-07-25 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com - There are many format to show snapshot name in error messages, '%s', '%s, %s, ('%s'), and ('%s). Since it's messy, unify these to '%s' format. - Fix a type: s/uncorrect/incorrect/ Signed-off-by: Satoru Takeuchi

Re: [PATCH 2/4 v3] fiemap: add EXTENT_DATA_COMPRESSED flag

2014-07-25 Thread Rohan Puri
On Fri, Jul 25, 2014 at 4:04 AM, Andreas Dilger adil...@dilger.ca wrote: On Jul 24, 2014, at 1:22 PM, David Sterba dste...@suse.cz wrote: On Thu, Jul 17, 2014 at 12:07:57AM -0600, Andreas Dilger wrote: any progress on this patch series? I'm sorry I got distracted at the end of year and did

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Anand Jain
On 07/25/2014 12:27 PM, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: num_bytes = (num_bytes / sectorsize) * sectorsize; but subsequent device adds don't. This seems a bit odd inconsistent, and it makes xfstest btrfs/011 _notrun(),

Re: [PATCH v2] btrfs: Return right extent when fiemap gives unaligned offset and len.

2014-07-25 Thread Satoru Takeuchi
Hi Qu, (2014/07/25 10:49), Qu Wenruo wrote: When page aligned start and len passed to extent_fiemap(), the result is good, but when start and len is not aligned, e.g. start = 1 and len = 4095 is passed to extent_fiemap(), it returns no extent. The problem is that start and len is all

Re: [PATCH 01/10] Btrfs: Fix the problem that the replace destroys the seed filesystem

2014-07-25 Thread Anand Jain
Thanks for nailing down most of the seed related bugs, scratching off few from my list. On 07/24/2014 11:37 AM, Miao Xie wrote: The seed filesystem was destroyed by the device replace, the reproduce method is: # mkfs.btrfs -f dev0 # btrfstune -S 1 dev0 # mount dev0 mnt # btrfs

[PATCH] btrfs: use IS_ALIGNED() for assertion in btrfs_lookup_csums_range() for simplicity

2014-07-25 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com btrfs_lookup_csums_range() uses ALIGN() to check if start and end + 1 are aligned to root-sectorsize. It's better to replace these with IS_ALIGNED() for simplicity. Signed-off-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com ---

Re: [PATCH v2] btrfs: Return right extent when fiemap gives unaligned offset and len.

2014-07-25 Thread Qu Wenruo
Original Message Subject: Re: [PATCH v2] btrfs: Return right extent when fiemap gives unaligned offset and len. From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs@vger.kernel.org Date: 2014年07月25日 15:52 Hi Qu, (2014/07/25

[PATCH 0/5 v4] fiemap: introduce EXTENT_DATA_COMPRESSED flag

2014-07-25 Thread David Sterba
The original FIEMAP patch did not define this bit, btrfs will make use of it. The defined constant maintains the same value as originally proposed. Currently, the 'filefrag' utility has no way to recognize and denote a compressed extent. As implemented in btrfs right now, the compression step

[PATCH 2/5] fiemap: add EXTENT_DATA_COMPRESSED flag

2014-07-25 Thread David Sterba
This flag was not accepted when fiemap was proposed [2] due to lack of in-kernel users. Btrfs has compression for a long time and we'd like to see that an extent is compressed in the output of 'filefrag' utility once it's taught about it. For that purpose, a reserved field from fiemap_extent is

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-25 Thread Hugo Mills
[this time, to the mailing list as well] On Fri, Jul 25, 2014 at 09:02:44AM +0100, Hugo Mills wrote: On Thu, Jul 24, 2014 at 11:06:34PM -0400, Nick Krause wrote: On Thu, Jul 24, 2014 at 10:32 PM, Duncan 1i5t5.dun...@cox.net wrote: [snip] Hey Duncan and others , I have read this and this

Re: [PATCH 02/10] Btrfs: don't write any data into a readonly device when scrub

2014-07-25 Thread Anand Jain
On 07/24/2014 11:37 AM, Miao Xie wrote: We should not write data into a readonly device especially seed device when doing scrub, skip those devices. Reviewed-by: Anand Jain anand.j...@oracle.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/scrub.c | 11 +++ 1 file

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-25 Thread Martin Steigerwald
Am Donnerstag, 24. Juli 2014, 22:48:05 schrieben Sie: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to this compressed extent, and these 'clean' pages will simply skip 'submit' part and

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-25 Thread Martin Steigerwald
Am Freitag, 25. Juli 2014, 09:00:19 schrieb Liu Bo: On Thu, Jul 24, 2014 at 10:55:47AM -0400, Chris Mason wrote: On 07/24/2014 10:48 AM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-25 Thread Martin Steigerwald
Am Freitag, 25. Juli 2014, 02:32:17 schrieb Duncan: Martin Steigerwald posted on Thu, 24 Jul 2014 20:49:37 +0200 as excerpted: It may take some time tough cause during compiling the kernel BTRFS hung again, which caused loss of KDE Baloo desktop search file index and parts of a mail I wrote

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-25 Thread Torbjørn
On 25. juli 2014 11:28, Liu Bo wrote: Hi Torbjørn, On Fri, Jul 25, 2014 at 06:51:44AM +0200, Torbjørn wrote: On 07/24/2014 04:58 PM, Chris Mason wrote: snip Liu Bo has a promising patch: https://patchwork.kernel.org/patch/4618421/ Please give it a shot. There's a second deadlock reading

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-25 Thread Torbjørn
On 25. juli 2014 13:09, Torbjørn wrote: On 25. juli 2014 12:22, Torbjørn wrote: On 25. juli 2014 11:28, Liu Bo wrote: Hi Torbjørn, On Fri, Jul 25, 2014 at 06:51:44AM +0200, Torbjørn wrote: On 07/24/2014 04:58 PM, Chris Mason wrote: snip Liu Bo has a promising patch:

Re: integration tree updated

2014-07-25 Thread Chris Mason
On 07/24/2014 10:16 PM, Qu Wenruo wrote: Hi chris, It seems that two of my wrong patches got merged in integration branch: 6068d17c8ab5bce946e9678ed2064e9f966cbe62 btrfs: Merge default subvolume mount codes into btrfs_mount_subvol(). 8a2166332e332541f13b34b7248c0f14f575731e btrfs: Call

[PATCH] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-07-25 Thread Anand Jain
After the seed device has been replaced the new target device is no more a seed device. So we need to bring that state in the fs_devices. reproducer: mount /dev/sdb /btrfs btrfs dev add /dev/sdc /btrfs btrfs rep start -B /dev/sdb /dev/sdd /btrfs umount /btrfs WARNING: CPU: 0 PID: 12661 at

[PATCH not for integration] btrfs-devlist: dumps btrfs_device and btrfs_fs_devices from kernel

2014-07-25 Thread Anand Jain
This would dump the following info: fs_address dev_address dev_root_addr root_fsid fsid name uuid (seed_fsid@seed_addr sprout_fsid@sprout_addr) (fs_num_devices fs_open_devices fs_rw_devices fs_missing_devices fs_total_devices) fs_total_rw_bytes fs_num_can_discard devid gen

[PATCH 1/1] btrfs-progs: introduce btrfs-devlist

2014-07-25 Thread Anand Jain
This is a small (debug) program to dump the device list in the raw format from the btrfs kernel. here I use ioctl which was introduced in the below kernel patch btrfs: introduce BTRFS_IOC_GET_DEVS Signed-off-by: Anand Jain anand.j...@oracle.com --- .gitignore | 1 + Makefile| 4

[PATCH 1/1] btrfs: introduce BTRFS_IOC_GET_DEVS

2014-07-25 Thread Anand Jain
The user land progs needs a simple way to see the raw list of disks and its parameters as seen by the btrfs kernel. As of now btrfs-devlist uses this ioctl. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/super.c | 86 +++ fs/btrfs/volumes.c

[PATCH v3] btrfs-progs: Add uninstall targets to Makefiles.

2014-07-25 Thread n.st
From: Nils Steinger g...@n-st.de Signed-off-by: Nils Steinger g...@n-st.de --- v2: As Satoru Takeuchi pointed out, I forgot to remove $(libs) in the main Makefile. v3: David Sterba suggested not to remove the $(bindir) and $(libdir), since those might be needed by other programs, even if the

Re: [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.

2014-07-25 Thread Nils Steinger
I apologize for the long hiatus. On Fri, Jun 27, 2014 at 02:32:01PM +0200, David Sterba wrote: On Wed, Jun 25, 2014 at 09:40:40PM +0200, Nils Steinger wrote: On my system, man8dir didn't exist prior to the installation, so I thought it would be reasonable to have the uninstallation routine

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-25 Thread Torbjørn
On 07/25/2014 01:37 PM, Torbjørn wrote: On 25. juli 2014 13:09, Torbjørn wrote: On 25. juli 2014 12:22, Torbjørn wrote: On 25. juli 2014 11:28, Liu Bo wrote: Hi Torbjørn, On Fri, Jul 25, 2014 at 06:51:44AM +0200, Torbjørn wrote: On 07/24/2014 04:58 PM, Chris Mason wrote: snip Liu Bo has a

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Zach Brown
On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: ^^^ - device-total_bytes = block_count; + device-total_bytes = (block_count / sectorsize) * sectorsize;

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Eric Sandeen
On 7/25/14, 12:12 PM, Zach Brown wrote: On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: ^^^ -device-total_bytes = block_count; +device-total_bytes = (block_count /

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Eric Sandeen
On 7/25/14, 12:25 PM, Eric Sandeen wrote: On 7/25/14, 12:12 PM, Zach Brown wrote: On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: ^^^ - device-total_bytes = block_count; +

Help with Project on brtfs wiki

2014-07-25 Thread Nick Krause
Hey brtfs devolopers. I am new so I think this project,Implement new FALLOC_FL_* modes needs more information for me to write if for you guys. I am wondering what is fallocate and how you want me to write this, define statements or as functions in a certain file? I am not asking to hold my hand