On 2018/10/24 上午8:36, Marc MERLIN wrote:
> Normally when btrfs fi show will show lost space because
> your trees aren't balanced.
Not always the case.
Btrfs uses two level allocation:
1) Chunk
2 types, data, metadata, and system.
And that's "used" space of "btrfs fi show", or "Device al
24.10.2018 3:36, Marc MERLIN пишет:
> Normally when btrfs fi show will show lost space because
> your trees aren't balanced.
> Balance usually reclaims that space, or most of it.
> In this case, not so much.
>
> kernel 4.17.6:
>
> saruman:/mnt/btrfs_pool1# btrfs fi show .
> Label: 'btrfs_pool1'
btrfs reload was introduced to cleanup the device list inside the btrfs
kernel module.
The problem with the reload approach is that you can't run btrfs test
cases 124,125, 154 and 164 on the system with btrfs as root fs.
Now as we are introducing the btrfs forget feature as an btrfs device
scan o
Support for a new command 'btrfs dev forget [dev]' is proposed here
to undo the effects of 'btrfs dev scan [dev]'. For this purpose
this patch proposes to use ioctl #5 as it was empty.
IOW(BTRFS_IOCTL_MAGIC, 5, ..)
This patch adds new ioctl BTRFS_IOC_FORGET_DEV which can be sent from
the /d
v10:
Make btrfs-progs changes more readable.
With an effort to keep the known bug [1] as it is..
[1]
The cli 'btrfs device scan --all /dev/sdb' which should have scanned
only one device, ends up scanning all the devices and I am not trying
to fix this bug in this patch because..
.
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mounted) from the kernel.
Signed-off-by: Anand Jain
---
cmds-device.c | 59 ++
On 10/12/2018 04:48 PM, Nikolay Borisov wrote:
On 12.10.2018 07:06, Anand Jain wrote:
Support for a new command 'btrfs dev forget [dev]' is proposed here
to undo the effects of 'btrfs dev scan [dev]'. For this purpose
this patch proposes to use ioctl #5 as it was empty.
IOW(BTRFS_IO
On 10/12/2018 05:03 PM, Nikolay Borisov wrote:
On 12.10.2018 07:06, Anand Jain wrote:
This patch adds cli
btrfs device forget [dev]
to remove the given device structure in the kernel if the device
is unmounted. If no argument is given it shall remove all stale
(device which are not mount
On Mon, Oct 22, 2018 at 11:05:08PM +0100, Filipe Manana wrote:
> On Mon, Oct 22, 2018 at 8:18 PM Josef Bacik wrote:
> >
> > On Mon, Oct 22, 2018 at 08:10:37PM +0100, fdman...@kernel.org wrote:
> > > From: Filipe Manana
> > >
> > > When we are writing out a free space cache, during the transaction
Normally when btrfs fi show will show lost space because
your trees aren't balanced.
Balance usually reclaims that space, or most of it.
In this case, not so much.
kernel 4.17.6:
saruman:/mnt/btrfs_pool1# btrfs fi show .
Label: 'btrfs_pool1' uuid: fda628bc-1ca4-49c5-91c2-4260fe967a23
To
On 10/23/18 6:04 PM, Qu Wenruo wrote:
On 2018/10/23 下午5:41, Su Yue wrote:
Since repair will do CoW, the outer path may be invalid,
add an argument path to punch_extent_hole().
When punch_extent_hole() returns, path will still point to the item
before calling punch_extent_hole();
Signed-off
On 10/23/18 6:30 PM, Qu Wenruo wrote:
On 2018/10/23 下午5:41, Su Yue wrote:
Previously, @err are assigned immediately after check but before
repair.
repair_extent_item()'s return value also confuses the caller. If
error has been repaired and returns 0, check_extent_item() will try
to continue
On 2018/10/23 下午5:41, Su Yue wrote:
> From: Su Yanjun
>
> In original mode, if some file extent item has unaligned extent backref,
> fixup_extent_refs can't repair it. This patch will check extent alignment
> then delete file extent with unaligned extent backref.
This looks a little strange t
On 2018/10/23 下午5:41, Su Yue wrote:
> From: Su Yanjun
>
> It may cost more time to search all extent data of correspond files but
> should not influence total speed too much cause that only corrupted
> extent items are participated in.
Sorry, I didn't really get the point of the modification
On 2018/10/23 下午5:41, Su Yue wrote:
> From: Su Yanjun
>
> The reason for revert is that according to the existing situation, the
> probability of problem in the extent tree is higher than in the fs Tree.
> So this feature should be removed.
>
The same problem as previous patch.
We need an e
On 2018/10/23 下午5:41, Su Yue wrote:
> From: Su Yanjun
>
> The reason for revert is that according to the existing situation, the
> probability of problem in the extent tree is higher than in the fs tree.
In fact we should find a place to address the priority when we
check/repair fs trees.
My
On 2018/10/24 上午9:27, Su Yue wrote:
>
>
> On 10/23/18 6:30 PM, Qu Wenruo wrote:
>>
>>
>> On 2018/10/23 下午5:41, Su Yue wrote:
>>> Previously, @err are assigned immediately after check but before
>>> repair.
>>> repair_extent_item()'s return value also confuses the caller. If
>>> error has been
On 2018/10/23 下午5:41, Su Yue wrote:
> If found a extent data item has unaligned part, lowmem repair
> just deletes it.
Fair enough solution.
Much better than the unpredictable original mode solution.
>
> Signed-off-by: Su Yue
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> check/mode-lowmem.
On 2018/10/23 下午5:41, Su Yue wrote:
> The function can delete items in trees besides extent tree.
> Rename and move it for further use.
>
> Signed-off-by: Su Yue
Reviewed-by: Qu Wenruo
> ---
> check/mode-lowmem.c | 99 +++--
> 1 file changed, 51 inse
On 2018/10/23 下午5:41, Su Yue wrote:
> Add support to check unaligned disk_bytenr for extent_data.
>
> Signed-off-by: Su Yue
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> check/mode-lowmem.c | 9 -
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/check/mode-lowmem.c b
On 2018/10/23 下午5:41, Su Yue wrote:
> From: Lu Fengqi
>
> The 'end' parameter of check_file_extent tracks the ending offset of the
> last checked extent. This is used to detect gaps between adjacent extents.
>
> Currently such gaps are wrongly detected since for regular extents only
> the siz
Add Cc to debian user list.
On 2018/10/24 上午3:21, Tony Prokott wrote:
> The trouble is yet unresolved, symptoms are as they were, but I've diagnosed
> a step further. Maybe you can help me advance the diagnosis or better pose my
> question among debian experts, related to adjusting the building
Deduplicate the btrfs file type conversion implementation.
Original patch by Amir Goldstein.
v2:
- Rebased against Linux 4.19 by Phillip Potter
- Compile-time checks added by Phillip Potter to make
sure the BTRFS_FT_x enum values stay same as FT_x values
v1:
- Initial implementation
Signed-of
The trouble is yet unresolved, symptoms are as they were, but I've diagnosed a
step further. Maybe you can help me advance the diagnosis or better pose my
question among debian experts, related to adjusting the building of initrd.
On Thu, 18 Oct 2018 00:08:08 -0700 Qu Wenruo
wrote
On Mon, Oct 01, 2018 at 05:46:11PM +0300, Nikolay Borisov wrote:
> Here is the v2 of the freespace tree repair support patches. Version 1 can be
> found at [0]. For background on the series please refer to the initial cover
> letter. This time round a number of changes have been incorporated base
On Thu, Oct 04, 2018 at 11:26:36AM -0700, Omar Sandoval wrote:
> On Mon, Oct 01, 2018 at 05:46:16PM +0300, Nikolay Borisov wrote:
> > To help implement free space tree checker in user space some kernel
> > function are necessary, namely iterating/deleting/adding freespace
> > items, some internal s
On Mon, Oct 22, 2018 at 05:23:36PM -0700, Liu Bo wrote:
> > Performance improvements:
> >
> > * blocking mode of path is gone, means that only the spinning mode is used;
>
> I'd like to do a few corrections here, the transition from the
> spinning mode to blocking mode is removed, we still need bl
On 2018/10/23 下午5:41, Su Yue wrote:
> Previously, @err are assigned immediately after check but before
> repair.
> repair_extent_item()'s return value also confuses the caller. If
> error has been repaired and returns 0, check_extent_item() will try
> to continue check the nonexistent and cause
On 2018/10/23 下午5:41, Su Yue wrote:
> For files, lowmem repair will try to check nbytes and isize,
> but isize check depends nbytes.
>
> Once bytes has been repaired, then isize should be checked and
> repaired.
> So move nbytes check before isize check. Also set nbytes to
> extent_size once re
On 2018/10/23 下午5:41, Su Yue wrote:
> Since repair will do CoW, the outer path may be invalid,
> add an argument path to punch_extent_hole().
> When punch_extent_hole() returns, path will still point to the item
> before calling punch_extent_hole();
>
> Signed-off-by: Su Yue
Overall it looks
On 2018/10/23 下午5:41, Su Yue wrote:
> This patchset can be fetched from my repo:
> https://github.com/Damenly/btrfs-progs/tree/file_extent_fixes
> which is based on kdave/devel whose HEAD is:
> commit 4f20c27ab33aab3efffe13cdae1b8837c821d0d7 (kdave/devel)
> Author: Nikolay Borisov
> Date: Fri
Lowmem can repair after commit
'btrfs-progs: lowmem: move nbytes check before isize check',
so add the beacon file.
Signed-off-by: Su Yue
---
tests/fsck-tests/001-bad-file-extent-bytenr/.lowmem_repairable | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644
tests/fsck
From: Su Yanjun
The reason for revert is that according to the existing situation, the
probability of problem in the extent tree is higher than in the fs tree.
So this feature should be removed.
Signed-off-by: Su Yanjun
---
check/main.c | 103 +--
From: Su Yanjun
In original mode, if some file extent item has unaligned extent backref,
fixup_extent_refs can't repair it. This patch will check extent alignment
then delete file extent with unaligned extent backref.
Signed-off-by: Su Yanjun
---
check/main.c | 278 +++
From: Su Yanjun
It may cost more time to search all extent data of correspond files but
should not influence total speed too much cause that only corrupted
extent items are participated in.
Signed-off-by: Su Yanjun
---
check/main.c | 110 ++-
1 f
From: Lu Fengqi
The missing extent will lead to the existence of the gap between adjacent
extents. The fsck should can detect the gap correctly and repair by punch
a hole.
Signed-off-by: Lu Fengqi
---
.../.lowmem_repairable | 0
.../038-missing-one-file-extent/defau
For files, lowmem repair will try to check nbytes and isize,
but isize check depends nbytes.
Once bytes has been repaired, then isize should be checked and
repaired.
So move nbytes check before isize check. Also set nbytes to
extent_size once repaired successfully.
Signed-off-by: Su Yue
---
che
The function can delete items in trees besides extent tree.
Rename and move it for further use.
Signed-off-by: Su Yue
---
check/mode-lowmem.c | 99 +++--
1 file changed, 51 insertions(+), 48 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowme
From: Su Yanjun
The reason for revert is that according to the existing situation, the
probability of problem in the extent tree is higher than in the fs Tree.
So this feature should be removed.
Signed-off-by: Su Yanjun
---
check/main.c | 120 +-
From: Lu Fengqi
The 'end' parameter of check_file_extent tracks the ending offset of the
last checked extent. This is used to detect gaps between adjacent extents.
Currently such gaps are wrongly detected since for regular extents only
the size of the extent is added to the 'end' parameter. This
Since repair will do CoW, the outer path may be invalid,
add an argument path to punch_extent_hole().
When punch_extent_hole() returns, path will still point to the item
before calling punch_extent_hole();
Signed-off-by: Su Yue
---
check/mode-lowmem.c | 21 -
1 file changed,
Add support to check unaligned disk_bytenr for extent_data.
Signed-off-by: Su Yue
---
check/mode-lowmem.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 35fe1adf58e6..e8a2e825c0f3 100644
--- a/check/mode-lowmem.c
+++ b/
Previously, @err are assigned immediately after check but before
repair.
repair_extent_item()'s return value also confuses the caller. If
error has been repaired and returns 0, check_extent_item() will try
to continue check the nonexistent and cause flase alerts.
Here make repair_extent_item()'s r
This patchset can be fetched from my repo:
https://github.com/Damenly/btrfs-progs/tree/file_extent_fixes
which is based on kdave/devel whose HEAD is:
commit 4f20c27ab33aab3efffe13cdae1b8837c821d0d7 (kdave/devel)
Author: Nikolay Borisov
Date: Fri Jun 15 07:13:50 2018 +
btrfs-progs: tests
If found a extent data item has unaligned part, lowmem repair
just deletes it.
Signed-off-by: Su Yue
---
check/mode-lowmem.c | 8
1 file changed, 8 insertions(+)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 3c9ecff7e498..5381096fa8b2 100644
--- a/check/mode-lowmem.c
+++
Am 22.10.18 um 22:02 schrieb Gervais, Francois:
> Hi,
>
> I think I lost power on my btrfs disk and it looks like it is now in an
> unfunctional state.
>
> Any idea how I could debug that issue?
>
> Here is what I have:
>
> kernel 4.4.0-119-generic
> btrfs-progs v4.4
>
>
>
> sudo btrfs chec
On Mon, Oct 22, 2018 at 7:22 PM David Sterba wrote:
>
> On Mon, Oct 22, 2018 at 03:07:26AM -0700, Olof Johansson wrote:
> > I hit the below circular locking dependency. Seems like the assumption made
> > in
> > 712e36c5f2a7fa56 ("btrfs: use GFP_KERNEL in btrfs_alloc_inode") either isn't
> > true,
On Mon 22-10-18 20:22:43, David Sterba wrote:
> On Mon, Oct 22, 2018 at 03:07:26AM -0700, Olof Johansson wrote:
> > I hit the below circular locking dependency. Seems like the assumption made
> > in
> > 712e36c5f2a7fa56 ("btrfs: use GFP_KERNEL in btrfs_alloc_inode") either isn't
> > true, or has s
48 matches
Mail list logo