[PATCH] btrfs-progs: clarify manpage for btrfstune seeding option

2014-05-21 Thread Gui Hecheng
The btrfstune -S option accepts a positive value to enable seeding, and a zero to disable seeding, negtive is not allowed. Add positive, zero, negative sentences to btrfstune manpage. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- Documentation/btrfstune.txt | 5 +++-- btrfstune.c

[RFC PATCH 5/8] Btrfs: subpagesize-blocksize: Read tree blocks whose size is PAGE_CACHE_SIZE.

2014-05-21 Thread Chandan Rajendra
In the case of subpagesize-blocksize, this patch makes it possible to read only a single metadata block from the disk instead of all the metadata blocks that map into a page. Signed-off-by: Chandan Rajendra chan...@linux.vnet.ibm.com --- fs/btrfs/disk-io.c | 45 -

[RFC PATCH 8/8] Btrfs: subpagesize-blocksize: Compute and look up csums based on sectorsized blocks.

2014-05-21 Thread Chandan Rajendra
Checksums are applicable to sectorsize units. The current code uses bio-bv_len units to compute and look up checksums. This works on machines where sectorsize == PAGE_CACHE_SIZE. This patch makes the checksum computation and look up code to work with sectorsize units. Signed-off-by: Chandan

[RFC PATCH 7/8] Btrfs: subpagesize-blocksize: Allow mounting filesystems where sectorsize != PAGE_SIZE

2014-05-21 Thread Chandan Rajendra
From: Chandra Seetharaman sekha...@us.ibm.com This patch allows mounting filesystems with blocksize smaller than the PAGE_SIZE. Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Chandan Rajendra chan...@linux.vnet.ibm.com --- fs/btrfs/disk-io.c | 6 -- 1 file changed, 6

[RFC PATCH 0/8] Btrfs: Subpagesize-blocksize: Get rid of whole page I/O

2014-05-21 Thread Chandan Rajendra
This patchset continues with the work posted earlier at http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg32143.html. The following are the high level changes brought in by this patchset: 1. Rewrite 'extent buffer' handling code to incorporate comments posted to Chandra Seetharaman's

[RFC PATCH 1/8] Btrfs: subpagesize-blocksize: Get rid of whole page reads.

2014-05-21 Thread Chandan Rajendra
Based on original patch from Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com bio_vec-{bv_offset, bv_len} cannot be relied upon by the end bio functions to track the file offset range operated on by the bio. Hence this patch adds two new members to 'struct btrfs_io_bio' to track the file offset

[RFC PATCH 6/8] Btrfs: subpagesize-blocksize: Write only dirty extent buffers belonging to a page

2014-05-21 Thread Chandan Rajendra
For the subpagesize-blocksize scenario, This patch adds the ability to write a single extent buffer to the disk. Signed-off-by: Chandan Rajendra chan...@linux.vnet.ibm.com --- fs/btrfs/disk-io.c | 20 ++-- fs/btrfs/extent_io.c | 277 ++- 2 files

[RFC PATCH 2/8] Btrfs: subpagesize-blocksize: Get rid of whole page writes.

2014-05-21 Thread Chandan Rajendra
This commit brings back functions that set/clear EXTENT_WRITEBACK bits. These are required to reliably clear PG_writeback page flag. Signed-off-by: Chandan Rajendra chan...@linux.vnet.ibm.com --- fs/btrfs/extent_io.c | 76 +--- 1 file changed, 73

[RFC PATCH 3/8] Btrfs: subpagesize-blocksize: __btrfs_buffered_write: Reserve/release extents aligned to block size.

2014-05-21 Thread Chandan Rajendra
Currently, the code reserves/releases extents in multiples of PAGE_CACHE_SIZE units. Fix this. Signed-off-by: Chandan Rajendra chan...@linux.vnet.ibm.com --- fs/btrfs/file.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/file.c

[RFC PATCH 4/8] Btrfs: subpagesize-blocksize: Define extent_buffer_head.

2014-05-21 Thread Chandan Rajendra
From: Chandra Seetharaman sekha...@us.ibm.com In order to handle multiple extent buffers per page, first we need to create a way to handle all the extent buffers that are attached to a page. This patch creates a new data structure 'struct extent_buffer_head', and moves fields that are common to

Re: problem with degraded boot and systemd

2014-05-21 Thread Duncan
On Tue, 20 May 2014 18:51:26 -0600 Chris Murphy li...@colorremedies.com wrote: On May 20, 2014, at 6:03 PM, Duncan 1i5t5.dun...@cox.net wrote: I'd actually argue that's functioning as it should, since I see forced manual intervention in ordered to mount degraded as a FEATURE, NOT A

Re: btrfs check, btrfsck, fsck.btrfs

2014-05-21 Thread Duncan
On Tue, 20 May 2014 18:26:59 -0600 Chris Murphy li...@colorremedies.com wrote: That ought to be true, but at least on a systemd 212-4 system, it assumes the system root needs to be fsck'd before mounting it. Since the fs isn't mounted, fstab isn't available. And the fstab.empty file I found

Re: btrfs check, btrfsck, fsck.btrfs

2014-05-21 Thread Chris Murphy
On May 21, 2014, at 4:47 AM, Duncan 1i5t5.dun...@cox.net wrote: On Tue, 20 May 2014 18:26:59 -0600 Chris Murphy li...@colorremedies.com wrote: That ought to be true, but at least on a systemd 212-4 system, it assumes the system root needs to be fsck'd before mounting it. Since the fs

[PATCH] Btrfs: send, fix corrupted paths strings for long paths

2014-05-21 Thread Filipe David Borba Manana
If a path has more than 230 characters, we allocate a new buffer to use for the path, but we were forgotting to copy the contents of the previous buffer into the new one, which has random content from the kmalloc call. Test: mkfs.btrfs -f /dev/sdd mount /dev/sdd /mnt

[PATCH] xfstests: add test for btrfs send with long paths

2014-05-21 Thread Filipe David Borba Manana
Regression test for btrfs send where long paths (exceeding 230 characters) made send produce paths with random characters from a memory buffer returned by kmalloc, as send forgot to populate the new buffer with the path string. This issue is fixed by the following linux kernel btrfs patch:

[PATCH v2] Btrfs: send, fix corrupted path strings for long paths

2014-05-21 Thread Filipe David Borba Manana
If a path has more than 230 characters, we allocate a new buffer to use for the path, but we were forgotting to copy the contents of the previous buffer into the new one, which has random content from the kmalloc call. Test: mkfs.btrfs -f /dev/sdd mount /dev/sdd /mnt

[PATCH] Add some simple end-to-end tests for btrfs-convert.

2014-05-21 Thread Adam Buchbinder
These use the system's mke2fs, and don't require loop devices or root privileges. They don't pick up anything with the default flags right now, but they do pick up some sanitizer issues when the tools are compiled with any of -fsanitize={address,memory,thread}. Signed-off-by: Adam Buchbinder

Re: [RFC PATCH 1/2] btrfs: Add missing device check in dev_info/rm_dev ioctl

2014-05-21 Thread Brendan Hide
On 2014/05/21 06:15 AM, Qu Wenruo wrote: [snip] Further on top of your check_missing patch I am writing code to to handle disk reappear. I should be sending them all soon. Disk reappear problem is also reproduce here. I am intersting about how will your patch to deal with. Is your patch

Re: destroyed disk in btrfs raid

2014-05-21 Thread laie
On 2014-05-14 23:44, laie wrote: On 2014-05-14 20:44, Hugo Mills wrote: On Wed, May 14, 2014 at 08:43:41PM +0200, laie wrote: On 2014-05-11 16:19, Hugo Mills wrote: On Tue, May 13, 2014 at 10:16:59AM +0200, laie wrote: On 2014-05-09 20:01, Hugo Mills wrote: On Fri, May 09, 2014 at 06:58:27PM

Re: ditto blocks on ZFS

2014-05-21 Thread Martin
Very good comment from Ashford. Sorry, but I see no advantages from Russell's replies other than for a feel-good factor or a dangerous false sense of security. At best, there is a weak justification that for metadata, again going from 2% to 4% isn't going to be a great problem (storage is cheap

Re: ditto blocks on ZFS

2014-05-21 Thread Konstantinos Skarlatos
On 20/5/2014 5:07 πμ, Russell Coker wrote: On Mon, 19 May 2014 23:47:37 Brendan Hide wrote: This is extremely difficult to measure objectively. Subjectively ... see below. [snip] *What other failure modes* should we guard against? I know I'd sleep a /little/ better at night knowing that a

[PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-21 Thread Chris Mason
The Btrfs sysfs code removes entries for raid types that are no longer in use. This means that if you have a raid0 FS and use balance to turn it into a raid1 FS, the raid0 sysfs entries will go away. The rough chain of events is: __link_block_group() - see we're the first RAIDX, add sysfs

Re: [PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-21 Thread Jeff Mahoney
On 05/21/2014 08:12 PM, Chris Mason wrote: The Btrfs sysfs code removes entries for raid types that are no longer in use. This means that if you have a raid0 FS and use balance to turn it into a raid1 FS, the raid0 sysfs entries will go away. The rough chain of events is:

Should btrfs reuse the src_dev's dev UUID when doing dev replacing?

2014-05-21 Thread Qu Wenruo
Hi, [Current dev replace] As kernel codes show, 'btrfs dev replace' will swap tgt_dev's uuid with src_dev's uuid. This method works fine most of the time, since it doesn't need to change the chunk tree. [Problem with re-appear missing device] (Anand Jain reported the problem in Jan 2014)

Re: [PATCH v2] Btrfs: send, fix corrupted path strings for long paths

2014-05-21 Thread Marc MERLIN
On Wed, May 21, 2014 at 05:38:13PM +0100, Filipe David Borba Manana wrote: If a path has more than 230 characters, we allocate a new buffer to use for the path, but we were forgotting to copy the contents of the previous buffer into the new one, which has random content from the kmalloc call.

Re: [PATCH 1/2 v2] btrfs: label should not contain return char

2014-05-21 Thread Anand Jain
(Random aside: why does btrfs support online fs relabeling, anyway?) -Eric Online you mean when mounted ? But I had an opinion that should we support label store from the sysfs interface when the (sysfs) interface can't communicate the module's specific errors back to the user.?

Re: [PATCH 1/2 v2] btrfs: label should not contain return char

2014-05-21 Thread Eric Sandeen
On 5/21/14, 9:05 PM, Anand Jain wrote: (Random aside: why does btrfs support online fs relabeling, anyway?) -Eric Online you mean when mounted ? Yep - I'm just not sure who would ever want to do that. Aren't labels primarly used for mounting, during the mount process? So changing it

Re: Should btrfs reuse the src_dev's dev UUID when doing dev replacing?

2014-05-21 Thread Anand Jain
Thanks Qu for bringing up this topic. We definitely need some focus on the btrfs volume management related bugs/features/enhancements. more inline.. On 22/05/14 09:35, Qu Wenruo wrote: Hi, [Current dev replace] As kernel codes show, 'btrfs dev replace' will swap tgt_dev's uuid with

Linuxcon-JP Btrfs talk

2014-05-21 Thread Marc MERLIN
If you're new with Btrfs, this may be a useful walkthrough for you. You can go through the slides which I wrote to be readable without the video, but the video is available too if you'd like: http://marc.merlins.org/perso/btrfs/post_2014-05-21_My-Btrfs-Talk-at-Linuxcon-JP-2014.html If you've

Re: [PATCH 1/2 v2] btrfs: label should not contain return char

2014-05-21 Thread Roman Mamedov
On Wed, 21 May 2014 21:14:07 -0500 Eric Sandeen sand...@redhat.com wrote: (Random aside: why does btrfs support online fs relabeling, anyway?) -Eric Online you mean when mounted ? Yep - I'm just not sure who would ever want to do that. Aren't labels primarly used for mounting,

Re: historical backups with hardlinks vs cp --reflink vs snapshots

2014-05-21 Thread Russell Coker
On Tue, 20 May 2014 20:59:28 Marc MERLIN wrote: just wrote a blog post about the 3 way of doing historical snapshots: http://marc.merlins.org/perso/btrfs/post_2014-05-20_Historical-Snapshots-Wit h-Btrfs.html I love reflink, but that forces me to use btrfs send as the only way to copy a