On Fri, Aug 02, 2019 at 09:54:12PM +0800, Qu Wenruo wrote:
>
>
> On 2019/8/2 下午9:06, Josef Bacik wrote:
> > Sometimes when messing with the chunk allocator code we can end up
> > over-allocating chunks. Generally speaking I'll notice this when a
> > random x
7;t trip up currently, so this will just keep me
from regressing us. Thanks,
Signed-off-by: Josef Bacik
---
btrfsck.h| 1 +
check/main.c | 52 ++--
2 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/btrfsck.h b/btrfsck.h
index ac7f5d4
Delayed iputs could very well free up enough space without needing to
commit the transaction, so make this step it's own step. This will
allow us to skip the step for evictions in a later patch.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 3 ++-
fs/btrfs/space-i
We're going to make this logic a little more complicated for evict, so
factor the ticket flushing/waiting code out of __reserve_metadata_bytes.
This has no functional change.
Signed-off-by: Josef Bacik
---
fs/btrfs/space-info.c | 64 ---
1 file ch
ction flushing.
Signed-off-by: Josef Bacik
---
fs/btrfs/space-info.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index 71749b355136..03556e411b11 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-i
Currently we handle the cleanup of errored out tickets in both the
priority flush path and the normal flushing path. This is the same code
in both places, so just refactor so we don't duplicate the cleanup work.
Signed-off-by: Josef Bacik
---
fs/btrfs/space-info.c
s first.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/inode.c | 81 +++
fs/btrfs/space-info.c | 27 +--
3 files changed, 62 insertions(+), 47 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.
This is a set of patches to address how we do space flushing for inode
evictions. Historically we've only been allowed to do a few things to reclaim
space for inode evictions, mostly because we'd deadlock with iput. But we have
delayed iputs in place to make sure we're always doing iput where it'
17 @@ int btrfs_commit_transaction(struct btrfs_trans_handle
> *trans)
> }
> } else {
> spin_unlock(&fs_info->trans_lock);
> + /*
> + * The previous transaction was aborted and was already removed
> + * from the list of transactions at fs_info->trans_list. So we
> + * abort to prevent writing a new superblock that reflects a
> + * corrupt state (pointing to trees with unwritten nodes/leafs).
> + */
> + if (test_bit(BTRFS_FS_STATE_TRANS_ABORTED,
> + &fs_info->fs_state)) {
> + ret = -EROFS;
> + goto cleanup_transaction;
> + }
> }
>
> extwriter_counter_dec(cur_trans, trans->type);
Reviewed-by: Josef Bacik
Thanks,
Josef
On Wed, Jul 03, 2019 at 11:12:10PM +0200, Peter Zijlstra wrote:
> On Wed, Jul 03, 2019 at 09:54:06AM -0400, Josef Bacik wrote:
> > Hello,
> >
> > I've been seeing a variation of the following splat recently and I have no
> > earthly idea what it's trying
Hello,
I've been seeing a variation of the following splat recently and I have no
earthly idea what it's trying to tell me. I either get this one, or I get one
that tells me the same thing except it's complaining about &cpuctx_mutex instead
of sb_pagefaults. There is no place we take the reloc_m
On Tue, Jun 25, 2019 at 01:58:43PM +0200, David Sterba wrote:
> On Tue, Jun 18, 2019 at 04:09:19PM -0400, Josef Bacik wrote:
> > --- /dev/null
> > +++ b/fs/btrfs/space-info.c
> > @@ -0,0 +1,177 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * C
This gets used directly by a bunch of the block group code, export it to
make it easier to move things around.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/extent-tree.c | 16
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs
This is used in a few logical parts of the block group code, temporarily
export it so we can move things in pieces.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 2 ++
fs/btrfs/extent-tree.c | 15 ---
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/fs
This can easily be moved now.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 196 +
fs/btrfs/block-group.h | 2 +
fs/btrfs/ctree.h | 2 -
fs/btrfs/extent-tree.c | 196 -
4 files
This is used in caching and reading block groups, so export it while we
move these chunks independently.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 1 +
fs/btrfs/extent-tree.c | 8
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/block-group.h b/fs
These feel more at home in block-group.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 100 ++
fs/btrfs/block-group.h | 16 +++
fs/btrfs/ctree.h | 4 --
fs/btrfs/extent-tree.c | 115
This is prep work for moving block_group_cache around. Having this in
the header file makes the header file include need to be in a certain
order, which is awkward, so just move it into free-space-cache.c and
then we can re-arrange later.
Signed-off-by: Josef Bacik
---
fs/btrfs/free-space
This is the series to migrate the block group code out of extent-tree.c. This
is a much larger series than the previous two series because things were much
more intertwined than block_rsv's and space_info. There is one code change
patch in this series, it is
btrfs: make caching_thread use btrfs_
Want to move these functions into block-group.c, so export them.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 6 ++
fs/btrfs/extent-tree.c | 21 ++---
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/block-group.h b/fs/btrfs/block-group.h
This can now be easily migrated as well.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 140 +
fs/btrfs/block-group.h | 2 +
fs/btrfs/ctree.h | 2 -
fs/btrfs/extent-tree.c | 140
These were renamed and exported to facilitate logical migration of
different code chunks into block-group.c. Now that all the users are in
one file go ahead and rename them back, move the code around, and make
them static.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 140
All of the prep work has been done so we can now cleanly move this chunk
over.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 613 +
fs/btrfs/block-group.h | 5 +
fs/btrfs/ctree.h | 5 -
fs/btrfs/extent-tree.c | 611
This is prep work for moving all of the block group cache code into its
own file.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 156 +
fs/btrfs/ctree.h | 148 +--
fs/btrfs/disk-io.c
This belongs to block-group.c, move it over.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 141 +
fs/btrfs/block-group.h | 1 +
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 141
This is the removal code and the unused bgs code.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 509 +
fs/btrfs/block-group.h | 7 +
fs/btrfs/ctree.h | 7 -
fs/btrfs/extent-tree.c | 505
This will make it so we can move them easily.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 14 +++
fs/btrfs/extent-tree.c | 65 ++
2 files changed, 43 insertions(+), 36 deletions(-)
diff --git a/fs/btrfs/block-group.h b/fs
We can now just copy it over to block-group.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 463 +
fs/btrfs/block-group.h | 2 +
fs/btrfs/ctree.h | 2 -
fs/btrfs/extent-tree.c | 461
This feels more at home in block-group.c than in extent-tree.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c| 247 ++
fs/btrfs/block-group.h| 24 +
fs/btrfs/ctree.h | 24 -
fs/btrfs/delalloc-space.c | 1 +
fs
We can now easily migrate this code as well.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 174 +
fs/btrfs/extent-tree.c | 174 -
2 files changed, 174 insertions(+), 174 deletions(-)
diff
This gets used by a few different logical chunks of the block group
code, export it while we move things around.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 2 ++
fs/btrfs/extent-tree.c | 8
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/block
This can be easily migrated over now.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 520 +
fs/btrfs/block-group.h | 3 +
fs/btrfs/ctree.h | 3 -
fs/btrfs/extent-tree.c | 518
4
o fix btrfs_find_next_key to deal with ->skip_locking and then it works
exactly the same as the private find_next_key helper.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.c | 4 ++--
fs/btrfs/extent-tree.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/c
We'll need this to move the caching stuff around.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 3 +++
fs/btrfs/extent-tree.c | 40 +---
2 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
Another easy set to move over to block-group.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 24
fs/btrfs/block-group.h | 2 ++
fs/btrfs/ctree.h | 3 ---
fs/btrfs/extent-tree.c | 25 -
4 files changed, 26 insertions(+), 28
Move these bits first as they are the easiest to move. Export two of
the helpers so they can be moved all at once.
Signed-off-by: Josef Bacik
---
fs/btrfs/Makefile | 2 +-
fs/btrfs/block-group.c | 99 ++
fs/btrfs/block-group.h | 7
fs
These are relatively straightforward as well.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.c | 83 ++
fs/btrfs/block-group.h | 6
fs/btrfs/ctree.h | 6
fs/btrfs/extent-tree.c | 82
Man a lot of people use this stuff.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-group.h | 3 +++
fs/btrfs/extent-tree.c | 36 ++--
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/fs/btrfs/block-group.h b/fs/btrfs/block-group.h
index
On Thu, Jun 20, 2019 at 11:32:21AM +0300, Nikolay Borisov wrote:
>
>
> On 19.06.19 г. 20:47 ч., Josef Bacik wrote:
> > block_rsv_release_bytes() is the internal to the block_rsv code, and
> > shouldn't be called directly by anything else. Switch all users t
pace.
Signed-off-by: Josef Bacik
---
fs/btrfs/Makefile | 2 +-
fs/btrfs/ctree.h| 14 --
fs/btrfs/delalloc-space.c | 497
fs/btrfs/delalloc-space.h | 25 +++
fs/btrfs/extent-tree.c | 486 +
We have some specialized block rsvs, like the inode rsv and the delayed refs
rsv, that have their own special oddities. These don't fit in extent-tree.c, so
migrate them to different places. Most of them go to existing files, but the
delalloc stuff gets its own file because it's a lot of code, an
This is just two functions, put it in root-tree.c since it involves root
items.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 54
fs/btrfs/root-tree.c | 56 ++
2 files changed, 56
Move this into transaction.c with the rest of the transaction related
code.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 18 --
fs/btrfs/transaction.c | 18 ++
fs/btrfs/transaction.h | 1 +
4 files changed, 19 insertions
These belong with the delayed refs related code, not in extent-tree.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 9 ---
fs/btrfs/delayed-ref.c | 177 +
fs/btrfs/delayed-ref.h | 10 +++
fs/btrfs/extent-tree.c | 175
This moves everything out of extent-tree.c to block-rsv.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/Makefile | 3 +-
fs/btrfs/block-rsv.c | 257 +
fs/btrfs/extent-tree.c | 249 ---
3 files
block_rsv_release_bytes() is the internal to the block_rsv code, and
shouldn't be called directly by anything else. Switch all users to the
exported helpers.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --
Move these into block_rsv.c/h respectively, and export them for use by
alloc_tree_block.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-rsv.c | 82
fs/btrfs/block-rsv.h | 13 ++-
fs/btrfs/extent-tree.c | 92
This works for all callers already, but if we wanted to use the helper
for the global_block_rsv it would end up trying to refill itself. Fix
the logic to be able to be used no matter which block rsv is passed in
to this helper.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 14
These helpers belong in block-rsv.c
Signed-off-by: Josef Bacik
---
fs/btrfs/block-rsv.c | 90 +
fs/btrfs/block-rsv.h | 3 ++
fs/btrfs/extent-tree.c | 99 +++---
3 files changed, 98 insertions(+), 94
The delalloc reserve stuff calls this directly because it cares about
the qgroup accounting stuff, so export it so we can move it around. Fix
btrfs_block_rsv_release() to just be a static inline since it just calls
__btrfs_block_rsv_release() with NULL for the qgroup stuff.
Signed-off-by: Josef
This patchset depends on the space_info migration patchset. This is the next
logical chunk of things to move out of extent-tree.c With these sets of patches
we're down below 10k loc in extent-tree.c. This chunk was much easier to move
as we had exported a lot of these functions already. There i
Prep work for separating out all of the block_rsv related code into its
own file.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-rsv.h | 81 ++
fs/btrfs/ctree.h | 70 +--
fs/btrfs/extent-tree.c | 1
This is used in a few places, we need to make sure it's exported so we
can move it around.
Signed-off-by: Josef Bacik
---
fs/btrfs/block-rsv.h | 2 ++
fs/btrfs/extent-tree.c | 18 +-
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/block-rsv.h
We are going to need this to move the metadata reservation stuff to
space_info.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/extent-tree.c | 14 ++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index
This moves all of the metadata reservation code into space-info.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 710 +
fs/btrfs/space-info.c | 698
fs/btrfs/space-info.h | 4 +
3
We'll need this exported so we can use it in all the various was we need
to use it. This is prep work to move reserve_metadata_bytes.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 70 +-
fs/btrfs/space-info.c
Now that we've moved all of the users to space-info.c, unexport it and
name it back to can_overcommit.
Signed-off-by: Josef Bacik
---
fs/btrfs/space-info.c | 23 +++
fs/btrfs/space-info.h | 4
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/fs/
Now that we've moved all the pre-requisite stuff, move these two
functions.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 114 -
fs/btrfs/space-info.c | 106 +
fs/btrfs/space-info.h
This is the first piece of moving the space reservation code to
space-info.c
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 83 +-
fs/btrfs/space-info.c | 68 +
fs/btrfs/space-info.h | 4 +++
3
These are the basic init and lookup functions and some helper functions,
fairly straightforward before the bad stuff starts.
Signed-off-by: Josef Bacik
---
fs/btrfs/Makefile | 2 +-
fs/btrfs/extent-tree.c | 205 +
fs/btrfs/space-info.c
Migrate the struct definition and the one helper that's in ctree.h into
space_info.h
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h| 73 +---
fs/btrfs/extent-tree.c | 1 +
fs/btrfs/free-space-cache.c | 1 +
fs/btrfs/ioctl.c
This is the first pass at making extent-tree.c much smaller. I've purposefully
done no other cleanups or changes. The places where I needed to modify callers
were done in separate patches. The only time I moved and changed callers in
large chunks was the moving of reserve_metadata_bytes out of e
Really we just need the enum, but as we break more things up it'll help
to have this external to extent-tree.c.
Signed-off-by: Josef Bacik
---
fs/btrfs/ctree.h | 22 ++
fs/btrfs/extent-tree.c | 50 ++
2 files change
Also rename it to btrfs_space_info_update_* so it's clear what we're
updating.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 68 +++---
fs/btrfs/space-info.h | 22
2 files changed, 53 insertions(+), 37 deletion
Prep work for consolidating all of the space_info code into one file.
We need to export these so multiple files can use them.
Signed-off-by: Josef Bacik
---
fs/btrfs/extent-tree.c | 42 --
fs/btrfs/space-info.h | 6 ++
2 files changed, 26 insertions
o the caller and get
throttled appropriately without affecting the main workload.
Signed-off-by: Josef Bacik
---
v1->v2:
- consolidate the delayed iput run into a helper.
fs/btrfs/inode.c | 40 ++--
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/
On Tue, Jun 18, 2019 at 08:28:07AM +, Naohiro Aota wrote:
> On 2019/06/13 23:07, Josef Bacik wrote:
> > On Fri, Jun 07, 2019 at 10:10:13PM +0900, Naohiro Aota wrote:
> >> @@ -9616,7 +9701,8 @@ static int inc_block_group_ro(struct
> >> btrfs_block_gr
On Tue, Jun 18, 2019 at 07:42:46AM +, Naohiro Aota wrote:
> On 2019/06/13 23:09, Josef Bacik wrote:
> > On Fri, Jun 07, 2019 at 10:10:14PM +0900, Naohiro Aota wrote:
> >> If the btrfs volume has mirrored block groups, it unconditionally makes
> >> un-mirrored bloc
On Mon, Jun 17, 2019 at 03:16:05AM +, Damien Le Moal wrote:
> Josef,
>
> On 2019/06/13 23:15, Josef Bacik wrote:
> > On Fri, Jun 07, 2019 at 10:10:17PM +0900, Naohiro Aota wrote:
> >> Sequential allocation is not enough to maintain sequential delivery of
> >>
On Fri, Jun 07, 2019 at 10:10:09PM +0900, Naohiro Aota wrote:
> HMZONED mode cannot be used together with the RAID5/6 profile for now.
> Introduce the function btrfs_check_hmzoned_mode() to check this. This
> function will also check if HMZONED flag is enabled on the file system and
> if the file s
On Fri, Jun 07, 2019 at 10:10:08PM +0900, Naohiro Aota wrote:
> If a zoned block device is found, get its zone information (number of zones
> and zone size) using the new helper function btrfs_get_dev_zonetypes(). To
> avoid costly run-time zone report commands to test the device zones type
> duri
On Fri, Jun 07, 2019 at 10:10:08PM +0900, Naohiro Aota wrote:
> If a zoned block device is found, get its zone information (number of zones
> and zone size) using the new helper function btrfs_get_dev_zonetypes(). To
> avoid costly run-time zone report commands to test the device zones type
> duri
On Fri, Jun 07, 2019 at 10:10:11PM +0900, Naohiro Aota wrote:
> Direct write I/Os can be directed at existing extents that have already
> been written. Such write requests are prohibited on host-managed zoned
> block devices. So disable direct IO support for a volume with HMZONED mode
> enabled.
>
On Fri, Jun 07, 2019 at 10:10:13PM +0900, Naohiro Aota wrote:
> On HMZONED drives, writes must always be sequential and directed at a block
> group zone write pointer position. Thus, block allocation in a block group
> must also be done sequentially using an allocation pointer equal to the
> block
On Fri, Jun 07, 2019 at 10:10:14PM +0900, Naohiro Aota wrote:
> If the btrfs volume has mirrored block groups, it unconditionally makes
> un-mirrored block groups read only. When we have mirrored block groups, but
> don't have writable block groups, this will drop all writable block groups.
> So, c
On Fri, Jun 07, 2019 at 10:10:17PM +0900, Naohiro Aota wrote:
> Sequential allocation is not enough to maintain sequential delivery of
> write IOs to the device. Various features (async compress, async checksum,
> ...) of btrfs affect ordering of the IOs. This patch introduces submit
> buffer to so
On Fri, Jun 07, 2019 at 10:10:15PM +0900, Naohiro Aota wrote:
> When in HMZONED mode, make sure that device super blocks are located in
> randomly writable zones of zoned block devices. That is, do not write super
> blocks in sequential write required zones of host-managed zoned block
> devices as
On Fri, Jun 07, 2019 at 10:10:19PM +0900, Naohiro Aota wrote:
> Btrfs prioritize sync I/Os to be handled by async checksum worker earlier.
> As a result, checksumming sync I/Os to larger logical extent address can
> finish faster than checksumming non-sync I/Os to smaller logical extent
> address.
On Fri, Jun 07, 2019 at 10:10:18PM +0900, Naohiro Aota wrote:
> It is possible to have bios stalled in the submit buffer due to some bug or
> device problem. In such situation, btrfs stops working waiting for buffered
> bios completions. To avoid such hang, add a worker that will cancel the
> stall
On Fri, Jun 07, 2019 at 10:10:20PM +0900, Naohiro Aota wrote:
> Tree manipulating operations like merging nodes often release
> once-allocated tree nodes. Btrfs cleans such nodes so that pages in the
> node are not uselessly written out. On HMZONED drives, however, such
> optimization blocks the fo
On Fri, Jun 07, 2019 at 10:10:22PM +0900, Naohiro Aota wrote:
> When truncating a file, file buffers which have already been allocated but
> not yet written may be truncated. Truncating these buffers could cause
> breakage of a sequential write pattern in a block group if the truncated
> blocks ar
On Fri, Jun 07, 2019 at 10:10:24PM +0900, Naohiro Aota wrote:
> Currently, dev-replace copy all the device extents on source device to the
> target device, and it also clones new incoming write I/Os from users to the
> source device into the target device.
>
> Cloning incoming IOs can break the se
On Fri, Jun 07, 2019 at 10:10:23PM +0900, Naohiro Aota wrote:
> In a write heavy workload, the following scenario can occur:
>
> 1. mark page #0 to page #2 (and their corresponding extent region) as dirty
>and candidate for delayed allocation
>
> pages0 1 2 3 4
> dirtyo o o - -
> towr
On Tue, Jun 04, 2019 at 08:31:23AM +0800, Qu Wenruo wrote:
>
>
> On 2019/6/4 上午1:36, Josef Bacik wrote:
> > On Mon, Jun 03, 2019 at 02:53:00PM +0800, Qu Wenruo wrote:
> >>
> >>
> >> On 2019/2/13 上午12:03, David Sterba wrote:
> >>> On Th
On Mon, Jun 03, 2019 at 02:53:00PM +0800, Qu Wenruo wrote:
>
>
> On 2019/2/13 上午12:03, David Sterba wrote:
> > On Thu, Jan 24, 2019 at 09:31:43AM -0500, Josef Bacik wrote:
> >> Previously callers to btrfs_end_transaction_throttle() would commit the
> >> transacti
On Tue, May 07, 2019 at 08:09:02PM +0100, Filipe Manana wrote:
> On Tue, May 7, 2019 at 6:44 PM Josef Bacik wrote:
> >
> > On Mon, May 06, 2019 at 04:44:02PM +0100, fdman...@kernel.org wrote:
> > > From: Filipe Manana
> > >
> > > When we do a full fsy
nserted a file extent item
> representing a hole for this offset (68K) in the previous call to
> copy_items(), when processing leaf N.
>
> The -EEXIST error gets propagated to the fsync callback, btrfs_sync_file(),
> which falls back to a full transaction commit.
>
> Fix this by adjusting *last_extent after inserting a hole when we had to
> look at the next leaf.
>
> Signed-off-by: Filipe Manana
Reviewed-by: Josef Bacik
Thanks,
Josef
_extents() when it traims file extent
> items). Therefore teach the tree checker to detect such cases. This is
> motivated by a recently fixed bug (race between ranged full fsync and
> writeback or adjacent ranges).
>
> Signed-off-by: Filipe Manana
Reviewed-by: Josef Bacik
Thanks,
Josef
nt item to represent that hole, having
> a key offset of 68K. After that we now have a log tree with 2 different
> extent items that have overlapping ranges:
>
Well this kind of sucks. I wonder if we should be locking the extent range
while we're doing this in order to keep this problem from happening. A fix for
another day though
Reviewed-by: Josef Bacik
Thanks,
Josef
On Fri, May 03, 2019 at 09:08:52AM +0800, Qu Wenruo wrote:
> [BUG]
> The following command can lead to unexpected data COW:
>
> #!/bin/bash
>
> dev=/dev/test/test
> mnt=/mnt/btrfs
>
> mkfs.btrfs -f $dev -b 1G > /dev/null
> mount $dev $mnt -o nospace_cache
>
> xfs_io -f -c "falloc 8k
; Nikolay Borisov (3):
> btrfs: Implement btrfs_lock_and_flush_ordered_range
> btrfs: Use newly introduced btrfs_lock_and_flush_ordered_range
> btrfs: Always use a cached extent_state in
> btrfs_lock_and_flush_ordered_range
>
You can add
Reviewed-by: Josef Bacik
for the whole series. Thanks,
Josef
o the caller and get
throttled appropriately without affecting the main workload.
Signed-off-by: Josef Bacik
---
fs/btrfs/inode.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b6d549c993f6..e58685b5d398 100644
--- a/fs/btrfs/in
If we have an error writing out a delalloc range in
btrfs_punch_hole_lock_range we'll unlock the inode and then goto
out_only_mutex, where we will again unlock the inode. This is bad,
don't do this.
Signed-off-by: Josef Bacik
---
fs/btrfs/file.c | 4 +---
1 file changed, 1 inser
writes than
delalloc bytes we'll go ahead and wait on any ordered extents
irregardless of our flush state as flushing delalloc is likely to not
gain us anything.
Signed-off-by: Josef Bacik
---
v1->v2:
- updated the changelog
fs/btrfs/ctree.h| 1 +
fs/btrfs/disk-io.c
On Thu, Apr 25, 2019 at 10:11:41PM +0800, Qu Wenruo wrote:
>
>
> On 2019/4/25 下午10:09, Josef Bacik wrote:
> > On Thu, Apr 25, 2019 at 09:50:25PM +0800, Qu Wenruo wrote:
> >>
> >>
> >> On 2019/4/25 下午9:25, Josef Bacik wrote:
> >> [snip]
>
On Thu, Apr 25, 2019 at 09:50:25PM +0800, Qu Wenruo wrote:
>
>
> On 2019/4/25 下午9:25, Josef Bacik wrote:
> [snip]
> >>>
> >>> What if the commit is reverted, if the problem is otherwise hard to fix?
> >>> This seems to break the semantics of falloc
On Thu, Apr 25, 2019 at 01:49:23PM +0800, Qu Wenruo wrote:
>
>
> On 2019/4/23 下午7:33, David Sterba wrote:
> > On Tue, Apr 23, 2019 at 10:16:32AM +0800, Qu Wenruo wrote:
> >> On 2019/4/23 上午5:09, Jakob Unterwurzacher wrote:
> >>> I have a user who is reporting ENOSPC errors when running gocryptfs
On Thu, Apr 18, 2019 at 10:24:10AM +0300, Nikolay Borisov wrote:
>
>
> On 18.04.19 г. 10:21 ч., Qu Wenruo wrote:
> > There is a BUG_ON() in __clear_extent_bit() for memory allocation
> > failure.
> >
> > While comment of __clear_extent_bit() says it can return error, but we
> > always return 0.
On Fri, Apr 12, 2019 at 04:35:20PM +0300, Nikolay Borisov wrote:
>
>
> On 12.04.19 г. 16:26 ч., Josef Bacik wrote:
> > On Fri, Apr 12, 2019 at 04:06:25PM +0300, Nikolay Borisov wrote:
> >>
> >>
> >> On 10.04.19 г. 22:56 ч., Josef Bacik wrote:
>
On Fri, Apr 12, 2019 at 01:17:40PM +0300, Nikolay Borisov wrote:
>
>
> On 10.04.19 г. 22:56 ч., Josef Bacik wrote:
> > When diagnosing a slowdown of generic/224 I noticed we were wasting a
> > lot of time in shrink_delalloc() despite all writes being O_DIRECT
> > wri
701 - 800 of 4464 matches
Mail list logo