Re: deleting a dead device

2014-09-21 Thread Duncan
Russell Coker posted on Sun, 21 Sep 2014 11:39:17 +1000 as excerpted: > On a system running the Debian 3.14.15-2 kernel I added a new drive to a > RAID-1 array. My aim was to add a device and remove one of the old > devices. That's an old kernel and presumably an old btrfs-progs. Quite a number

Re: deleting a dead device

2014-09-21 Thread Russell Coker
On Sun, 21 Sep 2014, Duncan <1i5t5.dun...@cox.net> wrote: > Russell Coker posted on Sun, 21 Sep 2014 11:39:17 +1000 as excerpted: > > On a system running the Debian 3.14.15-2 kernel I added a new drive to a > > RAID-1 array. My aim was to add a device and remove one of the old > > devices. > > Th

Re: device delete progress

2014-09-21 Thread Duncan
Russell Coker posted on Sun, 21 Sep 2014 12:09:11 +1000 as excerpted: > We need to have a way to determine the progress of a device delete > operation. > Also for a balance of a RAID-1 that has more than 2 devices it would be > good to know how much space is used on each device. > > Could btrfs f

Re: [PATCH] btrfs: fix ABBA deadlock in btrfs_dev_replace_finishing()

2014-09-21 Thread Miao Xie
It has been fixed by https://patchwork.kernel.org/patch/4747961/ Thanks Miao On Sun, 21 Sep 2014 12:41:49 +0800, Eryu Guan wrote: > btrfs_map_bio() first calls btrfs_bio_counter_inc_blocked() which checks > fs state and increase bio_counter, then calls __btrfs_map_block() which > will take the d

Re: Help for creating a useful bugreport

2014-09-21 Thread Jakob Breier
Hi, Chris Murphy wrote: On Sep 19, 2014, at 2:58 AM, Jakob Breier wrote: > Unfortunately I don't have much to work with. Can you help me with extracting > enough information to create a useful bugreport? What storage device(s)? The device (/dev/dm-1) is a LUKS device. It is about a gigabyte i

Re: [PATCH 4/4] Default to acting like fsck.

2014-09-21 Thread Tobias Geerinckx-Rice
On 21 September 2014 03:01, Dimitri John Ledkov wrote: > > Inspect arguments, if we are not called as btrfs, then assume we are > called to act like fsck. [...] > - if (!strcmp(bname, "btrfsck")) { > + if (strcmp(bname, "btrfs") != 0) { That's assuming a lot. Silently (!) breaking pe

Re: [PATCH v2 0/2] Move BTRFS RCU string to common library

2014-09-21 Thread Paul E. McKenney
On Fri, Sep 19, 2014 at 12:22:57PM -0400, Chris Mason wrote: > On 09/19/2014 12:05 PM, Paul E. McKenney wrote: > > On Fri, Sep 19, 2014 at 11:47:53AM -0400, Chris Mason wrote: > >> > >> > >> On 09/19/2014 11:45 AM, Paul E. McKenney wrote: > >>> On Fri, Sep 19, 2014 at 02:01:28AM -0700, Omar Sandova

Re: [PATCH v2 1/2] Return a value from printk_ratelimited

2014-09-21 Thread Paul E. McKenney
On Fri, Sep 19, 2014 at 11:15:53AM -0700, Joe Perches wrote: > On Fri, 2014-09-19 at 13:21 -0400, Steven Rostedt wrote: > > On Fri, 19 Sep 2014 02:01:29 -0700 > > Omar Sandoval wrote: > > > > > printk returns an integer; there's no reason for printk_ratelimited to > > > swallow > > > it. > > Ex

Re: [PATCH v2 1/2] Return a value from printk_ratelimited

2014-09-21 Thread Joe Perches
On Sun, 2014-09-21 at 06:25 -0700, Paul E. McKenney wrote: > On Fri, Sep 19, 2014 at 11:15:53AM -0700, Joe Perches wrote: > > On Fri, 2014-09-19 at 13:21 -0400, Steven Rostedt wrote: > > > On Fri, 19 Sep 2014 02:01:29 -0700 > > > Omar Sandoval wrote: > > > > > > > printk returns an integer; there

Re: deleting a dead device

2014-09-21 Thread Chris Murphy
On Sep 20, 2014, at 7:39 PM, Russell Coker wrote: > > Anyway the new drive turned out to have some errors, writes failed and I've > got a heap of errors such as the above. I'm curious if smartctl -t conveyance reveals any problems, it's not a full surface test but is designed to be a test for

Re: device delete progress

2014-09-21 Thread Chris Murphy
On Sep 20, 2014, at 8:09 PM, Russell Coker wrote: > We need to have a way to determine the progress of a device delete operation. > > Also for a balance of a RAID-1 that has more than 2 devices it would be good > to know how much space is used on each device. btrfs replace does do this; but

Re: Help for creating a useful bugreport

2014-09-21 Thread Chris Murphy
On Sep 21, 2014, at 4:57 AM, Jakob Breier wrote: > > I've tried opening a few files and they appear to be fine. I'll take a more > thorough look later. I'm not sure what to expect with --init-extent-tree after the fact. It might have holes in it (?) seeing as I'm not sure how we get something

[RFC PATCH V7 01/16] Btrfs: subpagesize-blocksize: Get rid of whole page reads.

2014-09-21 Thread Chandan Rajendra
Based on original patch from Aneesh Kumar K.V For the subpagesize-blocksize scenario, a page can contain multiple blocks. This patch handles this case. This patch also brings back check_page_locked() to reliably unlock pages in readpage's end bio function. Signed-off-by: Chandan Rajendra ---

[RFC PATCH V7 02/16] Btrfs: subpagesize-blocksize: Get rid of whole page writes.

2014-09-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 --- fs/btrfs/extent_io.c | 47 +++ fs/btrfs/inode.c | 40 ++

[RFC PATCH V7 03/16] Btrfs: subpagesize-blocksize: __btrfs_buffered_write: Reserve/release extents aligned to block size.

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

[RFC PATCH V7 00/16] Btrfs: Subpagesize-blocksize: Get rid of whole page I/O.

2014-09-21 Thread Chandan Rajendra
This patchset continues with the work posted earlier at https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg37041.html. Changes from V1: 1. Remove usage of bio_vec->bv_{len,offset} in end_bio_extent_readpage() and end_bio_extent_writepage(). Changes from V2: 1. Get __extent_writepage()

[RFC PATCH V7 04/16] Btrfs: subpagesize-blocksize: Define extent_buffer_head.

2014-09-21 Thread Chandan Rajendra
From: Chandra Seetharaman 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 all extent buffers i

[RFC PATCH V7 09/16] Btrfs: subpagesize-blocksize: __extent_writepage: Write only dirty blocks of a page.

2014-09-21 Thread Chandan Rajendra
The code now loops across 'ordered extents' instead of 'extent maps' to figure out the dirty blocks of the page to be submitted for a write operation. Signed-off-by: Chandan Rajendra --- fs/btrfs/extent_io.c | 74 1 file changed, 29 insertions

[RFC PATCH V7 12/16] Btrfs: subpagesize-blocksize: Search for all ordered extents that could span across a page.

2014-09-21 Thread Chandan Rajendra
In subpagesize-blocksize scenario it is not sufficient to search using the first byte of the page to make sure that there are no ordered extents present across the page. Fix this. Signed-off-by: Chandan Rajendra --- fs/btrfs/extent_io.c | 3 ++- fs/btrfs/inode.c | 6 +++--- 2 files changed,

[RFC PATCH V7 15/16] Btrfs: subpagesize-blocksize: Revert commit fc4adbff823f76577ece26dcb88bf6f8392dbd43.

2014-09-21 Thread Chandan Rajendra
In subpagesize-blocksize, we have multiple blocks in a page. Checking for existence of a page in the page cache isn't a sufficient check, since we could be truncating a subset of the blocks mapped by the page. Signed-off-by: Chandan Rajendra --- fs/btrfs/btrfs_inode.h | 2 -- fs/btrfs/file.c

[RFC PATCH V7 05/16] Btrfs: subpagesize-blocksize: Read tree blocks whose size is

2014-09-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 --- fs/btrfs/disk-io.c | 45 +++-- fs/btrfs/disk-io.h | 3 ++ fs/btrfs

[RFC PATCH V7 13/16] Btrfs: subpagesize-blocksize: Deal with partial ordered extent allocations.

2014-09-21 Thread Chandan Rajendra
In subpagesize-blocksize scenario, extent allocations for only some of the dirty blocks of a page can succeed, while allocation for rest of the blocks can fail. This patch allows I/O against such partially allocated ordered extents to be submitted. Signed-off-by: Chandan Rajendra --- fs/btrfs/ex

[RFC PATCH V7 06/16] Btrfs: subpagesize-blocksize: Write only dirty extent buffers belonging to a page

2014-09-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 --- fs/btrfs/disk-io.c | 20 ++-- fs/btrfs/extent_io.c | 300 --- 2 files changed, 250 insertions(+)

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

2014-09-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 Rajen

[RFC PATCH V7 16/16] Btrfs: subpagesize-blocksize: Track blocks of ordered extent submitted for write I/O.

2014-09-21 Thread Chandan Rajendra
In the subpagesize-blocksize scenario, the following command (with 4k as the PAGE_SIZE and 2k as the block size) can cause false accounting of blocks of an ordered extent that is written to disk: $ xfs_io -f -c "pwrite 0 10240" \ -c "sync_range 0 4096" \ -c "sync_range 8192 2048" \ -c "pwrite 1024

[RFC PATCH V7 14/16] Btrfs: subpagesize-blocksize: Explicitly Track I/O status of blocks of an ordered extent.

2014-09-21 Thread Chandan Rajendra
In subpagesize-blocksize scenario a page can have more than one block. So in addition to PagePrivate2 flag, we would have to track the I/O status of each block of a page to reliably mark the ordered extent as complete. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c| 327 +++

[RFC PATCH V7 11/16] Btrfs: subpagesize-blocksize: btrfs_page_mkwrite: Reserve space in sectorsized units.

2014-09-21 Thread Chandan Rajendra
In subpagesize-blocksize scenario, if i_size occurs in a block which is not the last block in the page, then the space to be reserved should be calculated appropriately. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 33 ++--- 1 file changed, 22 insertions(+),

[RFC PATCH V7 07/16] Btrfs: subpagesize-blocksize: Allow mounting filesystems where sectorsize != PAGE_SIZE

2014-09-21 Thread Chandan Rajendra
From: Chandra Seetharaman This patch allows mounting filesystems with blocksize smaller than the PAGE_SIZE. Signed-off-by: Chandra Seetharaman Signed-off-by: Chandan Rajendra --- fs/btrfs/disk-io.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.

[RFC PATCH V7 10/16] Btrfs: subpagesize-blocksize: fallocate: Work with sectorsized units.

2014-09-21 Thread Chandan Rajendra
While at it, this commit changes btrfs_truncate_page() to truncate sectorsized blocks instead of pages. Hence the function has been renamed to btrfs_truncate_block(). Signed-off-by: Chandan Rajendra --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 41 ++--- fs

[PATCH] btrfs: Fix the wrong condition judgment about subset extent map

2014-09-21 Thread Qu Wenruo
Previous commit: btrfs: Fix and enhance merge_extent_mapping() to insert best fitted extent map is using wrong condition to judgement whether the range is a subset of a existing extent map. This may cause bug in btrfs no-holes mode. This patch will correct the judgment and fix the bug. Signed-of

HOW ARE YOU?

2014-09-21 Thread Benjamin Siaka
Hello my Dear, I will greatly appreciate my correspondence meets you in good health condition. My name is Mr. Benjamin Siaka. I am seeking for your co-operation for investment partnership in your Country. I shall provide the FUND for the investment. When you acknowledged the receipt of this cor

Re: [PATCH] btrfs: Fix the wrong condition judgment about subset extent map

2014-09-21 Thread Miao Xie
This patch and the previous one(The following patch) also fixed a oops, which can be reproduced by LTP stress test(ltpstress.sh + fsstress). [PATCH] btrfs: Fix and enhance merge_extent_mapping() to insert best fitted extent map Thanks Miao On Mon, 22 Sep 2014 09:13:03 +0800, Qu Wenruo wrote: >