For raid1 and raid10, we clone the original bio to the bios which are then
sent to different disks.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 2
On Mon, Apr 17, 2017 at 02:00:45PM -0400, Alexandru Guzu wrote:
> Not sure if anyone is looking into that segfault, but I have an update.
> I disconnected the USB drive for a while and today I reconnected it
> and it auto-mounted with no issue.
>
> What is interesting is that the drive letter
On Mon, Apr 17, 2017 at 11:36:17AM -0600, Chris Murphy wrote:
> HI,
>
>
> /dev/nvme0n1p8 on / type btrfs
> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/root)
>
> I've got a test folder with +C set and then copied a test file into it.
>
> $ lsattr
> C--
>
With raid1 profile, dio read isn't tolerating IO errors if read length is
less than the stripe length (64K).
This fixes the problem by setting bio's error to 0 if a good copy has been
found.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/inode.c | 5 -
1 file chan
-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/inode.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5e71f1e..632b616 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8030,6 +8030,7 @@ stat
(bio);
> + int ret;
> + struct btrfs_device *device;
> +
> + device = container_of(work, struct btrfs_device, flush_work);
> +
> + /* we are in the commit thread */
What is the above comment trying to explain?
Others look good.
Reviewed-by: Liu Bo <bo.li@oracle.c
On Wed, Apr 12, 2017 at 10:42:47AM +0100, Filipe Manana wrote:
> On Wed, Apr 12, 2017 at 2:27 AM, Liu Bo <bo.li@oracle.com> wrote:
> > This case tests whether dio read can repair the bad copy if we have
> > a good copy.
>
> Regardless of being a test we sho
This case tests whether buffered read can repair the bad copy if we
have a good copy.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
tests/btrfs/141 | 152
tests/btrfs/141.out | 39 ++
tests/btrfs/group | 1 +
3
This case tests whether dio read can repair the bad copy if we have
a good copy.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
tests/btrfs/140 | 152
tests/btrfs/140.out | 39 ++
tests/btrfs/group | 1 +
3 files c
A typical use case of 'btrfs-map-logical' is to translate btrfs logical
address to physical address on each disk.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
common/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/config b/common/config
index 59041a3..b7c06bf
Since snapshot aware defrag has been disabled in kernel, and we all have
learned to ignore the failure of btrfs/010, lets just remove it.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
tests/btrfs/010 | 93 -
tests/btrfs/010.ou
cloned bios are likely to be freed by its endio.
Reported-by: Diego <dieg...@gmail.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 73d56ee..ab
On Sat, Apr 08, 2017 at 11:07:37PM +0200, Adam Borowski wrote:
> Unbreaks ARM and possibly other 32-bit architectures.
>
Thanks a lot for the fix.
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
> Fixes: 7d0ef8b4d: Btrfs: update scrub_parity to use u64 stripe
On Sun, Apr 09, 2017 at 08:08:05PM +0300, Nikolay Borisov wrote:
>
>
> On 7.04.2017 23:11, Liu Bo wrote:
> > Commit 2dabb3248453 ("Btrfs: Direct I/O read: Work on sectorsized blocks")
> > introduced this bug during iterating bio pages in dio read's endi
On Mon, Apr 10, 2017 at 07:13:46PM +0200, Diego wrote:
> In the latest git, with KASAN enabled:
>
> [ 180.560145] BUG: KASAN: use-after-free in btrfs_map_bio+0x994/0x10b0 at
> addr 8803801a76fc
> [ 180.560151] Read of size 4 by task localStorage DB/924
> [ 180.560160] CPU: 0 PID: 924
ere is one more block in the same page, so page offset is increased and
the bio which is created to repair the bad block then has an incorrect
bvec.bv_offset, and a later access of the page content would throw a
segment fault.
This also adds ASSERT to check page offset against page size.
Signed-o
On Thu, Apr 06, 2017 at 04:21:50PM +0200, David Sterba wrote:
> On Wed, Apr 05, 2017 at 02:04:19PM -0700, Liu Bo wrote:
> > When doing directIO repair, we have this oops
> >
> > [ 1458.532816] general protection fault: [#1] SMP
> > ...
> > [ 1458.5362
ate patch).
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/inode.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 3ec5a05..8e71ed7 100644
--- a/fs/btrfs/inode.c
On Mon, Apr 03, 2017 at 01:45:47PM -0700, Liu Bo wrote:
> @bio_offset is passed into submit_bio_hook and is used at
> btrfs_wq_submit_bio(), but only dio code makes use of @bio_offset, so
> remove other dead code.
>
Please ignore this one.
Thanks,
-liubo
> Cc: David Sterba &
@bio_offset is passed into submit_bio_hook and is used at
btrfs_wq_submit_bio(), but only dio code makes use of @bio_offset, so
remove other dead code.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 7 +--
1 fil
z>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/scrub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index b9525ca..fab351c 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -140,7 +140,7 @@ struct scrub_
This is fixing code pieces where we use div_u64 when passing a u64 divisor.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/dev-replace.c | 2 +-
fs/btrfs/scrub.c | 4 ++--
fs/btrfs/volumes.c | 8
3 files changed, 7 inse
On Fri, Mar 31, 2017 at 09:29:20AM +0800, Qu Wenruo wrote:
>
>
> At 03/31/2017 12:49 AM, Liu Bo wrote:
> > On Thu, Mar 30, 2017 at 02:32:47PM +0800, Qu Wenruo wrote:
> > > Unlike mirror based profiles, RAID5/6 recovery needs to read out the
> > > whole full str
On Thu, Mar 30, 2017 at 02:32:48PM +0800, Qu Wenruo wrote:
> When scrubbing a RAID5 which has recoverable data corruption (only one
> data stripe is corrupted), sometimes scrub will report more csum errors
> than expected. Sometimes even unrecoverable error will be reported.
>
> The problem can
: lock_full_stripe() and unlock_full_stripe()
> for RAID5/6.
> Which stores a rb_tree of mutex for full stripes, so scrub callers can
> use them to lock a full stripe to avoid race.
>
> Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
> Reviewed-by: Liu Bo <bo.li@oracle.com>
> -
On Wed, Mar 29, 2017 at 09:33:19AM +0800, Qu Wenruo wrote:
[...]
>
> Reported-by: Goffredo Baroncelli
> Signed-off-by: Qu Wenruo
> ---
> fs/btrfs/scrub.c | 14 ++
> 1 file changed, 14 insertions(+)
>
> diff --git a/fs/btrfs/scrub.c
return -ENOENT;
Ditto.
> + if (!(bg_cache->flags & BTRFS_BLOCK_GROUP_RAID56_MASK))
> + goto out;
> +
> + locks_root = _cache->full_stripe_locks_root;
> + ret = get_full_stripe_logical(fs_info, bytenr, _start);
> + if (ret < 0)
>
ds/lead/
> Fix it by increasing bio_counter before calling btrfs_map_sblock() and
> decrease the bio_counter when corresponding recover is finished.
>
*decreasing
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
> Cc: Liu Bo <bo.li....@oracle.com>
> Reported-by:
least 2 places are calling
> btrfs_map_sblock() without protection of bio_counter, leading to the
> problem.
>
> This patch fixes the problen by
typo: *problem"
> 1) Wait bio_counter before freeing target device when canceling replace
> 2) When calling btrfs_map_sblock() fo
ages[], which contains old on-disk
> data.
>
s/appending/append/
> And when we submit parity data to disk, we calculate parity using
> rbio->bio_pages[] first, if rbio->bio_pages[] not found, then fallback
> to rbio->stripe_pages[].
>
*is not found
> The patch fix it b
skip this page when repairing bad copy from good copy.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: Put more details in changelog.
fs/btrfs/scrub.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/scrub.
In raid56 scenario, after trying parity recovery, we didn't set
mirror_num for btrfs_bio with failed mirror_num, hence
end_bio_extent_readpage() will report a random mirror_num in dmesg
log.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: Se
ock during read.
The trick is to use BTRFS_MAP_READ instead of BTRFS_MAP_WRITE to get the
device and position on it.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: Fix typo and add comments for why BTRFS_MAP_READ is used.
fs/btrfs/e
the index in the
checksum array and inode's readpage_io_failed_hook doesn't offer that
offset.
Cc: David Sterba <dste...@suse.cz>
Reviewed-by: David Sterba <dste...@suse.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: fix grammar typos and additional details about th
On Mon, Mar 27, 2017 at 07:07:15PM +0200, David Sterba wrote:
> On Fri, Mar 24, 2017 at 12:13:42PM -0700, Liu Bo wrote:
> > In raid56 senario, after trying parity recovery, we didn't set
> > mirror_num for btrfs_bio with failed mirror_num, hence
> > end_bio_extent_readpage()
On Mon, Mar 27, 2017 at 06:59:44PM +0200, David Sterba wrote:
> On Fri, Mar 24, 2017 at 12:13:35PM -0700, Liu Bo wrote:
> > Now that scrub can fix data errors with the help of parity for raid56
> > profile, repair during read is able to as well.
> >
> > Although the m
On Tue, Mar 28, 2017 at 02:50:06PM +0200, David Sterba wrote:
> On Mon, Mar 06, 2017 at 12:23:30PM -0800, Liu Bo wrote:
> > Btrfs creates hole extents to cover any unwritten section right before
> > doing buffer writes after commit 3ac0d7b96a26 ("btrfs: Change the expandin
Otherwise, we may later skip this page when repairing bad copy from
good copy.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/scrub.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/b
sblock(), until rbio endio.
>
> Liu Bo <bo.li@oracle.com>
> Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
> ---
> fs/btrfs/raid56.c | 2 ++
> fs/btrfs/scrub.c | 5 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/fs/btrfs/raid56.c b/fs/bt
es[], which contains old on-disk
> data.
>
> And when we submit parity data to disk, we calculate parity using
> rbio->bio_pages[] first, if rbio->bio_pages[] not found, then fallback
> to rbio->stripe_pages[].
>
> The patch fix it by not appending pages from sparity->
the index in the
checksum array and inode's readpage_io_failed_hook doesn't offer that
offset.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: fix grammar typos and additional details about the change.
fs/
In raid56 senario, after trying parity recovery, we didn't set
mirror_num for btrfs_bio with failed mirror_num, hence
end_bio_extent_readpage() will report a random mirror_num in dmesg
log.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/v
ock during read.
The trick is to use BTRFS_MAP_READ instead of BTRFS_MAP_WRITE to get the
device and position on it.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 35 ++-
1 file changed, 22 in
the index in the
checksum array.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 46 --
fs/btrfs/inode.c | 7 +++
2 files changed, 31 insertions(+), 22 deletions(-)
diff --git
On Sun, Mar 19, 2017 at 07:18:59PM +0200, Alex Lyakas wrote:
> We have a commit_root_sem, which is a read-write semaphore that protects the
> commit roots.
> But it is also used to protect the list of caching block groups.
>
> As a result, while doing "slow" caching, the following issue is seen:
On Tue, Mar 21, 2017 at 10:23:56AM +0800, Qu Wenruo wrote:
>
>
> At 03/21/2017 10:08 AM, Liu Bo wrote:
> > On Tue, Mar 21, 2017 at 08:44:18AM +0800, Qu Wenruo wrote:
> > >
> > >
> > > At 03/21/2017 04:23 AM, Liu Bo wrote:
> > > > On
On Tue, Mar 21, 2017 at 08:44:18AM +0800, Qu Wenruo wrote:
>
>
> At 03/21/2017 04:23 AM, Liu Bo wrote:
> > On Mon, Mar 20, 2017 at 02:21:48PM +0800, Qu Wenruo wrote:
> > >
> > >
> > > At 03/18/2017 10:03 AM, Liu Bo wrote:
> > > > On
On Wed, Mar 15, 2017 at 05:02:39PM +0100, David Sterba wrote:
> We can read fs_info from dev.
>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
> fs/btrfs/reada.c | 7 +++
> 1 file changed
On Wed, Mar 15, 2017 at 05:02:36PM +0100, David Sterba wrote:
> We can read fs_info from dev.
>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
> fs/btrfs/reada.c | 6 +++---
> 1 file changed
On Wed, Mar 15, 2017 at 05:02:42PM +0100, David Sterba wrote:
> The name is misleading and the local variable serves no purpose.
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
> fs/btrfs/reada.c | 6
On Wed, Mar 15, 2017 at 05:02:33PM +0100, David Sterba wrote:
> We can read fs_info from eb.
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
> fs/btrfs/ctree.h | 3 +--
> fs/btrfs/disk-io.c | 4
ecause readahead is optional and not on any
> critical writeout path.
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
> fs/btrfs/disk-io.c | 2 +-
> fs/btrfs/reada.c | 7 +++
> 2 files changed, 8
On Wed, Mar 15, 2017 at 05:02:26PM +0100, David Sterba wrote:
> No point using radix_tree_gang_lookup if we're looking up just one slot.
>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
as an allocation above anyway, but also
> because readahead is optional and not on any critical writeout path.
>
Reviewed-by: Liu Bo <bo.li@oracle.com>
Thanks,
-liubo
> Signed-off-by: David Sterba <dste...@suse.com>
> ---
> fs/btrfs/reada.c | 7 +++
> f
On Mon, Mar 20, 2017 at 02:21:48PM +0800, Qu Wenruo wrote:
>
>
> At 03/18/2017 10:03 AM, Liu Bo wrote:
> > On Fri, Mar 17, 2017 at 01:28:45PM +0800, Qu Wenruo wrote:
> > >
> > >
> > > At 03/17/2017 12:44 PM, Liu Bo wrote:
> > > > On
On Mon, Mar 20, 2017 at 02:30:48PM +0800, Qu Wenruo wrote:
>
>
> At 03/18/2017 10:12 AM, Liu Bo wrote:
> > On Fri, Feb 03, 2017 at 04:20:23PM +0800, Qu Wenruo wrote:
> > > When dev-replace and scrub are run at the same time, dev-replace can be
> > > canceled by s
On Fri, Feb 03, 2017 at 04:20:23PM +0800, Qu Wenruo wrote:
> When dev-replace and scrub are run at the same time, dev-replace can be
> canceled by scrub. It's quite common for btrfs/069.
>
> The backtrace would be like:
> general protection fault: [#1] SMP
> Workqueue: btrfs-endio-raid56
On Fri, Mar 17, 2017 at 01:28:45PM +0800, Qu Wenruo wrote:
>
>
> At 03/17/2017 12:44 PM, Liu Bo wrote:
> > On Fri, Feb 03, 2017 at 04:20:22PM +0800, Qu Wenruo wrote:
> > > Before this patch, btrfs raid56 will keep raid56 rbio even all its IO is
> > > do
On Fri, Mar 17, 2017 at 02:31:08PM +0800, Qu Wenruo wrote:
>
>
> At 03/16/2017 01:36 PM, Liu Bo wrote:
> > On Fri, Feb 03, 2017 at 04:20:21PM +0800, Qu Wenruo wrote:
> > > In the following situation, scrub will calculate wrong parity to
> > > overwrite correct on
On Fri, Feb 03, 2017 at 04:20:22PM +0800, Qu Wenruo wrote:
> Before this patch, btrfs raid56 will keep raid56 rbio even all its IO is
> done.
> This may save some time allocating rbio, but it can cause deadly
> use-after-free bug, for the following case:
>
> Original fs: 4 devices RAID5
>
>
On Thu, Mar 16, 2017 at 08:23:05PM +0800, 李云甫 wrote:
> hi, buddy
>
>I have a file server with btrfs file system, it's work well for several
> months.
>
> but after last system reboot, the /dev/sdb become not mountable.
>
> below is the details. is there any advise?
>
>
> ##Version
On Fri, Feb 03, 2017 at 04:20:21PM +0800, Qu Wenruo wrote:
> In the following situation, scrub will calculate wrong parity to
> overwrite correct one:
>
> RAID5 full stripe:
>
> Before
> | Dev 1 | Dev 2 | Dev 3 |
> | Data stripe 1 | Data stripe 2 | Parity Stripe |
>
On Mon, Feb 20, 2017 at 07:31:33PM +0100, David Sterba wrote:
> Make extent_io_ops::readpage_io_failed_hook callback mandatory and
> define a dummy function for btrfs_extent_io_ops. As the failed IO
> callback is not performance critical, the branch vs extra trade off does
> not hurt.
>
>
On Wed, Mar 15, 2017 at 02:07:53PM +0100, David Sterba wrote:
> On Tue, Mar 14, 2017 at 01:33:54PM -0700, Liu Bo wrote:
> > This is attempting to make __btrfs_map_block less scary :)
> >
> > The major changes are
> >
> > 1) split operations for discard out of __
On Wed, Mar 15, 2017 at 08:57:09AM +0800, Qu Wenruo wrote:
>
>
> At 03/15/2017 04:33 AM, Liu Bo wrote:
> > We have similar code here and there, this merges them into a helper.
> >
> > Signed-off-by: Liu Bo <bo.li@oracle.com>
>
> I really hate to dela
These two BUG_ON()s would never be true, ensured by callers' logic.
Reviewed-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btr
As the part of getting extra mirror in __btrfs_map_block is
self-independent, this puts it into a separate function.
Reviewed-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 161 +---
This adds a helper to show directly whether ops require full stripe.
Reviewed-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs
Since this part is mostly self-independent, this moves it to a separate
function.
Reviewed-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 179 +
1 file changed, 98 inser
We have similar code here and there, this merges them into a helper.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: add @length to the error message in get_chunk_map.
fs/btrfs/extent_io.c | 3 +-
fs/btrfs/volumes.c | 163 +--
fs
Since DISCARD is not as important as an operation like write, we don't
copy it to target device during replace, and it makes __btrfs_map_block
less complex.
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2:
- use the helper get_chunk_map to simplify code
- use round_up instead of ALIGN
since they're basically
self-independant.
v2:
- add length to error handling output.
- use helper get_chunk_map to simplify the code.
Liu Bo (7):
Btrfs: create a helper for getting chunk map
Btrfs: separate DISCARD from __btrfs_map_block
Btrfs: introduce a function to get extra mirror from
With this, we can avoid allocating memory for dev replace copies if the
target dev is not available.
Reviewed-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/volumes.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
dif
less than the regular one.
This adds four tracepoints:
- btrfs_get_extent_show_fi_regular
- btrfs_get_extent_show_fi_inline
- btrfs_truncate_show_fi_regular
- btrfs_truncate_show_fi_inline
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: follow th
On Thu, Mar 09, 2017 at 01:52:22PM +0100, David Sterba wrote:
> On Tue, Mar 07, 2017 at 08:49:42AM -0800, Liu Bo wrote:
> > On Tue, Mar 07, 2017 at 04:48:24PM +0100, David Sterba wrote:
> > > On Fri, Mar 03, 2017 at 06:41:27PM -0800, Liu Bo wrote:
> > >
after increasing the iteration offset, so that
> cleanup range won't cover any created ordered extent.
>
> |<-- delalloc range --->|
> | OE 1 | OE 2 | ... | OE n |
> |<--- --->|<-- cleanup range ->|
>
handled like:
>
> |<-- delalloc range --->|
> | OE 1 | OE 2 | ... | OE n |
> |<>|< --->|<------ old error handler ->|
> || ||
> || \_=> Cleaned up by cleanup_ordered_extents()
> \_=> F
On Thu, Mar 09, 2017 at 03:24:21PM +0100, David Sterba wrote:
> On Thu, Mar 02, 2017 at 06:04:33PM -0800, Liu Bo wrote:
> > On Thu, Mar 02, 2017 at 07:58:01AM -0800, Liu Bo wrote:
> > > On Wed, Mar 01, 2017 at 03:03:19PM -0500, Dave Jones wrote:
> > > > On Tue, Fe
On Tue, Mar 07, 2017 at 04:24:49AM +, fdman...@kernel.org wrote:
> From: Filipe Manana
>
> When attempting to COW a file range (we are starting writeback and doing
> COW), if we manage to reserve an extent for the range we will write into
> but fail after reserving it and
ek=4095 of=ra
> dd if=/dev/zero bs=1048576 count=1 seek=4095 of=rb
> mkfs.btrfs ra rb # defaults to -draid0 -mraid1
> losetup -f ra
> losetup -f rb
> mount /dev/loop0 /mnt/vol1
> btrfs balance start -dconvert=raid1 /mnt/vol1
>
>
> On Tue, Mar 07, 2017 at 12:34:07PM
R15:
> 7f5b054be740
> [ 847.648601] ? trace_hardirqs_off_caller+0x3f/0xaa
> [ 847.685787] ---[ end trace 2a4a3e15382508e8 ]---
>
> So fix this by not attempting to decrement the data space info's
> bytes_may_use counter if we already reserved the extent and an error
>
On Wed, Mar 08, 2017 at 12:17:16AM +, Filipe Manana wrote:
> On Tue, Mar 7, 2017 at 8:59 PM, Liu Bo <bo.li@oracle.com> wrote:
> > On Tue, Mar 07, 2017 at 12:49:58PM -0800, Liu Bo wrote:
> >> On Mon, Mar 06, 2017 at 10:55:46AM +0800, Qu Wenruo wrote:
006d
0001760 5f74 6f43 7400 435f 0053 5f74 7363 7400
0002000 435f 0056 5f74 6164 7400 645f 0062 5f74
(...)
Regarding to this patch,
- Although pg_offset is assumed to be zero, using (PAGE_SIZE -
pg_offset) makes the code look saner, could you please add pg_offset
to the check?
- Could you please wr
btrfs_cleanup_ordered_extents(inode, start, end - start + 1);
> return ret;
> }
>
> @@ -8142,17 +8168,26 @@ static void btrfs_endio_direct_read(struct bio *bio)
> bio_put(bio);
> }
>
> -static void btrfs_endio_direct_write_update_ordered(struct
On Tue, Mar 07, 2017 at 06:42:51AM +0100, Adam Borowski wrote:
> If your filesystem has, eg, data:raid0 metadata:raid1, and you run "btrfs
> balance -dconvert=raid1", the meta.target field will be uninitialized.
> That's otherwise ok, as it's unused except for this warning.
>
> Thus, let's use
On Tue, Mar 07, 2017 at 12:49:58PM -0800, Liu Bo wrote:
> On Mon, Mar 06, 2017 at 10:55:46AM +0800, Qu Wenruo wrote:
> > [BUG]
> > When btrfs_reloc_clone_csum() reports error, it can underflow metadata
> > and leads to kernel assertion on outstanding extents in
&
On Tue, Mar 07, 2017 at 06:32:23PM +0100, David Sterba wrote:
> On Mon, Mar 06, 2017 at 11:19:32PM +, Filipe Manana wrote:
> > On Mon, Mar 6, 2017 at 2:55 AM, Qu Wenruo wrote:
> > > [BUG]
> > > When btrfs_reloc_clone_csum() reports error, it can underflow metadata
> >
On Mon, Mar 06, 2017 at 10:55:46AM +0800, Qu Wenruo wrote:
> [BUG]
> When btrfs_reloc_clone_csum() reports error, it can underflow metadata
> and leads to kernel assertion on outstanding extents in
> run_delalloc_nocow() and cow_file_range().
>
> BTRFS info (device vdb5): relocating block group
On Tue, Mar 07, 2017 at 01:54:31PM +0800, Qu Wenruo wrote:
>
>
> At 03/07/2017 10:20 AM, Liu Bo wrote:
> > The bug is a regression after commit
> > (da2c7009f6ca "btrfs: teach __process_pages_contig about PAGE_LOCK
> > operation")
> > and commit
>
On Tue, Mar 07, 2017 at 04:48:24PM +0100, David Sterba wrote:
> On Fri, Mar 03, 2017 at 06:41:27PM -0800, Liu Bo wrote:
> > + TP_printk_btrfs(
> > + "root %llu(%s) ino %llu sz 0x%llx disk_isz 0x%llx "
> > + "file extent range [0x%llx 0x%l
On Wed, Mar 01, 2017 at 10:44:53AM +0800, Qu Wenruo wrote:
>
>
> At 03/01/2017 09:04 AM, Liu Bo wrote:
> > Btrfs creates hole extents to cover any unwritten section right before
> > doing buffer writes after commit 3ac0d7b96a26 ("btrfs: Change the expanding
> >
om>
Reported-by: Dave Jones <da...@codemonkey.org.uk>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent_io.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 28e8192..8df7974 100644
--- a/fs/bt
On Sun, Mar 05, 2017 at 11:59:17AM -0500, Dave Jones wrote:
> After commenting out the assertion that Liu bo pointed out was bogus,
> my trinity runs last a little longer.. This is a new one I think..
>
Could you please try this patch?
Thanks,
-liubo
diff --git a/fs/btrfs/extent_
On Wed, Mar 01, 2017 at 04:48:20PM +0800, Qu Wenruo wrote:
>
>
> At 03/01/2017 09:04 AM, Liu Bo wrote:
> > @pos, not aligned @start_pos, should be used to check whether the eof page
> > needs to be marked as readonly, thus @start_pos can be removed.
> >
>
uwen...@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
v2: update comments to be precise.
fs/btrfs/file.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 520cb72..dcf0286 100644
--- a/fs/btrfs/file.c
++
We also don't bother to flush free space cache while with free space
tree.
Cc: David Sterba <dste...@suse.cz>
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/extent-tree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/
On Sun, Mar 05, 2017 at 11:59:17AM -0500, Dave Jones wrote:
> After commenting out the assertion that Liu bo pointed out was bogus,
> my trinity runs last a little longer.. This is a new one I think..
I hit this once, haven't got enough info. to check what went wrong, but I'm
w
On Mon, Feb 20, 2017 at 11:54:31AM +0800, Qu Wenruo wrote:
>
>
> At 02/18/2017 09:28 AM, Liu Bo wrote:
> > Since DISCARD is not as important as an operation like write, we don't
> > copy it to target device during replace, and it makes __btrfs_map_block
> > less comp
n remount, we set
> s_flags &= MS_RDONLY when we see a conflict in s_flags and passed parameter
> flags and let mount continue as it is. This will allow the first mount attempt
> to succeed, and we can get rid of the re-kern_mount() and remount sequence
> altogether.
Reviewed-by:
less than the regular one.
This adds four tracepoints:
- btrfs_get_extent_show_fi_regular
- btrfs_get_extent_show_fi_inline
- btrfs_truncate_show_fi_regular
- btrfs_truncate_show_fi_inline
Signed-off-by: Liu Bo <bo.li@oracle.com>
---
fs/btrfs/inode.c | 15 +
include
601 - 700 of 2439 matches
Mail list logo