Hi,
On Fri, Sep 02, 2016 at 01:26:10AM -0400, Jeff Mahoney wrote:
> On 8/23/16 6:22 PM, Liu Bo wrote:
> > Right now we treat leaf which has zero item as a valid one
> > because we could have an empty tree, that is, a root that is
> > also a leaf without any item, howe
je...@suse.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/disk-io.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 9367c31..b401e6d 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -57
On Fri, Sep 02, 2016 at 04:58:43PM +0200, ste...@srv1.eu wrote:
> Hi,
>
> since a few weeks ago, my BTRFS (the root file system) sporadically crashes
> leaving a "kernel BUG" message in dmesg. I also noticed some files behaving
> like this:
>
> $ ls -lai
> ls: cannot access 'nlpsolver.jar':
On Thu, Sep 01, 2016 at 08:32:00AM +0800, Qu Wenruo wrote:
>
>
> At 09/01/2016 07:43 AM, Liu Bo wrote:
> > Qgroup function may overwrite the saved error 'err' with 0
> > in case quota is not enabled, and this ends up with a
> > endless loop in balance because we
Qgroup function may overwrite the saved error 'err' with 0
in case quota is not enabled, and this ends up with a
endless loop in balance because we keep going back to balance
the same block group.
It really should use 'ret' instead.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs
, and
global_block_rsv.space_info points to the latter one, but all bytes
from block_group contributes to the mixed space_info, thus all the
allocation will fail with ENOSPC.
This adds a check for the above case.
Reported-by: Vegard Nossum <vegard.nos...@oracle.com>
Signed-off-by: Liu Bo
Hi David,
On Wed, Aug 03, 2016 at 12:33:01PM -0700, Liu Bo wrote:
> So we can read a btree block via readahead or intentional read,
> and we can end up with a memory leak when something happens as
> follows,
> 1) readahead starts to read block A but does not wait for read
>
On Wed, Aug 24, 2016 at 09:54:16AM +0100, Filipe Manana wrote:
> On Wed, Aug 24, 2016 at 5:13 AM, Qu Wenruo <quwen...@cn.fujitsu.com> wrote:
> > The following commit introduced the extent map leak:
> > commit 6fb37b756acce6d6e045f79c3764206033f617b4
> > Author: L
On Thu, Aug 18, 2016 at 03:30:06PM -0400, Josef Bacik wrote:
> We need to call free_extent_map() on the em we look up.Btrfs: fix em leak in
> find_first_block_group
>
> We need to call free_extent_map() on the em we look up.
Thanks for fixing it.
Reviewed-by: Liu Bo <bo.li
s adds the check
for btree's node nritems so that we stop reading block when
when something is wrong.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - remove unnecessary "noinline"
- fix to do the proper check as BTRFS_NODEPTRS_PER_BLOCK(root) is inclusive
and nr is unsigned.
f
On Tue, Aug 16, 2016 at 06:50:00PM +0200, David Sterba wrote:
> On Wed, Aug 03, 2016 at 12:57:28PM -0700, Liu Bo wrote:
> > When btree node (level = 1) has nritems which equals to zero,
> > we can end up with panic due to insert_ptr()'s
> >
> > BUG_ON(slot > nrit
sed in cleanup_transaction(), we end up with memory leak
of these dirty block group cache.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - remove the 'return' when dirty_bgs is empty because there
might be block group in list io_bgs.
- remove unnecessary '\n' in btrfs_
Hi David,
On Fri, Aug 19, 2016 at 01:28:23PM +0200, David Sterba wrote:
> On Thu, Jul 21, 2016 at 02:33:19PM -0700, Liu Bo wrote:
> > > > update_block_group() is the only producer to add block group cache to
> > > > dirty_bgs list, and if btrfs_run_delayed_ref
by
setup_inline_extent_backref().
This makes us check the situation as a corruption if leaf is
not its own root.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: fix code style.
fs/btrfs/disk-io.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-
On Tue, Aug 16, 2016 at 07:07:28PM +0200, David Sterba wrote:
> On Wed, Aug 03, 2016 at 09:57:08PM -0700, Liu Bo wrote:
> > Right now we treat leaf which has zero item as a valid one
> > because we could have an empty tree, that is, a root that is
> > also a leaf with
by
setup_inline_extent_backref().
This makes us check the situation as a corruption if leaf is
not its own root.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/disk-io.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/dis
s adds the check
for btree's node nritems so that we stop reading block when
when something is wrong.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/disk-io.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 37d1780..a5
y 2) so we has to readpage on the page, we get
the wrong eb->io_pages which results in a memory leak of
this block.
This fixes the problem by firstly getting all pages's locking and
then checking pages' uptodate bit.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/ext
51/
This add comments to clarify do_chunk_alloc()'s return value.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: Since there is already a patch fixing the problem, lets do the
comment part separately.
fs/btrfs/extent-tree.c | 9 +
1 file changed, 9 insertions(+)
diff --
return error properly.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: use btrfs_warn with more debugging information instead of WARN_ONCE.
v3: give a short summary about what happens when the error occurs and
add a ASSERT(0).
v4: remove ASSERT(0).
fs/btrfs/raid56.c | 5 -
1 file c
On Fri, Jul 29, 2016 at 07:01:50PM +0200, David Sterba wrote:
> On Thu, Jul 28, 2016 at 11:49:14AM -0700, Liu Bo wrote:
> > > For reviewers - this came up before here:
> > > https://patchwork.kernel.org/patch/7778651/
David, this patch made a mistake in commit log.
On Thu, Jul 28, 2016 at 03:36:53PM +, Holger Hoffstätte wrote:
> On Wed, 27 Jul 2016 18:42:03 -0700, Liu Bo wrote:
>
> > Function start_transaction() can return ERR_PTR(1) when flush is
> > BTRFS_RESERVE_FLUSH_LIMIT, so the call graph is
> >
> > start
on() usually just
do the IS_ERR() check which ERR_PTR(1) can pass, then it'll get
a panic when dereferencing a pointer which is ERR_PTR(1).
This makes flush_space() translate 'ret = 1' to 'ret = 0'.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
We found this 'NULL pointer dereference' on
return error properly.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: use btrfs_warn with more debugging information instead of WARN_ONCE.
v3: - give a short summary about what happens when the error occurs.
- add a ASSERT() which only takes effect for developers.
fs/btrfs/raid56
On Tue, Jul 26, 2016 at 06:58:42PM +0200, David Sterba wrote:
> On Wed, Jun 29, 2016 at 05:57:56PM -0700, Liu Bo wrote:
> > This BUG() has been triggered by a fuzz testing image, but in fact
> > btrfs can handle this gracefully by returning -EIO.
> >
> > Thus, use
On Thu, Jul 21, 2016 at 03:17:41PM -0400, Chris Mason wrote:
>
>
> On 07/21/2016 03:03 PM, Liu Bo wrote:
> > On Thu, Jul 21, 2016 at 11:32:26AM -0400, Chris Mason wrote:
> > >
> > >
> > > On 07/20/2016 08:44 PM, Liu Bo wrote:
> > > > Whil
On Thu, Jul 21, 2016 at 11:32:26AM -0400, Chris Mason wrote:
>
>
> On 07/20/2016 08:44 PM, Liu Bo wrote:
> > While processing delayed refs, we may update block group's statistics
> > and attach it to cur_trans->dirty_bgs, and later writing dirty block
> > group
sed in cleanup_transaction(), we end up with memory leak
of these dirty block group cache.
Since btrfs_start_dirty_block_groups() doesn't make it go to the commit
critical section, this also adds the cleanup work inside it.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - remove th
sed in cleanup_transaction(), we end up with memory leak
of these dirty block group cache.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/disk-io.c | 76 ++
fs/btrfs/disk-io.h | 2 ++
fs/btrfs/extent-tree.c | 2 ++
3 file
This adds several ASSERT()' s to report memory leak of block group cache.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent-tree.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 82b912a..50bd683 100644
--- a/fs
oot in btrfs_drop_snapshots()
because its caller, merge_reloc_roots(), still needs to access it to
cleanup reloc_root's rbtree.
This makes us free reloc_root when we're going to free fs/file roots.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/disk-io.c | 9 -
1 file changed, 8 i
hat is out of our search range and
we end up with a negative @real_len and printing all mapping infos till
the disk end.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
btrfs-map-logical.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index
On Thu, Jul 14, 2016 at 04:05:00PM -0700, Liu Bo wrote:
> On Tue, Jul 12, 2016 at 11:40:13PM +0200, Goffredo Baroncelli wrote:
> > Hi All,
> >
> > the enclosed patch adds a new btrfs sub command: "btrfs inspect
> > physical-find". The aim of thi
On Tue, Jul 12, 2016 at 11:40:13PM +0200, Goffredo Baroncelli wrote:
> Hi All,
>
> the enclosed patch adds a new btrfs sub command: "btrfs inspect
> physical-find". The aim of this new command is to show the physical placement
> on the disk of a file. Currently it handles all the profiles
<master.b.at.ra...@chefmail.de>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - Initialize path with NULL.
- Show more information when we bail out.
v3: - Fix typo
- Use rcu version btrfs_info
- Remove __func__ and __LINE__
fs/btrfs/volumes.c | 28
ned-off-by: Liu Bo <bo.li@oracle.com>
---
v2: Set node to NULL if we know it'll be freed.
fs/btrfs/relocation.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 9732919..535314a 100644
--- a/fs/btrfs/relocation.c
+++ b
On Tue, Jul 12, 2016 at 11:05:48AM -0400, Chris Mason wrote:
>
>
> On 07/11/2016 08:37 PM, Liu Bo wrote:
> > During build_backref_tree(), if we fail to read a btree node,
> > we can eventually run into BUG_ON(cache->nr_nodes) that we put
> > in backref_cache_clean
Since it is just an in-memory building of the backrefs of several
btree blocks, nothing is fatal other than memory leaks, so this
changes BUG_ON()'s to ASSERT()'s.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/relocation.c | 12 ++--
1 file changed, 6 insertions
ned-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/relocation.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 0477dca..f00267a 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -1135,6 +1135
On Mon, Jul 11, 2016 at 06:54:02PM -0400, Chris Mason wrote:
> On Mon, Jul 11, 2016 at 03:48:38PM -0700, Liu Bo wrote:
> > On Mon, Jul 11, 2016 at 02:27:39PM -0400, Chris Mason wrote:
> > >
> > >
> > > On 07/11/2016 01:39 PM, Liu Bo wrote:
> > > >
On Mon, Jul 11, 2016 at 02:27:39PM -0400, Chris Mason wrote:
>
>
> On 07/11/2016 01:39 PM, Liu Bo wrote:
> > eb->io_pages is set in read_extent_buffer_pages().
> >
> > In case of readpage failure, for pages that have been added to bio,
> > it calls bio_end
bio(), it cannot decrease eb->io_pages via bio_endio,
and ends up with a memory leak eventually.
This lets __do_readpage propagate errors to callers and adds the
'atomic_dec(>io_pages)'.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - Move 'dec io_pages' to the caller so that w
<master.b.at.ra...@chefmail.de>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - Initialize path with NULL.
- Show more information when we bail out.
fs/btrfs/volumes.c | 30 ++
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/vo
On Fri, Jul 08, 2016 at 06:05:16PM +0200, David Sterba wrote:
> On Tue, May 03, 2016 at 04:30:54PM -0700, Liu Bo wrote:
> > > Just a heads up that this seems to introduce a valid warning, since it now
> > > can goto error before the first initializing use of path:
> >
On Fri, Jul 08, 2016 at 06:01:49PM +0200, David Sterba wrote:
> On Fri, Jun 03, 2016 at 12:08:38PM -0700, Liu Bo wrote:
> > eb->io_pages is set in read_extent_buffer_pages().
> >
> > In case of readpage failure, for pages that have been added to bio,
> >
On Wed, Jul 06, 2016 at 06:37:52PM +0800, Wang Xiaoguang wrote:
> In prealloc_file_extent_cluster(), btrfs_check_data_free_space() uses
> wrong file offset for reloc_inode, it uses cluster->start and cluster->end,
> which indeed are extent's bytenr. The correct value should be
>
ed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: fix tree_move_down to check the correct extent buffer.
fs/btrfs/ctree.c| 69 +
fs/btrfs/tree-log.c | 4
2 files changed, 52 insertions(+), 21 deletions(-)
diff --git a/fs/btrfs/ctree.
On Mon, Jul 04, 2016 at 07:08:18PM +0200, David Sterba wrote:
> On Tue, Jun 28, 2016 at 06:55:48PM -0700, Liu Bo wrote:
> > @@ -5238,6 +5256,10 @@ static void tree_move_down(struct btrfs_root *root,
> > path->slots[*level]);
> > pat
This BUG() has been triggered by a fuzz testing image, but in fact
btrfs can handle this gracefully by returning -EIO.
Thus, use btrfs_warn to give us more debugging information than a
single BUG() and return error properly.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: - use btrf
ed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/ctree.c| 63 +
fs/btrfs/tree-log.c | 4
2 files changed, 48 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index a85cf7d..63510e0 100644
--- a/fs/b
On Tue, Jun 28, 2016 at 10:16:58AM +0200, Peter Becker wrote:
> Cause of kernel bugs was a defective HDD (/dev/sdd).
Thanks for reporting this bug, I can reproduce it, it's due to the fact
that we cannot read a valid btree node from the underlying disks, which
comes from a defective HDD in your
up with the
above 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().
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/disk-io.c | 12 +++-
return the first
child.
This lets us know what's happening and returns a EINVAL to callers
instead of returning the first item.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: fix typo of in printed message.
fs/btrfs/ctree.c | 8
1 file changed, 8 insertions(+)
diff --gi
On Thu, Jun 23, 2016 at 11:09:52AM +0200, David Sterba wrote:
> On Wed, Jun 22, 2016 at 06:32:06PM -0700, Liu Bo wrote:
> > This is similar to btrfs_submit_compressed_read(), if we fail after
> > bio is allocated, then we can use bio_endio() and errors are saved
> > in bio-&
On Thu, Jun 23, 2016 at 10:51:52AM +0200, David Sterba wrote:
> On Wed, Jun 22, 2016 at 06:32:19PM -0700, Liu Bo wrote:
> > With btrfs-corrupt-block, one can set btree node/leaf's field, if
> > we assign a negative value to node/leaf, we can get various hangs,
> > eg. if
On Wed, Jun 22, 2016 at 07:26:46PM +0200, David Sterba wrote:
> From: David Sterba
>
> Hi,
>
> the chunk dump is a useful thing, for debugging or balance filters.
>
> Example output:
>
> Chunks on device id: 1
> PNumberTypePStartLength
printed the reason, we can just return errors in
merge_bio.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 1 -
fs/btrfs/inode.c | 8 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index a
return the first
child.
This lets us know what's happening and returns a EINVAL to callers
instead of returning the first item.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/ctree.c | 8
1 file changed, 8 insertions(+)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
With btrfs-corrupt-block, one can drop one chunk item and mounting
will end up with a panic in btrfs_full_stripe_len().
This doesn't not remove the BUG_ON, but instead checks it a bit
earlier when we find the block group item.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/
off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/compression.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 658c39b..7a4d9c8 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -402,7 +402,
On Fri, Jun 17, 2016 at 10:48:05AM +0530, Chandan Rajendra wrote:
> 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 W
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 Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote:
&g
On Wed, Apr 27, 2016 at 09:59:38AM -0400, Chris Mason wrote:
> On Mon, Apr 11, 2016 at 05:37:40PM -0400, Josef Bacik wrote:
> > Using the offwakecputime bpf script I noticed most of our time was spent
> > waiting
> > on the delayed ref throttling. This is what is supposed to happen, but
> >
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 following check in check_super() as well,
> >
> >if (b
gt; Fix this by checking for errors in the flags of the inode's mapping when
> we notice we can skip logging the inode.
>
> This caused sporadic failures in the test generic/331 (which explicitly
> tests for IO errors during an fsync call).
Good catch.
Reviewed-by: Liu Bo <bo.li@
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 <guane...@gmail.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
mkfs.c | 2 ++
1 file changed,
Hi,
On Tue, Jun 14, 2016 at 07:13:22PM +0800, Eryu Guan wrote:
> Hi,
>
> I'm unable to mount btrfs on ppc64 hosts and other hosts with 64k
> pagesize(like aarch64, ppc64le). It seems that it's commit 99e3ecfcb9f4
> ("Btrfs: add more validation checks for superblock") introduced this
> failure,
standard information to the head of a trace event.
>
> The extent_state alloc/free events are all that's left without an
> fs_info available.
Looks good to me.
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: Jeff Mahoney <je...@suse.com>
>
.
Now that alloc_extent_buffer() no more returns NULL, this changes its
caller and callers of its caller to match with the new error
handling.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2:
- Add more fine-grained error handling to alloc_extent_buffer() and
its callers
- Use btr
On Fri, Jun 03, 2016 at 05:41:42PM -0700, Liu Bo wrote:
> We set uptodate flag to pages in the temporary sys_array eb,
> but do not clear the flag after free eb. As the special
> btree inode may still hold a reference on those pages, the
> uptodate flag can remain a
of this sys_array eb, reading chunk_root will read content
of sys_array and it will pass our beautiful checks in
btree_readpage_end_io_hook() because of
"pages of eb are uptodate => eb is uptodate"
This adds the 'clear uptodate' part to force it to read from disk.
Signed-off-by:
bio(), it cannot decrease eb->io_pages via bio_endio,
and ends up with a memory leak eventually.
This lets __do_readpage propagate errors to callers and adds the
'atomic_dec(>io_pages)'.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2:
- Move 'dec io_pages' to the caller so that w
cases,
feel free to add more checks.
Reported-by: Vegard Nossum <vegard.nos...@oracle.com>
Reported-by: Quentin Casasnovas <quentin.casasno...@oracle.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2:
- Fix several typos.
fs/bt
This adds valid checks for super_total_bytes, super_bytes_used and
super_stripesize, super_num_devices.
Reported-by: Vegard Nossum <vegard.nos...@oracle.com>
Reported-by: Quentin Casasnovas <quentin.casasno...@oracle.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
On Thu, Jun 02, 2016 at 07:45:49PM +, Omari Stephens wrote:
> [Note: not on list; please reply-all]
>
> I've read everything I can find about running out of space on btrfs, and it
> hasn't helped. I'm currently dead in the water.
>
> Everything I do seems to make the problem monotonically
On Fri, Jan 29, 2016 at 01:03:31PM +0800, Qu Wenruo wrote:
> Before this patch, btrfs-convert only rely on large enough initial
> system/metadata chunk size to ensure no newer system/meta chunk will be
> created.
>
> But that's not safe enough. So add two new members in fs_info,
>
On Fri, Jan 29, 2016 at 01:03:26PM +0800, Qu Wenruo wrote:
> Introduce new function, migrate_reserved_ranges() to migrate used fs
> data in btrfs reserved space.
>
> Unlike old implement, which will need to relocate all the complicated
> csum and reference relocation, previous patches already
On Fri, Jan 29, 2016 at 01:03:25PM +0800, Qu Wenruo wrote:
> Use new function, create_convert_image_v2() to create snapshot of old
> filesystem.
>
> Unlike old function which is called after copying all inodes, this
> function need to be called before copying inodes.
>
> Signed-off-by: Qu Wenruo
On Fri, Jan 29, 2016 at 01:03:15PM +0800, Qu Wenruo wrote:
> Introduce a new function, setup_temp_super(), to setup temporary super
> for make_btrfs_v2().
>
> Signed-off-by: Qu Wenruo
> Signed-off-by: David Sterba
> ---
> utils.c | 117
>
During btrfs-convert, it can allocate space from METADATA block
group for data, which is not supposed to be correct, although it
doesn't cause any serious problem except eating METADATA space
more quickly.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
btrfs-convert.c | 6 ++
Without proper hint, btrfs-convert always starts searching
from the very first available block which usually belongs
to SYSTEM block group, but we're not allowed to use any
block in SYSTEM block group for metadata/data.
This adds hint to make convert smarter.
Signed-off-by: Liu Bo <bo
On Wed, May 18, 2016 at 11:41:05AM +0200, David Sterba wrote:
> On Tue, May 17, 2016 at 05:21:48PM -0700, Liu Bo wrote:
> > btrfs's fiemap is supposed to return 0 on success and
> > return < 0 on error, however, ret becomes 1 after looking
> > up the last file extent, and
btrfs's fiemap is supposed to return 0 on success and
return < 0 on error, however, ret becomes 1 after looking
up the last file extent, and if the offset is beyond EOF,
we can return 1.
This may confuse applications using ioctl(FIEL_IOC_FIEMAP).
Signed-off-by: Liu Bo <bo.li@orac
On Tue, May 17, 2016 at 11:39:52AM +0200, David Sterba wrote:
> On Mon, May 16, 2016 at 11:01:41AM -0700, Liu Bo wrote:
> > On Sat, May 14, 2016 at 06:30:52PM +0800, Qu Wenruo wrote:
> > > Hi Liu,
> > >
> > > Thanks for your patch first.
> > >
On Tue, May 17, 2016 at 11:55:19AM +0200, David Sterba wrote:
> On Mon, May 16, 2016 at 10:24:01AM -0700, Liu Bo wrote:
> > On Mon, May 16, 2016 at 10:44:38AM +0200, David Sterba wrote:
> > > On Fri, May 13, 2016 at 05:07:00PM -0700, Liu Bo wrote:
> > > > We have two
On Sat, May 14, 2016 at 06:30:52PM +0800, Qu Wenruo wrote:
> Hi Liu,
>
> Thanks for your patch first.
>
> On 05/14/2016 08:06 AM, Liu Bo wrote:
> > Thanks to fuzz testing, we can pass an invalid bytenr to extent buffer
> > via alloc_extent_buffer(). An unaligned
On Mon, May 16, 2016 at 10:44:38AM +0200, David Sterba wrote:
> On Fri, May 13, 2016 at 05:07:00PM -0700, Liu Bo wrote:
> > We have two BUG_ON in merge_bio, but since it can gracefully return errors
> > to callers, use WARN_ONCE to give error information and don't leave a
>
This BUG() has been triggered by a fuzz testing image, but in fact
btrfs can handle this gracefully by returning -EIO.
Thus, use WARN_ONCE for warning purpose and don't leave a possible
kernel panic.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/raid56.c | 2 +-
1 file chan
.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d247fc0..e601e0f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4868,6 +4868,10 @@ struct extent_
This BUG_ON is more like a warning since an invalid
btrfs_super_total_bytes() doesn't affect other stuff.
Thus, use WARN_ONCE for warning purpose and don't leave a possible
kernel panic here.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/inode.c | 7 +--
1 file chan
bio(), it cannot decrease eb->io_pages via bio_endio,
and ends up with a memory leak eventually.
This adds the 'atomic_dec(>io_pages)' to the readpage error handling.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 24
1 file changed
Thanks to fuzz testing, we can have invalid btree root node height.
Btrfs limits btree height to 7 and if the given height is 9, then btrfs
will have problems in both releasing root node's lock and freeing the node.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/ctree.c | 7
While reading sys_chunk_array in superblock, btrfs creates a temporary
extent buffer. Since we don't use it after finishing reading
sys_chunk_array, we don't need to keep it in memory.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 inse
We have two BUG_ON in merge_bio, but since it can gracefully return errors
to callers, use WARN_ONCE to give error information and don't leave a
possible panic.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 1 -
fs/btrfs/inode.c | 6 --
2 files chan
On Wed, May 04, 2016 at 03:56:26PM +0200, David Sterba wrote:
> A few minor comments below
>
> On Mon, May 02, 2016 at 11:15:51AM -0700, Liu Bo wrote:
> > --- a/fs/btrfs/volumes.c
> > +++ b/fs/btrfs/volumes.c
> > @@ -6206,27 +6206,23 @@ struct btrfs_device
On Mon, May 09, 2016 at 09:31:37AM +0800, Qu Wenruo wrote:
>
>
> David Sterba wrote on 2016/05/06 16:35 +0200:
> > On Thu, May 05, 2016 at 09:08:54AM +0800, Qu Wenruo wrote:
> > > > > An early check can compare against some reasonable value, but the
> > > > > total_bytes value must be equal to
On Wed, May 11, 2016 at 03:36:29PM +0200, David Sterba wrote:
> On Mon, May 02, 2016 at 11:18:54AM -0700, Liu Bo wrote:
> > This adds valid checks for super_total_bytes, super_bytes_used and
> > super_stripesize.
> >
> > Since these checks are made after superblock fini
that semaphore and creating the ordered extent.
> + */
> + down_write(_info->groups_sem);
> + up_write(_info->groups_sem);
> +
> + wait_on_atomic_t(>reservations,
> + btrfs_wait_bg_reservations_atomic_t,
> + TASK
waits for all ordered extents to complete. This last step includes
> waiting for ordered extents destinated at extents allocated in other block
> groups, making us waste unecessary time.
>
> So improve this by waiting only for ordered extents that fall into the
> block group's range.
Revie
On Mon, Apr 25, 2016 at 02:01:12AM +0100, fdman...@kernel.org wrote:
> From: Filipe Manana
>
> Before we start the actual relocation process of a block group, we do
> calls to flush delalloc of all inodes and then wait for ordered extents
> to complete. However we do these
901 - 1000 of 2439 matches
Mail list logo