Hi,
please consider pulling the fix to 4.15. It's been reported recently
that readdir can list stale entries under some conditions. As it is a
user visible bug I'd like to get it fix despite we're in the late rc.
Thanks.
The following changes since commit ec35e48b286959991cdbb886f1bdeda4575c80b4:
Here it is:
---
# ./btrfs-debug-tree.static -t 257 /dev/sdb3 | grep -C 20 30039322 |
tee /mnt/custom/rescue/btrfs-recovery/btrfs-debug.30039322.t257.log
location key (30037910 INODE_ITEM 0) type DIR
transid 136248 data_len 0 name_len 3
Confirmed same problem as previous root.
So branch updated to fix the same problem for root 257.
Please try and see if the following error message is gone:
--
ERROR: root 257 DIR_ITEM[30039322 4007295565] couldn't find relative
INODE_ITEM[0] namelen 0 filename filetype 0
ERROR: root 257 DIR
No luck this time:
# ./btrfs-corrupt-block.static -X /dev/sdb3
ERROR: Failed to unlink the old file "Manifest": No such file or directory
extent buffer leak: start 4210688 len 16384
extent_io.c:607: free_extent_buffer_internal: BUG_ON `eb->flags &
EXTENT_DIRTY` triggered, value 1
[0x416a32]
[0x417
On 2018年01月25日 20:29, ^m'e wrote:
> No luck this time:
>
> # ./btrfs-corrupt-block.static -X /dev/sdb3
> ERROR: Failed to unlink the old file "Manifest": No such file or directory
> extent buffer leak: start 4210688 len 16384
> extent_io.c:607: free_extent_buffer_internal: BUG_ON `eb->flags &
>
On 2018-01-24 18:54, Chris Murphy wrote:
On Wed, Jan 24, 2018 at 5:30 AM, Austin S. Hemmelgarn
wrote:
APFS is really vague on this front, it may be checksumming metadata,
it's not checksumming data and with no option to. Apple proposes their
branded storage devices do not return bogus data. OK
Quite some progress, thanks :-)
The check:
---
# ./btrfs.static check --mode=lowmem /dev/sdb3 2>&1 | tee
/mnt/custom/rescue/btrfs-recovery/btrfs-check.3.log
checking extents
checking free space cache
checking fs roots
ERROR: root 1385 INODE[30039323
On Wed, Jan 24, 2018 at 10:38:29AM +0800, Qu Wenruo wrote:
> Commit 0b2161becf8e ("btrfs-progs: mkfs: Prevent temporary system chunk
> to use space in reserved 1M range") changed the hard-coded temporary
> chunk layout to avoid the first 1M.
>
> However this also affects btrfs_min_dev_size() which
On Wed, Jan 24, 2018 at 11:37:23AM +0200, Nikolay Borisov wrote:
>
>
> On 24.01.2018 04:30, Qu Wenruo wrote:
> > @chunk_objectid of btrfs_make_block_group() function is always fixed to
> > BTRFS_FIRST_FREE_OBJECTID, so there is no need to pass it as parameter
> > explicitly.
> >
> > Signed-off-b
Fstests generic/475 provides a way to fail metadata reads while
checking if checksum exists for the inode inside run_delalloc_nocow(),
and csum_exist_in_range() interprets error (-EIO) as inode having
checksum and makes its caller enters the cow path.
In case of free space inode, this ends up with
@cur_offset is not set back to what it should be (@cow_start) if
btrfs_next_leaf() returns something wrong, and the range [cow_start,
cur_offset) remains locked forever.
cc:
Signed-off-by: Liu Bo
---
fs/btrfs/inode.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btr
This prints out eb->bflags since it contains some useful information,
e.g. whether eb is dirty.
Signed-off-by: Liu Bo
---
fs/btrfs/extent_io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 012d638..efe263f 100644
--- a/f
It's possible that btrfs_sync_log() bails out after one of the two
btrfs_write_marked_extents() which convert extent state's state bit into
EXTENT_NEED_WAIT from EXTENT_DIRTY/EXTENT_NEW, however only EXTENT_DIRTY
and EXTENT_NEW are searched by free_log_tree() so that those extent states
with EXTENT
The highest objectid, which is assigned to new inode, is decided at
the time of initializing fs roots. However, in cases where log replay
gets processed, the btree which fs root owns might be changed, so we
have to search it again for the highest objectid, otherwise creating
new inode would end up
This regression is introduced in
commit 3d48d9810de4 ("btrfs: Handle uninitialised inode eviction").
There are two problems,
a) it is ->destroy_inode() that does the final free on inode, not
->evict_inode(),
b) clear_inode() must be called before ->evict_inode() returns.
This could end up hit
I got these from running generic/475,
WARNING: CPU: 0 PID: 26384 at fs/btrfs/inode.c:3326
btrfs_orphan_commit_root+0x1ac/0x2b0 [btrfs]
BUG: unable to handle kernel NULL pointer dereference at 0010
IP: btrfs_block_rsv_release+0x1c/0x70 [btrfs]
Call Trace:
btrfs_orphan_release_metadat
In cases that the whole fs flips into readonly status due to failures in
critical sections, then log tree's blocks are still dirty, and this leads
to a crash during umount time, the crash is about use-after-free,
umount
-> close_ctree
-> stop workers
-> iput(btree_inode)
-> iput_fi
It's not necessary to hold ->orphan_lock when checking inode's runtime
flags.
Signed-off-by: Liu Bo
---
fs/btrfs/inode.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b3fe0a8..1511db2 100644
--- a/fs/btrfs/ino
On 2018年01月26日 00:40, ^m'e wrote:
> Quite some progress, thanks :-)
>
> The check:
> ---
> # ./btrfs.static check --mode=lowmem /dev/sdb3 2>&1 | tee
> /mnt/custom/rescue/btrfs-recovery/btrfs-check.3.log
> checking extents
> checking free space cac
From: Omar Sandoval
btrfs_orphan_add() has had this case commented out since it was first
introduced in commit d68fc57b7e32 ("Btrfs: Metadata reservation for
orphan inodes"). Most of the orphan cleanup code has been rewritten
since then, so it's safe to say that this code isn't needed.
Signed-of
btrfs_close_extra_devices() is not exactly about just closing the opened
devices, but its about free-ing the stale devices which may have scanned
into the given fsid which is being mounted.
The way it picks devices to be freeed is by going through the
btrfs_fs_devices::dev_list and finding devices
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_NODEPTRS_PER_BLOCK, since
maybe in some situation we do not know root, but just know fs_info.
Signed-off-by: Gu Jinxiang
---
cmds-check.c | 4 ++--
ctree.c | 18 +-
ctree.h | 3 +-
Do a cleanup.
Function btrfs_alloc_extent is no longer be used.
So let's remove it.
Signed-off-by: Gu Jinxiang
---
ctree.h | 6 --
1 file changed, 6 deletions(-)
diff --git a/ctree.h b/ctree.h
index c82e7547..34d2505e 100644
--- a/ctree.h
+++ b/ctree.h
@@ -2487,12 +2487,6 @@ struct extent_b
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_LEAF_DATA_SIZE, since
maybe in some situation we do not know root, but just know fs_info.
Signed-off-by: Gu Jinxiang
---
cmds-check.c | 6 +++---
convert/source-ext2.c | 2 +-
convert/sour
Although skinny_metadata's type is int, its value just can be 0/1.
And if condition be true only when skinny_metadata equals 1,
so in if's executive part, set skinny_metadata to 1 is redundancy.
Remove it.
Signed-off-by: Gu Jinxiang
---
extent-tree.c | 1 -
1 file changed, 1 deletion(-)
diff --
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_MAX_XATTR_SIZE, since
maybe in some situation we do not know root, but just know fs_info.
Signed-off-by: Gu Jinxiang
---
ctree.h| 2 +-
dir-item.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_MAX_INLINE_DATA_SIZE, since
maybe in some situation we do not know root, but just know fs_info.
Signed-off-by: Gu Jinxiang
---
convert/source-ext2.c | 2 +-
convert/source-reiserfs.c | 2 +-
ctree.h
On 2018年01月26日 11:22, Gu Jinxiang wrote:
> Do a cleanup. Also make it consistent with kernel.
> Use fs_info instead of root for BTRFS_LEAF_DATA_SIZE, since
> maybe in some situation we do not know root, but just know fs_info.
>
> Signed-off-by: Gu Jinxiang
> ---
> cmds-check.c |
Hi,
> -Original Message-
> From: Qu Wenruo [mailto:quwenruo.bt...@gmx.com]
> Sent: Friday, January 26, 2018 11:37 AM
> To: Gu, Jinxiang/顾 金香 ;
> linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH 1/6] btrfs-progs: Use fs_info instead of root for
> BTRFS_LEAF_DATA_SIZE
>
>
>
> On 2018年01月
On 2018年01月26日 11:22, Gu Jinxiang wrote:
> Do a cleanup. Also make it consistent with kernel.
> Use fs_info instead of root for BTRFS_NODEPTRS_PER_BLOCK, since
> maybe in some situation we do not know root, but just know fs_info.
>
> Signed-off-by: Gu Jinxiang
> ---
> cmds-check.c | 4 ++--
>
On 2018年01月26日 13:12, Gu, Jinxiang wrote:
> Hi,
>
>> -Original Message-
>> From: Qu Wenruo [mailto:quwenruo.bt...@gmx.com]
>> Sent: Friday, January 26, 2018 11:37 AM
>> To: Gu, Jinxiang/顾 金香 ;
>> linux-btrfs@vger.kernel.org
>> Subject: Re: [PATCH 1/6] btrfs-progs: Use fs_info instead of
On 2018年01月26日 11:22, Gu Jinxiang wrote:
> Do a cleanup. Also make it consistent with kernel.
> Use fs_info instead of root for BTRFS_MAX_INLINE_DATA_SIZE, since
> maybe in some situation we do not know root, but just know fs_info.
>
> Signed-off-by: Gu Jinxiang
> ---
> convert/source-ext2.c
On 2018年01月26日 11:22, Gu Jinxiang wrote:
> Do a cleanup. Also make it consistent with kernel.
> Use fs_info instead of root for BTRFS_MAX_XATTR_SIZE, since
> maybe in some situation we do not know root, but just know fs_info.
>
> Signed-off-by: Gu Jinxiang
> ---
> ctree.h| 2 +-
> dir-item
On 2018年01月26日 11:22, Gu Jinxiang wrote:
> Do a cleanup.
> Function btrfs_alloc_extent is no longer be used.
> So let's remove it.
>
> Signed-off-by: Gu Jinxiang
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> ctree.h | 6 --
> 1 file changed, 6 deletions(-)
>
> diff --git a/ctree.h b/ctree
Hi,
> -Original Message-
> From: Qu Wenruo [mailto:quwenruo.bt...@gmx.com]
> Sent: Friday, January 26, 2018 1:16 PM
> To: Gu, Jinxiang/顾 金香 ;
> linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH 2/6] btrfs-progs: Use fs_info instead of root for
> BTRFS_NODEPTRS_PER_BLOCK
>
>
>
> On 2018年
On 2018年01月26日 11:22, Gu Jinxiang wrote:
> Although skinny_metadata's type is int, its value just can be 0/1.
> And if condition be true only when skinny_metadata equals 1,
> so in if's executive part, set skinny_metadata to 1 is redundancy.
> Remove it.
>
> Signed-off-by: Gu Jinxiang
Reviewed
Hallo,
Sind Sie in einer schwierigen Situation, für die Sie sich für ein
Darlehen suchen? Benötigen Sie eine Finanzierung, um eine Schuld zu
begleichen oder eine Aktivität zu finanzieren? Haben Sie einen
Verbraucherkredit, eine Hypothek, einen persönlichen Kredit, eine
Hypothek, Investition Darleh
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_LEAF_DATA_SIZE, since
maybe in some situation we do not know root, but just know fs_info.
Signed-off-by: Gu Jinxiang
---
cmds-check.c | 6 +++---
convert/source-ext2.c | 2 +-
convert/sour
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_NODEPTRS_PER_BLOCK, since
maybe in some situation we do not know root, but just know fs_info.
Changelog:
v2->v1:
To be consistent with kernel, change macro to inline function.
Signed-off-by: Gu Jinxiang
---
Patch 1~4 and 7: clean up use of btrfs_root.
Patch 5: remove redundancy value assignment.
Patch 6: remove no longer be used function define.
Changelog:
v2->v1:
Patch 2,4: To be consistent with kernel, change macro to inline function.
Patch 3:
Change macro to inline function to be consisten
Although skinny_metadata's type is int, its value just can be 0/1.
And if condition be true only when skinny_metadata equals 1,
so in if's executive part, set skinny_metadata to 1 is redundancy.
Remove it.
Reviewed-by: Qu Wenruo
Signed-off-by: Gu Jinxiang
---
extent-tree.c | 1 -
1 file changed
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_MAX_INLINE_DATA_SIZE, since
maybe in some situation we do not know root, but just know fs_info.
Changelog:
v2->v1:
Change macro to inline function to be consistent with kernel.
And change the function body to
Do a cleanup.
Function btrfs_alloc_extent is no longer be used.
So let's remove it.
Reviewed-by: Qu Wenruo
Signed-off-by: Gu Jinxiang
---
ctree.h | 6 --
1 file changed, 6 deletions(-)
diff --git a/ctree.h b/ctree.h
index 679bbc91..41b14b57 100644
--- a/ctree.h
+++ b/ctree.h
@@ -2501,12 +2
In function leaf_data_end, root is just used to get fs_info,
so change the parameter of this function from btrfs_root to
btrfs_fs_info.
And also make it consistent with kernel.
Signed-off-by: Gu Jinxiang
---
ctree.c | 32 +---
1 file changed, 17 insertions(+), 15 dele
Do a cleanup. Also make it consistent with kernel.
Use fs_info instead of root for BTRFS_MAX_XATTR_SIZE, since
maybe in some situation we do not know root, but just know fs_info.
Changelog:
v2->v1:
To be consistent with kernel, change macro to inline function.
Signed-off-by: Gu Jinxiang
---
ctr
45 matches
Mail list logo