Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2018-09-28 Thread Chandan Rajendra
On Monday, January 29, 2018 2:36:15 PM IST Chandan Rajendra wrote: > On Wednesday, January 3, 2018 9:59:24 PM IST Josef Bacik wrote: > > On Wed, Jan 03, 2018 at 05:26:03PM +0100, Jan Kara wrote: > > > > > Oh ok well if that's the case then I'll fix this up to be a ra

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2018-01-29 Thread Chandan Rajendra
On Wednesday, January 3, 2018 9:59:24 PM IST Josef Bacik wrote: > On Wed, Jan 03, 2018 at 05:26:03PM +0100, Jan Kara wrote: > > Oh ok well if that's the case then I'll fix this up to be a ratio, test > everything, and send it along probably early next week. Thanks, > Hi Josef, Did you get a

Re: [PATCH V21 00/19] Allow I/O on blocks whose size is less than page size

2017-06-19 Thread Chandan Rajendra
On Sunday, October 2, 2016 6:54:09 PM IST Chandan Rajendra wrote: > Btrfs assumes block size to be the same as the machine's page > size. This would mean that a Btrfs instance created on a 4k page size > machine (e.g. x86) will not be mountable on machines with larger page > sizes

Re: [PATCH v3 2/2] Btrfs: compression must free at least PAGE_SIZE

2017-05-25 Thread Chandan Rajendra
On Sunday, May 21, 2017 12:10:39 AM IST Timofey Titovets wrote: > Btrfs already skip store of data where compression didn't free at least one > byte. > So make logic better and make check that compression free at least one > PAGE_SIZE, > because in another case it useless to store this data

Re: [PATCH 3/3] Btrfs: don't pass the inode through clean_io_failure

2017-05-09 Thread Chandan Rajendra
On Friday, May 05, 2017 11:57:15 AM Josef Bacik wrote: > Instead pass around the failure tree and the io tree. > The changes look fine, Reviewed-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> -- chandan -- To unsubscribe from this list: send the line "unsubscribe linux-b

Re: [PATCH 2/3] btrfs: remove inode argument from repair_io_failure

2017-05-09 Thread Chandan Rajendra
On Friday, May 05, 2017 11:57:14 AM Josef Bacik wrote: > Once we remove the btree_inode we won't have an inode to pass anymore, just > pass > the fs_info directly and the inum since we use that to print out the repair > message. > The changes look fine, Reviewed-by: Chandan

Re: [PATCH 1/3] Btrfs: replace tree->mapping with tree->private_data

2017-05-09 Thread Chandan Rajendra
be relatively straightforward. > The changes look fine, Reviewed-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> -- chandan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] generic/311: Disable dmesg check

2017-02-22 Thread Chandan Rajendra
On Monday, February 20, 2017 11:03:11 PM Anand Jain wrote: > > Hi Chandan, > > On 07/17/15 12:56, Chandan Rajendra wrote: > > When running generic/311 on Btrfs' subpagesize-blocksize patchset (on ppc64 > > with 4k sectorsize and 16k node/leaf size) I noticed the f

Re: [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range

2017-01-25 Thread Chandan Rajendra
ordered = btrfs_lookup_ordered_range(inode, page_start, page_end); > + ordered = btrfs_lookup_ordered_range(inode, page_start, PAGE_SIZE); > if (ordered) { > unlock_extent_cached(io_tree, page_start, page_end, > _state, GFP_NOFS); > Thanks for f

[PATCH] btrfs/012: Enable test to be executed on non-4k block size filesystems

2016-12-26 Thread Chandan Rajendra
To get the test to work on non-4k block sized filesystems, this commit obtains the block size of the Btrfs filesystem from $TEST_DIR. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- tests/btrfs/012 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH] Btrfs: Fix deadlock between direct IO and fast fsync

2016-12-23 Thread Chandan Rajendra
On Friday, December 23, 2016 04:18:00 PM Liu Bo wrote: > On Fri, Dec 23, 2016 at 05:27:55PM +0530, Chandan Rajendra wrote: > > On Friday, December 23, 2016 03:57:40 PM Chandan Rajendra wrote: > > > On Friday, December 23, 2016 03:00:18 PM Chandan Rajendra wrote: > > &g

Re: [PATCH] Btrfs: Fix deadlock between direct IO and fast fsync

2016-12-23 Thread Chandan Rajendra
On Friday, December 23, 2016 03:57:40 PM Chandan Rajendra wrote: > On Friday, December 23, 2016 03:00:18 PM Chandan Rajendra wrote: > > The following deadlock is seen when executing generic

Re: [PATCH] Btrfs: Fix deadlock between direct IO and fast fsync

2016-12-23 Thread Chandan Rajendra
On Friday, December 23, 2016 03:00:18 PM Chandan Rajendra wrote: > The following deadlock is seen when executing generic/113 test, > > > -+ >

[PATCH] Btrfs: Fix deadlock between direct IO and fast fsync

2016-12-23 Thread Chandan Rajendra
the ordered extents it creates. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5ca88f0..f796037 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/

Re: [PATCH v3 5/6] btrfs-progs: convert: Switch to new rollback function

2016-12-19 Thread Chandan Rajendra
rt and old convert. >(To be more specific, old convert is just a subset of more universal > new convert behavior) > >No extra work is needed any more, and we can even open the btrfs RO. Thanks for fixing this. The patchset works fine on ppc64 and x86_64. Tested-by: Ch

Re: [PATCH v2 2/3] btrfs-progs: convert: Rework rollback to handle new convert image

2016-12-15 Thread Chandan Rajendra
On Thursday, December 15, 2016 05:03:30 PM Qu Wenruo wrote: > Although commit 9c4b820412746b3 tried to make the rollback condition > less restrict, to co-operate with new rollback behavior, it's still too > restrict. > > If btrfs allocates a new data chunk, it's highly possible that the new >

Re: [PATCH 2/2] btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges

2016-12-13 Thread Chandan Rajendra
ee > data ranges reserved by previous btrfs_qgroup_reserve_data(). > So in above case, Task B will try to free 0 byte, so no underflow. > The changes look good to me. Also, I did not notice any regressions when executing fstests with the patch applied. Reviewed-by: Chandan Rajend

Re: [PATCH 1/2] btrfs: qgroup: Introduce extent changeset for qgroup reserve functions

2016-12-13 Thread Chandan Rajendra
served space underflow. The changes look good to me. Reviewed-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> -- chandan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] btrfs-convert: Fix migrate_super_block() to work with 64k sectorsize

2016-12-08 Thread Chandan Rajendra
On Friday, December 09, 2016 09:09:29 AM Qu Wenruo wrote: > > At 12/08/2016 09:56 PM, Chandan Rajendra wrote: > > migrate_super_block() uses sectorsize to refer to the size of the > > superblock. Hence on 64k sectorsize filesystems, it ends up computing > > checksum beyon

Re: [PATCH 1/2] btrfs-progs: btrfs-convert: Prevent accounting blocks beyond end of device

2016-12-08 Thread Chandan Rajendra
On Friday, December 09, 2016 09:03:57 AM Qu Wenruo wrote: > Hi Chandan, > > Thanks for the patch. > > At 12/08/2016 09:56 PM, Chandan Rajendra wrote: > > When looping across data block bitmap, __ext2_add_one_block() may add > > blocks which do not exist on the u

Re: [PATCH 1/2] btrfs: qgroup: Introduce extent changeset for qgroup reserve functions

2016-12-08 Thread Chandan Rajendra
On Friday, December 02, 2016 10:03:06 AM Qu Wenruo wrote: > Introduce a new parameter, struct extent_changeset for > btrfs_qgroup_reserved_data() and its callers. > > Such extent_changeset was used in btrfs_qgroup_reserve_data() to record > which range it reserved in current reserve, so it can

[PATCH 2/2] btrfs-convert: Fix migrate_super_block() to work with 64k sectorsize

2016-12-08 Thread Chandan Rajendra
of the underlying filesystem. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- convert/main.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/convert/main.c b/convert/main.c index 1148a36..fd6f77b 100644 --- a/convert/main.c +++ b/convert/

[PATCH 1/2] btrfs-progs: btrfs-convert: Prevent accounting blocks beyond end of device

2016-12-08 Thread Chandan Rajendra
. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- convert/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/convert/main.c b/convert/main.c index 4b4cea4..1148a36 100644 --- a/convert/main.c +++ b/convert/main.c @@ -1525,6 +1525,9 @@ static int __ext2_add_one

[PATCH V2] btrfs-progs: Use helper function to access btrfs_super_block->sys_chunk_array_size

2016-12-01 Thread Chandan Rajendra
ed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- utils.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils.c b/utils.c index d0189ad..74dde1e 100644 --- a/utils.c +++ b/utils.c @@ -562,14 +562,18 @@ static int insert_temp_chunk_item(int fd, struct e

Re: Qgroup accounting issue on kdave/for-next branch

2016-11-29 Thread Chandan Rajendra
On Tuesday, November 29, 2016 04:41:41 PM Qu Wenruo wrote: > > At 11/29/2016 04:21 PM, Chandan Rajendra wrote: > > On Tuesday, November 29, 2016 03:55:53 PM Qu Wenruo wrote: > >> At 11/29/2016 02:36 PM, Chandan Rajendra wrote: > >>> When executing btrfs/

[PATCH] btrfs-progs: Use helper functions to access btrfs_super_block->sys_chunk_array_size

2016-11-29 Thread Chandan Rajendra
ed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- utils.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.c b/utils.c index d0189ad..7b17b20 100644 --- a/utils.c +++ b/utils.c @@ -562,14 +562,17 @@ static int insert_temp_chunk_item(int fd, struct extent

Re: Qgroup accounting issue on kdave/for-next branch

2016-11-29 Thread Chandan Rajendra
On Tuesday, November 29, 2016 03:55:53 PM Qu Wenruo wrote: > At 11/29/2016 02:36 PM, Chandan Rajendra wrote: > > When executing btrfs/126 test on kdave/for-next branch on a ppc64 guest, I > > noticed the following call trace. > > > > [ 77.335

Qgroup accounting issue on kdave/for-next branch

2016-11-28 Thread Chandan Rajendra
When executing btrfs/126 test on kdave/for-next branch on a ppc64 guest, I noticed the following call trace. [ 77.335887] [ cut here ] [ 77.336115] WARNING: CPU: 0 PID: 8325 at /root/repos/linux/fs/btrfs/qgroup.c:2443 .btrfs_qgroup_free_refroot+0x188/0x220 [

[PATCH V21 18/19] Btrfs: subpage-blocksize: __btrfs_lookup_bio_sums: Set offset when moving to a new bio_vec

2016-10-02 Thread Chandan Rajendra
hen we move to the next bvec of the bio. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/file-item.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index d0d571c..8fc09c1 100644 --- a/fs/btrfs/fi

[PATCH V21 19/19] Btrfs: subpage-blocksize: Disable compression

2016-10-02 Thread Chandan Rajendra
-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 8 +++- fs/btrfs/super.c | 19 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0fdc0a0..862d97b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/i

[PATCH V21 17/19] Btrfs: subpage-blocksize: Make file extent relocate code subpage blocksize aware

2016-10-02 Thread Chandan Rajendra
The file extent relocation code currently assumes blocksize to be same as PAGE_SIZE. This commit adds code to support subpage blocksize scenario. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/relocation.c | 90

[PATCH V21 16/19] Btrfs: subpage-blocksize: btrfs_clone: Flush dirty blocks of a page that do not map the clone range

2016-10-02 Thread Chandan Rajendra
such dirty blocks to be flushed to disk before performing the clone operation. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 16 1 file changed, 16 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index cf13029..0fdc0a0

[PATCH V21 13/19] Btrfs: subpage-blocksize: btrfs_punch_hole: Fix uptodate blocks check

2016-10-02 Thread Chandan Rajendra
In case of subpage-blocksize, the file blocks to be punched may map only part of a page. For file blocks inside such pages, we need to check for the presence of BLK_STATE_UPTODATE flag. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/file.

[PATCH V21 12/19] Btrfs: subpage-blocksize: Explicitly track I/O status of blocks of an ordered extent.

2016-10-02 Thread Chandan Rajendra
In subpage-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 <chan...@linux.vnet.ibm.com> --- fs

[PATCH V21 06/19] Btrfs: subpage-blocksize: Fix whole page write

2016-10-02 Thread Chandan Rajendra
to by page->private or by the PG_uptodate flag. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 114 +++--- fs/btrfs/file.c | 16 +++ fs/btrfs/inode.c | 69 --

[PATCH V21 08/19] Btrfs: subpage-blocksize: Execute sanity tests on all possible block sizes

2016-10-02 Thread Chandan Rajendra
This commit executes sanity tests for all valid sectorsize/nodesize combinations. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/tests/btrfs-tests.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs

[PATCH V21 05/19] Btrfs: subpage-blocksize: Fix whole page read.

2016-10-02 Thread Chandan Rajendra
the io_lock only when the last block of the bio_vec is being processed. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 299 +-- fs/btrfs/extent_io.h | 76 - fs/btrfs/inode.c | 13 +

[PATCH V21 14/19] Btrfs: subpage-blocksize: Fix file defragmentation code

2016-10-02 Thread Chandan Rajendra
This commit gets file defragmentation code to work in subpage-blocksize scenario. It does this by keeping track of page offsets that mark block boundaries and passing them as arguments to the functions that implement the defragmentation logic. Signed-off-by: Chandan Rajendra <c

[PATCH V21 04/19] Btrfs: Remove extent_io_tree's track_uptodate member

2016-10-02 Thread Chandan Rajendra
We now track block uptodate status using a page's PG_Uptodate flag. Hence this commit removes the now unused extent_io_tree->track_uptodate member. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/disk-io.c | 1 - fs/btrfs/extent_io.h | 1 - fs/btrfs/inode.

[PATCH V21 15/19] Btrfs: subpage-blocksize: Enable dedupe ioctl

2016-10-02 Thread Chandan Rajendra
ock size < page size". Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 4077fc1..cf13029 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.

[PATCH V21 11/19] Btrfs: subpage-blocksize: Deal with partial ordered extent allocations.

2016-10-02 Thread Chandan Rajendra
In subpage-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 pages to be submitted. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs

[PATCH V21 09/19] Btrfs: subpage-blocksize: Compute free space tree BITMAP_RANGE based on sectorsize

2016-10-02 Thread Chandan Rajendra
The default bitmap length computation in free space tree sanity tests assumes PAGE_SIZE as the sectorsize. This commit fixes this by using a variable sectorsize to calculate BITMAP_RANGE. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/tests/free-space-tree-tests.

[PATCH V21 10/19] Btrfs: subpage-blocksize: Allow mounting filesystems where sectorsize < PAGE_SIZE

2016-10-02 Thread Chandan Rajendra
to be able to mount and use filesystems with 2048 bytes as the sectorsize. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/disk-io.c | 21 - fs/btrfs/disk-io.h | 2 +- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/extent_io.c | 3 +-- fs

[PATCH V21 07/19] Btrfs: subpage-blocksize: Use kmalloc()-ed memory to hold metadata blocks

2016-10-02 Thread Chandan Rajendra
igned-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ctree.h | 6 +- fs/btrfs/disk-io.c | 27 +++--- fs/btrfs/extent_io.c | 204 +-- fs/btrfs/extent_io.h | 8 +- fs/btrfs/tests/ex

[PATCH V21 01/19] Btrfs: subpage-blocksize: extent_clear_unlock_delalloc: Prevent page from being unlocked more than once

2016-10-02 Thread Chandan Rajendra
d by a future commit that gets compression to work in subpage-blocksize scenario. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 16 +++ fs/btrfs/extent_io.h | 5 ++-- fs/btrfs/inode.c | 78 +--- 3

[PATCH V21 03/19] Btrfs: subpage-blocksize: Use PG_Uptodate flag to track block uptodate status

2016-10-02 Thread Chandan Rajendra
of blocksize < PAGE_SIZE. We will continue to use PG_Uptodate flag to track uptodate status for blocksize == PAGE_SIZE scenario. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 61 +++- fs/btrfs/extent_

[PATCH V21 02/19] Btrfs: subpage-blocksize: Make sure delalloc range intersects with the locked page's range

2016-10-02 Thread Chandan Rajendra
check to make sure that the delalloc range starts from within the file range mapped by the page. Reviewed-by: Josef Bacik <jba...@fb.com> Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(

[PATCH V21 00/19] Allow I/O on blocks whose size is less than page size

2016-10-02 Thread Chandan Rajendra
for the presence of BLK_STATE_UPTODATE flags for blocks in pages which partially map the file range being punched. Changes from V11: 1. Addressed the review comments provided by Liu Bo for version V11. 2. Fixed file defragmentation code to work in subpagesize-blocksize scenario. 3. Many &

Re: [PATCH v2 0/6] Btrfs: free space tree and sanity test fixes

2016-09-28 Thread Chandan Rajendra
I have also executed generic/127 on a filesystem created using "fragment-free-space-tree.py" that you had provided sometime ago. I did not notice any regressions during the test runs. Tested-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> > > I'm working on the btrfs-progs follo

[PATCH] Btrfs: Free fs_info->eb_info only when it holds a valid pointer

2016-09-14 Thread Chandan Rajendra
ointer dereference. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ctree.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ee6956c..33ce069 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2

Re: [PATCH 6/7] Btrfs: kill the btree_inode

2016-09-07 Thread Chandan Rajendra
On Friday, September 02, 2016 03:40:05 PM Josef Bacik wrote: Please find my comment inlined below, > In order to more efficiently support sub-page blocksizes we need to stop > allocating pages from pagecache for our metadata. Instead switch to using the > account_metadata* counters for making

Re: [PATCH V20 04/19] Btrfs: subpage-blocksize: Define extent_buffer_head

2016-07-27 Thread Chandan Rajendra
On Tuesday, July 26, 2016 01:42:08 PM Josef Bacik wrote: > On 07/04/2016 12:34 AM, Chandan Rajendra wrote: > > 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. > > &

Re: [PATCH V20 01/19] Btrfs: subpage-blocksize: Fix whole page read.

2016-07-27 Thread Chandan Rajendra
On Tuesday, July 26, 2016 12:11:49 PM Josef Bacik wrote: > On 07/04/2016 12:34 AM, Chandan Rajendra wrote: > > For the subpage-blocksize scenario, a page can contain multiple > > blocks. In such cases, this patch handles reading data from files. > > > > To track the

Re: [PATCH 0/3] Btrfs: fix free space tree bitmaps+tests on big-endian systems

2016-07-19 Thread Chandan Rajendra
On Monday, July 18, 2016 03:31:04 PM Omar Sandoval wrote: > On Mon, Jul 18, 2016 at 02:43:26PM -0400, Chris Mason wrote: > > > > > > On 07/17/2016 08:19 AM, Chandan Rajendra wrote: > > > On Friday, July 15, 2016 12:15:15 PM Omar Sandoval wrote: > > > >

Re: [PATCH 0/3] Btrfs: fix free space tree bitmaps+tests on big-endian systems

2016-07-17 Thread Chandan Rajendra
On Friday, July 15, 2016 12:15:15 PM Omar Sandoval wrote: > On Fri, Jul 15, 2016 at 12:34:10PM +0530, Chandan Rajendra wrote: > > On Thursday, July 14, 2016 07:47:04 PM Chris Mason wrote: > > > On 07/14/2016 07:31 PM, Omar Sandoval wrote: > > > > From:

Re: [PATCH] btrfs: allocate exact page array size in extent_buffer

2016-07-15 Thread Chandan Rajendra
On Friday, July 15, 2016 11:44:06 AM David Sterba wrote: > On Fri, Jul 15, 2016 at 11:47:07AM +0530, Chandan Rajendra wrote: > > On Thursday, July 14, 2016 02:29:32 PM David Sterba wrote: > > > The calculation of extent_buffer::pages size was done for 4k PAGE_SIZE, > > >

Re: [PATCH 0/3] Btrfs: fix free space tree bitmaps+tests on big-endian systems

2016-07-15 Thread Chandan Rajendra
On Thursday, July 14, 2016 07:47:04 PM Chris Mason wrote: > On 07/14/2016 07:31 PM, Omar Sandoval wrote: > > From: Omar Sandoval > > > > So it turns out that the free space tree bitmap handling has always been > > broken on big-endian systems. Totally my bad. > > > > Patch 1 fixes

Re: [PATCH] btrfs: allocate exact page array size in extent_buffer

2016-07-15 Thread Chandan Rajendra
On Thursday, July 14, 2016 02:29:32 PM David Sterba wrote: > The calculation of extent_buffer::pages size was done for 4k PAGE_SIZE, > but this wastes 15 unused pointers on arches with large page size. Eg. > on ppc64 this gives 15 * 8 = 120 bytes. > The non PAGE_SIZE aligned extent buffer usage

Re: A lot warnings in dmesg while running thunderbird

2016-07-10 Thread Chandan Rajendra
On Friday, July 08, 2016 12:02:35 PM Chris Mason wrote: > > On 07/08/2016 11:02 AM, Gabriel C wrote: > > On 08.07.2016 14:41, Chris Mason wrote: > > > >> > >> > >> On 07/08/2016 05:57 AM, Gabriel C wrote: > >>> 2016-07-07 21:21 GMT+02:00 Chris Mason : > > > On

[PATCH V20 14/19] Btrfs: subpage-blocksize: Enable dedupe ioctl

2016-07-03 Thread Chandan Rajendra
ock size < page size". Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index fb92566..5d9062e 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.

[PATCH V20 19/19] Btrfs: subpage-blocksize: Rate limit scrub error message

2016-07-03 Thread Chandan Rajendra
Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 86270c6..68c8a09 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -3856,7 +3856,7 @@ int btrfs_

[PATCH V20 09/19] Btrfs: subpage-blocksize: Explicitly track I/O status of blocks of an ordered extent.

2016-07-03 Thread Chandan Rajendra
In subpage-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 <chan...@linux.vnet.ibm.com> --- fs

[PATCH V20 10/19] Btrfs: subpage-blocksize: btrfs_punch_hole: Fix uptodate blocks check

2016-07-03 Thread Chandan Rajendra
In case of subpage-blocksize, the file blocks to be punched may map only part of a page. For file blocks inside such pages, we need to check for the presence of BLK_STATE_UPTODATE flag. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/file.

[PATCH V20 12/19] Revert "btrfs: fix lockups from btrfs_clear_path_blocking"

2016-07-03 Thread Chandan Rajendra
The patch "Btrfs: subpage-blocksize: Prevent writes to an extent buffer when PG_writeback flag is set" requires btrfs_try_tree_write_lock() to be a true try lock w.r.t to both spinning and blocking locks. During 2015's Vault Conference Btrfs meetup, Chris Mason had suggested that he will write up

[PATCH V20 13/19] Btrfs: subpage-blocksize: Fix file defragmentation code

2016-07-03 Thread Chandan Rajendra
This commit gets file defragmentation code to work in subpage-blocksize scenario. It does this by keeping track of page offsets that mark block boundaries and passing them as arguments to the functions that implement the defragmentation logic. Signed-off-by: Chandan Rajendra <c

[PATCH V20 17/19] Btrfs: subpage-blocksize: __btrfs_lookup_bio_sums: Set offset when moving to a new bio_vec

2016-07-03 Thread Chandan Rajendra
hen we move to the next bvec of the bio. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/file-item.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 62a81ee..fb6a7e8 100644 --- a/fs/btrfs/fi

[PATCH V20 15/19] Btrfs: subpage-blocksize: btrfs_clone: Flush dirty blocks of a page that do not map the clone range

2016-07-03 Thread Chandan Rajendra
such dirty blocks to be flushed to disk before performing the clone operation. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 16 1 file changed, 16 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 5d9062e..0ef3c32

[PATCH V20 16/19] Btrfs: subpage-blocksize: Make file extent relocate code subpage blocksize aware

2016-07-03 Thread Chandan Rajendra
The file extent relocation code currently assumes blocksize to be same as PAGE_SIZE. This commit adds code to support subpage blocksize scenario. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/relocation.c | 89

[PATCH V20 11/19] Btrfs: subpage-blocksize: Prevent writes to an extent buffer when PG_writeback flag is set

2016-07-03 Thread Chandan Rajendra
. Hence this patch adds a new flag (i.e. EXTENT_BUFFER_HEAD_WRITEBACK) and corresponding code to track the writeback status of the page and to prevent writes to any of the extent buffers mapped to the page while writeback is going on. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.

[PATCH V20 18/19] Btrfs: subpage-blocksize: Disable compression

2016-07-03 Thread Chandan Rajendra
-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 8 +++- fs/btrfs/super.c | 20 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0ef3c32..d7159db 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/i

[PATCH V20 03/19] Btrfs: subpage-blocksize: Make sure delalloc range intersects with the locked page's range

2016-07-03 Thread Chandan Rajendra
check to make sure that the delalloc range starts from within the file range mapped by the page. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrf

[PATCH V20 07/19] Btrfs: subpage-blocksize: Allow mounting filesystems where sectorsize < PAGE_SIZE

2016-07-03 Thread Chandan Rajendra
to be able to mount and use filesystems with 2048 bytes as the sectorsize. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/disk-io.c | 21 - fs/btrfs/disk-io.h | 2 +- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/extent_io.c | 3 +-- fs

[PATCH V20 08/19] Btrfs: subpage-blocksize: Deal with partial ordered extent allocations.

2016-07-03 Thread Chandan Rajendra
In subpage-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 pages to be submitted. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs

[PATCH V20 02/19] Btrfs: subpage-blocksize: Fix whole page write

2016-07-03 Thread Chandan Rajendra
->private. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 150 -- fs/btrfs/file.c | 17 ++ fs/btrfs/inode.c | 75 + fs/btrfs/relocation.c | 3 + 4 files cha

[PATCH V20 00/19] Allow I/O on blocks whose size is less than page size

2016-07-03 Thread Chandan Rajendra
E_UPTODATE flags for blocks in pages which partially map the file range being punched. Changes from V11: 1. Addressed the review comments provided by Liu Bo for version V11. 2. Fixed file defragmentation code to work in subpagesize-blocksize scenario. 3. Many "hard to reproduce" bugs

[PATCH V20 04/19] Btrfs: subpage-blocksize: Define extent_buffer_head

2016-07-03 Thread Chandan Rajendra
' to 'struct extent_buffer_head' Also, this patch moves EXTENT_BUFFER_TREE_REF, EXTENT_BUFFER_DUMMY and EXTENT_BUFFER_IN_TREE flags from extent_buffer->ebflags to extent_buffer_head->bflags. Reviewed-by: Liu Bo <bo.li@oracle.com> Signed-off-by: Chandan Rajendra <chan...@lin

[PATCH V20 05/19] Btrfs: subpage-blocksize: Read tree blocks whose size is < PAGE_SIZE

2016-07-03 Thread Chandan Rajendra
In the case of subpage-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 | 52 - fs

[PATCH V20 01/19] Btrfs: subpage-blocksize: Fix whole page read.

2016-07-03 Thread Chandan Rajendra
the io_lock only when the last block of the bio_vec is being processed. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 371 --- fs/btrfs/extent_io.h | 74 +- fs/btrfs/inode.c | 16 +-

[PATCH V20 06/19] Btrfs: subpage-blocksize: Write only dirty extent buffers belonging to a page

2016-07-03 Thread Chandan Rajendra
For the subpage-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 | 32 +++--- fs/btrfs/extent_io.c | 277 +-- 2

Re: btrfs/113: Assertion failure

2016-07-02 Thread Chandan Rajendra
On Friday, July 01, 2016 04:25:52 PM Josef Bacik wrote: > On 07/01/2016 12:11 PM, Chandan Rajendra wrote: > > Sorry, Forgot to add the mailing list to CC. Doing it now ... > > > >> While running btrfs/113, I see the following call trace, > >> > >> [ 182

Re: btrfs/113: Assertion failure

2016-07-01 Thread Chandan Rajendra
Sorry, Forgot to add the mailing list to CC. Doing it now ... > While running btrfs/113, I see the following call trace, > > [ 182.272009] BTRFS: assertion failed: !current->journal_info || flush != > BTRFS_RESERVE_FLUSH_ALL, file: > /home/chandan/repos/linux/fs/btrfs/extent-tree.c, line:

Re: [PATCH] Btrfs: fix double free of fs root

2016-06-30 Thread Chandan Rajendra
e warning. > > Instead of reset root->anon_dev to 0 after free_anon_bdev(), we can let > btrfs_init_fs_root() return directly since its callers have already done > the free job by calling free_fs_root(). Looks good to me. Thanks for fixing this. Reviewed-by: Chandan R

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-24 Thread Chandan Rajendra
On Saturday, June 25, 2016 09:22:44 AM Qu Wenruo wrote: > > On 06/24/2016 05:29 PM, Chandan Rajendra wrote: > > On Friday, June 24, 2016 10:50:41 AM Qu Wenruo wrote: > >> Hi Chandan, David, > >> > >> When I'm trying to rebase dedupe patchset on top of Chad

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-24 Thread Chandan Rajendra
t; BTRFS: space_info total=8388608, used=344064, pinned=0, reserved=0, > may_use=409600, readonly=0 > -- > > And at rmmod time, btrfs will detect extent_state leak, whose length is > always 4095 (page size - 1). > > Hope this will help, and I'm willing to help to fix th

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-23 Thread Chandan Rajendra
On Friday, June 24, 2016 10:50:41 AM Qu Wenruo wrote: > Hi Chandan, David, > > When I'm trying to rebase dedupe patchset on top of Chadan's sub page > size patchset (using David's for-next-test-20160620), although the > rebase itself is quite simple, but I'm afraid that I found some bugs for >

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-23 Thread Chandan Rajendra
On Thursday, June 23, 2016 02:17:38 PM David Sterba wrote: > On Tue, Jun 21, 2016 at 10:25:19PM +0530, Chandan Rajendra wrote: > > > > I'm completely OK to do the rebase, but since I don't have 64K page > > > > size > > > > machine to test the rebase, we c

[PATCH] Btrfs: Force stripesize to the value of sectorsize

2016-06-23 Thread Chandan Rajendra
r of 2. Later, it unconditionally sets btrfs_root->stripesize to sectorsize. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/disk-io.c | 6 ++ fs/btrfs/volumes.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-21 Thread Chandan Rajendra
On Tuesday, June 21, 2016 11:34:57 AM David Sterba wrote: > On Tue, Jun 21, 2016 at 05:26:23PM +0800, Qu Wenruo wrote: > > > Yeah, but I'm now concerned about the way both will be integrated in the > > > development or preview branches, not really the functionality itself. > > > > > > Now the

Re: [PATCH V19 05/19] Btrfs: subpage-blocksize: Read tree blocks whose size is < PAGE_SIZE

2016-06-20 Thread Chandan Rajendra
On Monday, June 20, 2016 01:54:05 PM David Sterba wrote: > On Tue, Jun 14, 2016 at 12:41:02PM +0530, Chandan Rajendra wrote: > > In the case of subpage-blocksize, this patch makes it possible to read > > only a single metadata block from the disk instead of all the metadata >

[PATCH V2] Btrfs-progs: Initialize stripesize to the value of sectorsize

2016-06-16 Thread Chandan Rajendra
check_super() function returns an error code (due to stripesize not being set to 4096) and hence check_mounted_where() function treats /dev/loop1 as a disk containing a filesystem other than Btrfs. Hence as a workaround this commit allows 4096 as a valid stripesize. Signed-off-by: Chandan Rajendra <c

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-16 Thread Chandan Rajendra
On Thursday, June 16, 2016 10:01:41 AM Liu Bo wrote: > On Thu, Jun 16, 2016 at 01:53:59PM +0530, Chandan Rajendra wrote: > > On Wednesday, June 15, 2016 05:09:55 PM Liu Bo wrote: > > > On Wed, Jun 15, 2016 at 03:50:17PM +0530, Chandan Rajendra wrote: > > > > On Wednes

[PATCH] Btrfs-progs: Initialize stripesize to the value of sectorsize

2016-06-16 Thread Chandan Rajendra
check_super() function returns an error code (due to stripesize not being set to 4096) and hence check_mounted_where() function treats /dev/loop1 as a disk containing a filesystem other than Btrfs. Hence as a workaround this commit allows 4096 as a valid stripesize. Signed-off-by: Chandan Rajendra <c

[PATCH] Btrfs: btrfs_check_super_valid: Allow 4096 as stripesize

2016-06-16 Thread Chandan Rajendra
bytes. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/disk-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1142127..7f92b4f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -4139,7 +

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-16 Thread Chandan Rajendra
On Wednesday, June 15, 2016 05:09:55 PM Liu Bo wrote: > On Wed, Jun 15, 2016 at 03:50:17PM +0530, Chandan Rajendra wrote: > > On Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote: > > > Hello Liu Bo, > > > > > > We have to fix the foll

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-15 Thread Chandan Rajendra
On Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote: > Hello Liu Bo, > > We have to fix the following check in check_super() as well, > >if (btrfs_super_stripesize(sb) != 4096) { > error("invalid stripesize %u"

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-14 Thread Chandan Rajendra
On Tuesday, June 14, 2016 02:33:43 PM Liu Bo wrote: > Right now stripesize is set to 4096 while sectorsize is set to > max(4096, pagesize). However, kernel requires super_stripesize > to match with sectorsize. > > Reported-by: Eryu Guan > Signed-off-by: Liu Bo

[PATCH V19 17/19] Btrfs: subpage-blocksize: Make file extent relocate code subpage blocksize aware

2016-06-14 Thread Chandan Rajendra
The file extent relocation code currently assumes blocksize to be same as PAGE_SIZE. This commit adds code to support subpage blocksize scenario. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/relocation.c | 56 ++--

[PATCH V19 11/19] Btrfs: subpage-blocksize: Prevent writes to an extent buffer when PG_writeback flag is set

2016-06-14 Thread Chandan Rajendra
. Hence this patch adds a new flag (i.e. EXTENT_BUFFER_HEAD_WRITEBACK) and corresponding code to track the writeback status of the page and to prevent writes to any of the extent buffers mapped to the page while writeback is going on. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.

[PATCH V19 13/19] Btrfs: subpage-blocksize: Fix file defragmentation code

2016-06-14 Thread Chandan Rajendra
This commit gets file defragmentation code to work in subpage-blocksize scenario. It does this by keeping track of page offsets that mark block boundaries and passing them as arguments to the functions that implement the defragmentation logic. Signed-off-by: Chandan Rajendra <c

[PATCH V19 14/19] Btrfs: subpage-blocksize: extent_clear_unlock_delalloc: Prevent page from being unlocked more than once

2016-06-14 Thread Chandan Rajendra
d by a future commit that gets compression to work in subpage-blocksize scenario. Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com> --- fs/btrfs/extent_io.c | 16 ++ fs/btrfs/extent_io.h | 5 ++-- fs/btrfs/inode.c | 84 ++-- 3

  1   2   3   4   5   6   7   >