It's provided by the trans handle.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/ctree.h | 3 +--
fs/btrfs/extent-tree.c | 4 ++--
fs/btrfs/transaction.c | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b037541
It's provided by trans handle
Signed-off-by: Nikolay Borisov
---
fs/btrfs/extent-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 71d59ec02f08..89d640cb313e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/
It's provided by the trans handle
Signed-off-by: Nikolay Borisov
---
V2: Fixed some build failures.
fs/btrfs/ctree.h | 2 +-
fs/btrfs/extent-tree.c | 9 +
fs/btrfs/inode.c | 4 +---
fs/btrfs/transaction.c | 23 +++
4 files changed, 18 inser
ing, so this refactors these uses of max() to use the
> new const_max() instead.
>
> [1] https://lkml.org/lkml/2018/3/7/621
For the btrfs portion :
Reviewed-by: Nikolay Borisov
>
> Signed-off-by: Kees Cook
> ---
> drivers/input/touchscreen/cyttsp4_core.c | 2 +-
> fs/btrfs/
On 16.03.2018 02:39, Nicholas D Steeves wrote:
> Signed-off-by: Nicholas D Steeves
All look fine except one nit, see below.
> ---
> Documentation/btrfs-balance.asciidoc | 2 +-
> Documentation/btrfs-check.asciidoc | 2 +-
> Documentation/btrfs-man5.asciidoc| 8
> cmds-subvolum
On 16.03.2018 20:43, Liu Bo wrote:
> On Tue, Mar 13, 2018 at 3:22 AM, Nikolay Borisov wrote:
>> This function is the entry to the extent allocator and as such has
>> quite a number of parameters. Some of those have subtle effects on the
>> allocation algorithm. Do
On 16.03.2018 20:36, je...@suse.com wrote:
> From: Jeff Mahoney
>
> While running btrfs/011, I hit the following lockdep splat.
>
> This is the important bit:
>pcpu_alloc+0x1ac/0x5e0
>__percpu_counter_init+0x4e/0xb0
>btrfs_init_fs_root+0x99/0x1c0 [btrfs]
>btrfs_get_fs_root.part
there is anything else you can think of, based
> on the above data.
>
> Regards,
> Shyam
>
>
> On Thu, Mar 15, 2018 at 12:59 PM, Nikolay Borisov wrote:
>>
>>
>> On 15.03.2018 09:23, Shyam Prasad N wrote:
>>> Hi,
>>>
>>> Our servers run so
On 19.03.2018 10:21, Peter Chant wrote:
> I got this kernel warning overnight. Possibly during or after a dedup
> using duperemove. I'm not sure if that is relevent. Seems to relate to
> fs/btrfs/backref.c line 1266.
>
> Don't know if it is important. Thought I'd post it just in case.
>
> I
offset.
>
> For tree reloc tree, it's indeed subvolume id.
> But for other trees, it's the transid of when it's created.
>
> Fix it.
>
> Reported-by: Nikolay Borisov
> Signed-off-by: Qu Wenruo
> ---
> print-tree.c | 11 ++-
> 1 file cha
On 19.03.2018 12:50, Qu Wenruo wrote:
> What about this value?
> 18446744073709551607
>
> It's data reloc tree objectid.
> And it's pretty long since it's -9ULL.
>
> At least this makes 2 objectid more readable.
Fair enough.
--
To unsubscribe from this list: send the line "unsubscribe linux-bt
On 19.03.2018 12:54, Nikolay Borisov wrote:
>
>
> On 19.03.2018 12:50, Qu Wenruo wrote:
>> What about this value?
>> 18446744073709551607
>>
>> It's data reloc tree objectid.
>> And it's pretty long since it's -9ULL.
>>
>&
On 19.03.2018 13:48, Shyam Prasad N wrote:
> On Mon, Mar 19, 2018 at 4:37 PM, Nikolay Borisov wrote:
>>
>>
>> On 19.03.2018 13:02, Shyam Prasad N wrote:
>>> Hi,
>>>
>>> Attaching the sysrq-trigger output.
>>
>> Has this been obtained w
offset.
>
> For tree reloc tree, it's indeed subvolume id.
> But for other trees, it's the transid of when it's created.
>
> Fix it.
>
> Reported-by: Nikolay Borisov
> Signed-off-by: Qu Wenruo
> ---
> print-tree.c | 11 ++-
> 1 file cha
owner DATA_RELOC_TREE
Signed-off-by: Nikolay Borisov
---
print-tree.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/print-tree.c b/print-tree.c
index d59f9002f54c..a2f6bfc027c9 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -1188,11 +1188,12 @@ void
On 20.03.2018 11:53, Anand Jain wrote:
> %csum_type is being checked to check the number of csum types we support,
> which is 1 as of now. Instead just check if the type matches with the
> only type we support, that is BTRFS_CSUM_TYPE_CRC32. And further adds
> cleanup.
>
> Signed-off-by: Anand J
On 20.03.2018 12:11, Nikolay Borisov wrote:
>
>
> On 20.03.2018 11:53, Anand Jain wrote:
>> %csum_type is being checked to check the number of csum types we support,
>> which is 1 as of now. Instead just check if the type matches with the
>> only type we support, th
On 20.03.2018 11:53, Anand Jain wrote:
> Return the required -EINVAL from the function btrfs_check_super_csum()
> and move the error logging into the btrfs_check_super_csum() itself.
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/disk-io.c | 13 +++--
> 1 file changed, 7 insertions(+),
On 20.03.2018 11:53, Anand Jain wrote:
> In preparation to use the function btrfs_check_super_csum() for
> the device scan context, make it nonstatic and pass the
> struct block_device instead of the struct fs_info.
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/disk-io.c | 12 ++--
>
gned-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c | 41 +++--
> 1 file changed, 19 insertions(+), 22 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 1657d6aa4fa6..582ed6af3c50 10064
On 21.03.2018 01:33, Anand Jain wrote:
> Return the required -EINVAL and -EUCLEAN from the function
> btrfs_check_super_csum(). And more the error log into the
> parent function.
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/disk-io.c | 28 +---
> 1 file changed, 17 in
time. I'm glad you were able
to prove it's not really done at any other time.
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/ctree.h | 6 +++---
> fs/btrfs/extent-tree.c | 16 ++--
> 2 files changed, 5 insertions(+), 17 deletions(-)
>
> diff --git a/fs/bt
On 20.03.2018 21:25, je...@suse.com wrote:
> From: Jeff Mahoney
>
> Any time the first block group of a new type is created, we add a new
> kobject to sysfs to hold the attributes for that type. Kobject-internal
> allocations always use GFP_KERNEL, making them prone to fs-reclaim races.
> Whil
This function was removed in 24bc2843edd5 ("btrfs:
Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index()") what
remains is a defunct declaration. Remove it.
Signed-off-by: Nikolay Borisov
---
David,
This is a fixlet to the aforementioned patch which is only in your misc-
On 21.03.2018 09:16, Qu Wenruo wrote:
>
>
> On 2018年03月21日 15:03, Nikolay Borisov wrote:
>> This function was removed in 24bc2843edd5 ("btrfs:
>> Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index()") what
>> remains is a defunct declaration. Remo
On 20.03.2018 22:06, Goffredo Baroncelli wrote:
> On 03/20/2018 07:45 AM, Misono, Tomohiro wrote:
>> Deletion of subvolume by non-privileged user is completely restricted
>> by default because we can delete a subvolume even if it is not empty
>> and may cause data loss. In other words, when user_
Use the newly introduced helper and remove the duplicate code.
No functional changes
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-ref.c | 34 ++
1 file changed, 10 insertions(+), 24 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
as somewhat reduced
critical section under delayed_refs->lock spinlock.
Nikolay Borisov (8):
btrfs: Factor out common delayed refs init code
btrfs: Use init_delayed_ref_common in add_delayed_tree_ref
btrfs: Use init_delayed_ref_common in add_delayed_data_ref
btrfs: Open-c
Use the newly introduced common helper. No functional changes
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-ref.c | 35 +++
1 file changed, 11 insertions(+), 24 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index d41d979f277b
point of view - the
code is unchanged.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-ref.c | 66 --
1 file changed, 21 insertions(+), 45 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 7ec2282d2fe0..54bed13
Use the newly introduced function when initialising the head_ref in
add_delayed_ref_head. No functional changes.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-ref.c | 62 --
1 file changed, 4 insertions(+), 58 deletions(-)
diff --git a/fs
ally
it's equivalent to the old WARN_ON and allows to remove the two args
from add_delayed_ref_head.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-ref.c | 38 +-
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/fs/btrfs/delayed-ref.
THe majority of the init code for struct btrfs_delayed_ref_node is
duplicated in add_delayed_data_ref and add_delayed_tree_ref. Factor
out the common bits in init_delayed_ref_common. This function is
going to be used in future patches to clean that up. No functional
changes
Signed-off-by: Nikolay
. Begin untangling it by first extracting the initialization
only code in its own function. It's more or less verbatim copy of the
first part of add_delayed_ref_head.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-ref.c | 68 ++
1 file change
ation.
2. The only piece of code that remains in the critical section is
insert_delayed_ref call.
3. Tracing and memory freeing code is moved outside of the critical
section.
No functional changes, just an overall shorter critical section.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/delayed-
On 21.03.2018 12:19, Anand Jain wrote:
> Recovering from the other copies of the superblock is fundamental
> to BTRFS, which provides resilient against single LBA failure in
nit: s/resilient/resilience.
> the DUP group profile.
Furthermore, the number of superblock copies doesn't really depend o
On 22.03.2018 09:37, Qu Wenruo wrote:
> In print-tree, we have a lot of parsers to convert numeric flags to
> human readable string.
>
> For the buffer size we're using immediate numbers for all their callers.
> Change this to macro so it will be much easier for us to expand the
> buffer size.
>
On 22.03.2018 09:37, Qu Wenruo wrote:
> Just like what we did for leaf, also add this output to make it easier
> to distinguish tree reloc tree blocks.
>
> Signed-off-by: Qu Wenruo
Reviewed-by: Nikolay Borisov
> ---
> print-tree.c | 8
> 1 file changed, 8 in
On 22.03.2018 10:32, Qu Wenruo wrote:
>
>
> On 2018年03月22日 16:20, Nikolay Borisov wrote:
>>
>>
>> On 22.03.2018 09:37, Qu Wenruo wrote:
>>> In print-tree, we have a lot of parsers to convert numeric flags to
>>> human readable string.
>>>
On 19.03.2018 11:18, Qu Wenruo wrote:
> We have several reports about node pointer points to incorrect child
> tree blocks, which could have even wrong owner and level but still with
> valid generation and checksum.
>
> Although btrfs check could handle it and print error message like:
> leaf pa
On 22.03.2018 14:14, Anand Jain wrote:
>
>
> Ok. Will update the change log.
>
>> A better place for this code is really inside btrfs_wipe_existing_sb.
>> Furthermore looking at libblkid it supports a way to wipe multiple
>> superblocks by way of: blkid_do_wipe. I.e
>> https://mirrors.edge.ke
On 22.03.2018 15:01, Anand Jain wrote:
> During the btrfs dev scan make sure that other copies of superblock
> contain the same fsid as the primary SB. So that we bring to the
> users notice if the superblock has been overwritten.
>
> mkfs.btrfs -fq /dev/sdc
> mkfs.btrfs -fq /dev/sdb
> dd if=
On 22.03.2018 15:01, Anand Jain wrote:
> During the mkfs.btrfs -b btrfs_prepare_device() zeros all
> the superblock bytenr locations only if the bytenr is below the
> blockcount. The problem with this is that if the BTRFS is recreated
> with a smaller size then we will leave the stale superblock
Its function has been subsumed by "btrfs rescue zero-log". Remove its
source file and adjust make/tests soruces accordingly.
---
Makefile | 4 +-
btrfs-zero-log.c | 78 ---
tests/misc-tests.sh | 1
Its function has been superseded by btrfs inspect-internal show-super.
Furthermore the tools is currently not built by default. Just remove
it.
---
Makefile | 2 +-
btrfs-show-super.c | 39 ---
2 files changed, 1 insertion(+), 40 deletions(-)
delete
Its function has been superseded by btrfs inspect-internal tree-stats.
Just remove it.
---
Makefile | 2 +-
btrfs-calc-size.c | 39 ---
2 files changed, 1 insertion(+), 40 deletions(-)
delete mode 100644 btrfs-calc-size.c
diff --git a/Makefile b/Make
On 22.03.2018 15:31, David Sterba wrote:
> On Thu, Mar 22, 2018 at 09:29:46PM +0800, Qu Wenruo wrote:
>>
>>
>> On 2018年03月22日 21:18, Nikolay Borisov wrote:
>>> Its function has been subsumed by "btrfs rescue zero-log". Remove its
>>> sour
On 22.03.2018 16:17, Qu Wenruo wrote:
>
>
> On 2018年03月22日 22:00, David Sterba wrote:
>> On Thu, Mar 22, 2018 at 09:53:46PM +0800, Qu Wenruo wrote:
> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
> index 26484648d090..3866b8ab20f1 100644
> --- a/fs/btrfs/backref.c
> +++ b
On 22.03.2018 16:26, Qu Wenruo wrote:
>
>
> On 2018年03月22日 22:20, Nikolay Borisov wrote:
>>
>>
>> On 22.03.2018 16:17, Qu Wenruo wrote:
>>>
>>>
>>> On 2018年03月22日 22:00, David Sterba wrote:
>>>> On Thu, Mar 22, 2018 at 09:53:46
On 23.03.2018 10:28, Misono Tomohiro wrote:
> This patch changes the behavior of rmdir(2) to allow it to delete
> an empty subvolume.
>
> In order to do that the core logic of subvolume deletion is moved from
> ioctl.c to inode.c and named as btrfs_delete_subvolume(), which is
> also called in t
On 23.03.2018 03:31, Qu Wenruo wrote:
> We have several reports about node pointer points to incorrect child
> tree blocks, which could have even wrong owner and level but still with
> valid generation and checksum.
>
> Although btrfs check could handle it and print error message like:
> leaf pa
NIP-
Fix this by moving the code setting index at the beginning of the while
loop. This ensure that for each item in DIR_ITEM we have index set
correctly.
Fixes: 564901eac7a4 ("btrfs-progs: check: introduce print_dir_item_err()")
Signed-off-by: Nikolay Borisov
--
Verify that if we have an otherwise clean filesystem, containging collided
DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not produce
any false positives.
This if fixed by commit titled:
"btrfs-progs: Fix DIR_ITEM checking in lowmem"
Signed-off-by:
On 26.03.2018 11:28, Misono Tomohiro wrote:
> This is a preparation work to allow rmdir(2) to delete a subvolume.
>
> Signed-off-by: Tomohiro Misono
> ---
> fs/btrfs/ctree.h | 1 +
> fs/btrfs/inode.c | 54 ++
> fs/btrfs/ioctl.c | 54
On 25.03.2018 14:44, Qu Wenruo wrote:
>
>
> On 2018年03月23日 22:48, Nikolay Borisov wrote:
>> Verify that if we have an otherwise clean filesystem, containging collided
>> DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not
>> produce
>&g
Verify that if we have an otherwise clean filesystem, containging collided
DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not produce
any false positives.
This if fixed by commit titled:
"btrfs-progs: Fix DIR_ITEM checking in lowmem"
Signed-off-by:
On 26.03.2018 11:27, Anand Jain wrote:
> During the mkfs.btrfs -b btrfs_prepare_device() zeros all
> the superblock bytenr locations only if the bytenr is below the
> blockcount. The problem with this is that if the BTRFS is recreated
> with a smaller size then we will leave the stale superblock
On 27.03.2018 02:50, Anand Jain wrote:
>
>
>> I told you this code can be made a lot simpler, simply by modifying the
>> last argument passed to zero_dev_clamped. I even posted the resulting
>> diff which was just 3 lines changed.
>>
>> I agree that it's a good idea to wipe all available superb
It's no longer used so just remove it.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 29c55e202f2b..76365a214e34 100644
--- a/check/mode-lowmem.c
+++ b/check
It's no longer use and can be dropped.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 34519f30a4aa..29c55e202f2b 100644
--- a/check/mode-lowmem.c
+++ b/check
First this function does the '!!' trick to turn its value into a bool,
yet the return type is int. Second, the kernel counterpart also returns
bool.
Signed-off-by: Nikolay Borisov
---
ctree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ctree.h b/ctr
ch just changes signature of __btrfs_fs_incompat to better match
the logic of the code and be identical to its kernel counterpart. All in all
this series doesn't introduce any functional changes per-se.
Nikolay Borisov (10):
btrfs-progs: Drop ext_ref parameter from find_inode_ref
btrfs-progs
This is a boolean parameter which signals whether the fs has the
EXTENDED_IREF feature flag toggled or not. Since a reference to fs_info
can be obtained there is no need to pollute the interface.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 13 ++---
1 file changed, 6
It's no longer used in that function so can be dropped altogether.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index 76365a214e34..daa088c056b6 100644
It's no longer used in the function so just remove it
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index e26e9bdf3bb3..34519f30a4aa 100644
--- a/check/mode-lowmem.c
All real consumers of that variable have inlined the checks since they
are simple enough. So just remove it.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index eb6ca6453dc5..4f463d4f726f
We can derive this argument from root->fs_info and also make it local
to the sole switch case it's used.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem
This parameter is no longer used in this function, so drop it
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index a8a2f76549a2..2c7b270a3ffa 100644
--- a/check/mode
It's no longer used so just remove it.
Signed-off-by: Nikolay Borisov
---
check/mode-lowmem.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index daa088c056b6..eb6ca6453dc5 100644
--- a/check/mode-lowmem.c
+++ b/check
Its function has been subsumed by "btrfs rescue zero-log". Remove its
source file and adjust make/tests soruces accordingly.
Signed-off-by: Nikolay Borisov
---
.gitignore| 1 -
Documentation/Makefile.in | 1 -
Documentation/btrfs.asciidoc
Its function has been superseded by btrfs inspect-internal tree-stats.
Just remove it.
Signed-off-by: Nikolay Borisov
---
.gitignore| 1 -
Makefile | 2 +-
btrfs-calc-size.c | 39 ---
3 files changed, 1 insertion(+), 41 deletions(-)
delete
Its function has been superseded by btrfs inspect-internal show-super.
Furthermore the tools is currently not built by default. Just remove
it.
Signed-off-by: Nikolay Borisov
---
.gitignore| 1 -
Documentation/Makefile.in | 1 -
Documentation
There is already a replacement in the face of btrfs inspect-internal
dump-tree. And this command is just a simple wrapper around it. Just
remove it and adjust the show-blocks script to call the main btrfs
binary to achieve the same effect.
Signed-off-by: Nikolay Borisov
---
V2 (analogical
nd the
> buffer size.
>
> Signed-off-by: Qu Wenruo
Reviewed-by: Nikolay Borisov
> ---
> changelog:
> v2:
> Move all buffer length macros to the header part.
> Change comment to refer to the buffer length marco for late
On 26.03.2018 11:27, Anand Jain wrote:
> Return the required -EINVAL and -EUCLEAN from the function
> btrfs_check_super_csum(). And more the error log into the
> parent function.
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/disk-io.c | 27 ---
> 1 file changed, 16 ins
On 26.03.2018 11:27, Anand Jain wrote:
> The only caller btrfs_scan_one_device() sets -EINVAL for error from
> btrfs_read_disk_super(), so this patch returns -EINVAL from the latter
> function.
>
> A preparatory patch to add csum check in btrfs_read_disk_super().
>
> Signed-off-by: Anand Jain
On 26.03.2018 11:27, Anand Jain wrote:
> During the btrfs dev scan make sure that other copies of superblock
> contain the same fsid as the primary SB. So that we bring to the
> user notice if the superblock has been overwritten.
>
> mkfs.btrfs -fq /dev/sdc
> mkfs.btrfs -fq /dev/sdb
> dd if=/
On 26.03.2018 11:27, Anand Jain wrote:
> During the scan context, we aren't verifying the superblock-
> checksum when read.
> This patch fixes it by adding the checksum verification function
> btrfs_check_super_csum() in the function btrfs_read_disk_super().
> And makes device scan to error fail
> Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c | 38 +-
> 1 file changed, 17 insertions(+), 21 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 1657d6aa4fa6..b9b4355795
On 27.03.2018 14:30, Nikolay Borisov wrote:
>
>
> On 26.03.2018 11:27, Anand Jain wrote:
>> During the scan context, we aren't verifying the superblock-
>> checksum when read.
>> This patch fixes it by adding the checksum verification function
>> bt
On 26.03.2018 11:27, Anand Jain wrote:
> In preparation to add the superblock csum verification for the
> scan context, make btrfs_check_super_csum() non-static.
>
> Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c | 2 +-
> fs/btrfs
worth it documenting them in the changelog.
>
> Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c | 35 +--
> 1 file changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/d
On 26.03.2018 11:30, Misono Tomohiro wrote:
> This patch changes the behavior of rmdir(2) to allow it to delete
> an empty subvolume by default, unless it is not a default subvolume
> and send is not in progress.
>
> New function btrfs_delete_subvolume() is almost equal to the second half
> of b
On 28.03.2018 01:06, Anand Jain wrote:
>
>
> On 03/27/2018 04:49 PM, Nikolay Borisov wrote:
>>
>>
>> On 26.03.2018 11:27, Anand Jain wrote:
>>> During the btrfs dev scan make sure that other copies of superblock
>>> contain the same fsid as the
On 28.03.2018 02:01, Anand Jain wrote:
>
>
Test script:
Corrupt primary superblock and check if device scan and mount
fails:
mkfs.btrfs -fq /dev/sdc
dd if=/dev/urandom of=/dev/sdc ibs=1 obs=1 count=1 seek=64K
btrfs dev scan
mount /dev/sdb /btr
ed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
> v1->v2:
> Check btrfs_read_disk_super() to be more explicit ret < 0
>
> fs/btrfs/volumes.c | 15 +++
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs
On 28.03.2018 02:39, Anand Jain wrote:
> During the btrfs dev scan make sure that other copies of superblock
> contain the same fsid as the primary SB. So that we bring to the
> user notice if the superblock has been overwritten.
>
> mkfs.btrfs -fq /dev/sdc
> mkfs.btrfs -fq /dev/sdb
> dd if=/
On 28.03.2018 02:39, Anand Jain wrote:
> During the scan context, we aren't verifying the superblock-
> checksum when read.
> This patch fixes it by adding the checksum verification function
> btrfs_check_super_csum() in the function btrfs_read_disk_super().
> And makes device scan to error fail
On 29.03.2018 01:11, Liu Bo wrote:
> When mount fails to read trees like fs tree, checksum tree, extent
> tree, etc, there is not enough information about where went wrong.
>
> With this, messages like
>
> "BTRFS warning (device sdf): failed to read root (objectid=7): -5"
>
> would help us a b
On 29.03.2018 11:22, Misono Tomohiro wrote:
> "fi usage" shows the warning "RAID5/6 numbers will be incorrect" when
> running without root privilege even if raid5/6 is not used. What
> happens is it cannot get the per device profile usage info, so change
> the message more appropriately.
>
> Re
t; Fix pr_err split string
The change log has to go below the scissors line. I guess it can be
fixed at merge time so I don't think a resubmit is warranted.
There is one nit below but I don't think it's critical so :
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c
rwriting superblock during mkfs.
>
> Signed-off-by: Anand Jain
> v1->v2:
> Do an explicit read for primary superblock. Drop kzalloc().
> Fix split pr_err().
Same thing about the change log as in 2/7. Otherwise :
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/volumes.c
string.
> Fix typo in the git commit log.
> Move the csum check after bytenr and btrfs magic verified.
>
> btrfs: make btrfs_check_super_csum() non-static
>
> In preparation to add the superblock csum verification for the
> scan context, make btrfs_check_super_csum() non-sta
On 30.03.2018 05:56, Gu Jinxiang wrote:
> Parameter usagestr is not used, remove it.
>
> Signed-off-by: Gu Jinxiang
Reviewed-by: Nikolay Borisov
> ---
> cmds-filesystem.c | 2 +-
> help.c| 2 +-
> help.h| 3 +--
> 3 files changed, 3 in
irectly when we know the type of
extents we are working with (i.e. in btrfs_free_tree_block). In cases
when the parent function can be called on both metadata/data extents
perform the check in the caller. This hopefully makes the interface
of add_pinned_bytes more intuitive.
Signed-off-by: Nikolay B
On 31.03.2018 01:11, Liu Bo wrote:
> 0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is
> returned, path->nodes[0] could be NULL, log_dir_items lacks such a
> check for <0 and we may run into a null pointer dereference panic.
>
> Signed-off-by: Liu Bo
R
On 31.03.2018 01:11, Liu Bo wrote:
> If errors were returned by btrfs_next_leaf(), replay_dir_deletes needs
> to bail out, otherwise @ret would be forced to be 0 after 'break;' and
> the caller won't be aware of it.
>
> Signed-off-by: Liu Bo
Reviewed-by: Nikolay
tl.c now.
> Its parameter type btrfs_ioctl_space_info* is only for ioctl.
>
> So, make it static and rename it to be original name
> get_block_group_info.
>
> No functional change.
>
> Signed-off-by: Su Yue
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/ctree.h | 2
On 2.04.2018 20:51, Liu Bo wrote:
> On Sun, Apr 1, 2018 at 3:03 AM, Nikolay Borisov wrote:
>>
>>
>> On 31.03.2018 01:11, Liu Bo wrote:
>>> 0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is
>>> returned, path->nodes[0] could be N
On 3.04.2018 08:39, Qu Wenruo wrote:
> For metadata dump (fs restored by btrfs-image), since no data is
> restored check sum verification will definitely report error.
>
> Add such check in check_csums() and prompt for user.
>
> Issue: #103
> Signed-off-by: Qu Wenruo
801 - 900 of 2813 matches
Mail list logo