On 1/27/19 12:58 PM, Al Viro wrote:
alloc_fs_devices() can return ERR_PTR(-ENOMEM), so
dereferencing its result before the check for IS_ERR() is
a bad idea...
Fixes: d1a63002829a4
Signed-off-by: Al Viro
nice catch.
Reviewed-by: Anand Jain
---
diff --git a/fs/btrfs/volumes.c b/
On Thu, Jan 17, 2019 at 04:48:28PM +0800, YueHaibing wrote:
> There are no in-tree callers.
I'd rather see the code fixed, the patch that used the function was
reverted because it was not safe to call sysfs from various contexts. I
have some wip.
On Sun, Jan 27, 2019 at 04:58:00AM +, Al Viro wrote:
> alloc_fs_devices() can return ERR_PTR(-ENOMEM), so
> dereferencing its result before the check for IS_ERR() is
> a bad idea...
>
> Fixes: d1a63002829a4
> Signed-off-by: Al Viro
Thanks, added to 5.0-rc queue.
On Mon, 28 Jan 2019 at 01:18, Qu Wenruo wrote:
>
> So for current upstream kernel, there should be no major problem despite
> write hole.
Can you please elaborate on the implications of the write-hole? Does
it mean that the transaction currently in-flight might be lost but the
filesystem is othe
From: Ethan Lien
[ Upstream commit 3cd24c698004d2f7668e0eb9fc1f096f533c791b ]
Snapshot is expected to be fast. But if there are writers steadily
creating dirty pages in our subvolume, the snapshot may take a very long
time to complete. To fix the problem, we use tagged writepage for
snapshot flu
On Mon, Jan 28, 2019 at 03:23:28PM +, Supercilious Dude wrote:
> On Mon, 28 Jan 2019 at 01:18, Qu Wenruo wrote:
> >
> > So for current upstream kernel, there should be no major problem despite
> > write hole.
>
>
> Can you please elaborate on the implications of the write-hole? Does
> it mea
The fstests generic/475 stresses transaction aborts and can reveal
space accounting or use-after-free bugs regarding block goups.
In this case the pending block groups that remain linked to the
structures after transaction commit aborts in the middle.
The corrupted slabs lead to failures in follo
On 28.01.19 г. 18:45 ч., David Sterba wrote:
> The fstests generic/475 stresses transaction aborts and can reveal
> space accounting or use-after-free bugs regarding block goups.
>
> In this case the pending block groups that remain linked to the
> structures after transaction commit aborts in
From: Anand Jain
[ Upstream commit a9261d4125c97ce8624e9941b75dee1b43ad5df9 ]
It's not that impossible to imagine that a device OR a btrfs image is
copied just by using the dd or the cp command. Which in case both the
copies of the btrfs will have the same fsid. If on the system with
automount e
From: David Sterba
[ Upstream commit ceb21a8db48559fd0809e03c4df9eb37743d9170 ]
The device-replace read lock is going to use rw semaphore in followup
commits. The semaphore might sleep which is not possible in the radix
tree preload section. The lock nesting is now:
* device replace
* radix t
From: Anand Jain
[ Upstream commit a9261d4125c97ce8624e9941b75dee1b43ad5df9 ]
It's not that impossible to imagine that a device OR a btrfs image is
copied just by using the dd or the cp command. Which in case both the
copies of the btrfs will have the same fsid. If on the system with
automount e
From: Ethan Lien
[ Upstream commit 3cd24c698004d2f7668e0eb9fc1f096f533c791b ]
Snapshot is expected to be fast. But if there are writers steadily
creating dirty pages in our subvolume, the snapshot may take a very long
time to complete. To fix the problem, we use tagged writepage for
snapshot flu
From: Anand Jain
[ Upstream commit a9261d4125c97ce8624e9941b75dee1b43ad5df9 ]
It's not that impossible to imagine that a device OR a btrfs image is
copied just by using the dd or the cp command. Which in case both the
copies of the btrfs will have the same fsid. If on the system with
automount e
From: David Sterba
[ Upstream commit ceb21a8db48559fd0809e03c4df9eb37743d9170 ]
The device-replace read lock is going to use rw semaphore in followup
commits. The semaphore might sleep which is not possible in the radix
tree preload section. The lock nesting is now:
* device replace
* radix t
On Wed, Jan 23, 2019 at 03:15:11PM +0800, Qu Wenruo wrote:
> Qu Wenruo (6):
> btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots()
> btrfs: qgroup: Refactor btrfs_qgroup_trace_subtree_swap()
> btrfs: qgroup: Introduce per-root swapped blocks infrastructure
> btrfs: qgroup:
On Sat, Jan 19, 2019 at 02:48:55PM +0800, Anand Jain wrote:
> Both btrfs_find_device() and find_device() does the same things expect
> that latter function is not keen in seed device in the scan-context. So
> merge them.
>
> Signed-off-by: Anand Jain
I can't find a reply that this has been merge
On Mon, Jan 28, 2019 at 06:57:41PM +0200, Nikolay Borisov wrote:
> > +static void btrfs_cleanup_pending_block_groups(struct btrfs_trans_handle
> > *trans)
> > +{
> > + struct btrfs_fs_info *fs_info = trans->fs_info;
> > + struct btrfs_block_group_cache *block_group;
> > +
> > + w
Currently, the only user of set_level() is zlib which sets an internal
workspace parameter. As level is now plumbed into get_workspace(), this
can be handled there rather than separately.
This repurposes set_level() to bound the level passed in so it can be
used when setting the mounts compression
Zstd compression requires different amounts of memory for each level of
compression. The prior patches implemented indirection to allow for each
compression type to manage their workspaces independently. This patch
uses this indirection to implement compression level support for zstd.
As mentioned
Zstd currently only supports the default level of compression. This
patch switches to using the level passed in for btrfs zstd
configuration.
Zstd workspaces now keep track of the requested level as this can differ
from the size of the workspace.
Signed-off-by: Dennis Zhou
---
fs/btrfs/zstd.c |
Zlib compression supports multiple levels, but doesn't require changing
in how a workspace itself is created and managed. Zstd introduces a
different memory requirement such that higher levels of compression
require more memory. This requires changes in how the alloc()/get()
methods work for zstd.
There are two levels of workspace management. First, alloc()/free()
which are responsible for actually creating and destroy workspaces.
Second, at a higher level, get()/put() which is the compression code
asking for a workspace from a workspace_manager.
The compression code shouldn't really care h
The previous patch added generic helpers for get_workspace() and
put_workspace(). Now, we can migrate ownership of the workspace_manager
to be in the compression type code as the compression code itself
doesn't care beyond being able to get a workspace. The init/cleanup
and get/put methods are abst
Workspace manager init and cleanup code is open coded inside a for loop
over the compression types. This forces each compression type to rely on
the same workspace manager implementation. This patch creates helper
methods that will be the generic implementation for btrfs workspace
management.
Sign
Make the workspace_manager own the interface operations rather than
managing index-paired arrays for the workspace_manager and compression
operations.
Signed-off-by: Dennis Zhou
---
fs/btrfs/compression.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/co
While the heuristic workspaces aren't really compression workspaces,
they use the same interface for managing them. So rather than branching,
let's just handle them once again as the index 0 compression type.
Signed-off-by: Dennis Zhou
---
fs/btrfs/compression.c | 107 +++---
This is in preparation for zstd compression levels. As each level will
require different sized workspaces, workspaces_list is no longer a
really fitting name.
Signed-off-by: Dennis Zhou
---
fs/btrfs/compression.c | 46 +-
1 file changed, 23 insertions(+),
Hi everyone,
This is a respin of [1] which aims to add zstd compression level
support. V3 moves away from the using set_level() to resize workspaces
in favor of just allocating a workspace of the appropriate level and
using a timer to reclaim unused workspaces.
Zstd compression requires different
It is very easy to miss places that rely on a certain bitshifting for
decyphering the type_level overloading. Make macros handle this instead.
Signed-off-by: Dennis Zhou
---
fs/btrfs/compression.c | 2 +-
fs/btrfs/compression.h | 3 +++
fs/btrfs/zlib.c| 2 +-
3 files changed, 5 insertion
On Wed, Nov 21, 2018 at 02:05:38PM -0500, Josef Bacik wrote:
> A new xfstests that really hammers on transaction aborts (generic/495 I
> think?)
> uncovered a lot of random issues. Some of these were introduced with the new
> delayed refs rsv patches, others were just exposed by them, such as the
Thanks Qu!
I thought as much from following the mailing list and your great work
over the years!
Would it be possible to get the wiki updated to reflect the current
"real" status?
From Qu's statement and perspective, there's no difference to other
non-BTRFS software RAID56's out there that
On 2019-01-28 5:07 p.m., DanglingPointer wrote:
> From Qu's statement and perspective, there's no difference to other
> non-BTRFS software RAID56's out there that are marked as stable (except
> ZFS).
> Also there are no "multiple serious data-loss bugs".
> Please do consider my proposal as it will
On 2019/1/29 上午6:07, DanglingPointer wrote:
> Thanks Qu!
> I thought as much from following the mailing list and your great work
> over the years!
>
> Would it be possible to get the wiki updated to reflect the current
> "real" status?
>
> From Qu's statement and perspective, there's no differe
[BUG]
Btrfs will report false ENOSPC balancing metadata chunk.
The following script can easily reproduce it:
#!/bin/bash
dev=/dev/test/test
mnt=/mnt/btrfs
umount $dev &> /dev/null
umount $mnt &> /dev/null
mkfs.btrfs -f $dev
mount $dev $mnt
btrfs subv create $mnt/subv
for ((i =
Kernel commit 64403612b73a ("btrfs: rework
btrfs_check_space_for_delayed_refs") is introducing a regression for
btrfs balance performance.
Since that commit will cause btrfs to commit transaction for nothing
during transaction, it will slow balance dramatically even we only need
to relocate severa
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote:
> Zstd compression requires different amounts of memory for each level of
> compression. The prior patches implemented indirection to allow for each
> compression type to manage their workspaces independently. This patch
> uses this indirection to impl
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote:
> It is very easy to miss places that rely on a certain bitshifting for
> decyphering the type_level overloading. Make macros handle this instead.
>
> Signed-off-by: Dennis Zhou
Reviewed-by: Nikolay Borisov
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote:
> This is in preparation for zstd compression levels. As each level will
> require different sized workspaces, workspaces_list is no longer a
> really fitting name.
>
> Signed-off-by: Dennis Zhou
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/comp
This is a long existing bug, caused by over-estimated metadata
space_info::bytes_may_use.
There is one purposed patch for btrfs-progs to fix it, titled:
"btrfs-progs: balance: Sync the fs before balancing metadata chunks"
The test case itself is almost the same as btrfs/181, which use small
files
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote:
> While the heuristic workspaces aren't really compression workspaces,
> they use the same interface for managing them. So rather than branching,
> let's just handle them once again as the index 0 compression type.
>
> Signed-off-by: Dennis Zhou
Rev
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote:
> Make the workspace_manager own the interface operations rather than
> managing index-paired arrays for the workspace_manager and compression
> operations.
>
> Signed-off-by: Dennis Zhou
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/compression.
On 28.01.19 г. 23:24 ч., Dennis Zhou wrote:
> Workspace manager init and cleanup code is open coded inside a for loop
> over the compression types. This forces each compression type to rely on
> the same workspace manager implementation. This patch creates helper
> methods that will be the gener
42 matches
Mail list logo