On 28.11.18 г. 9:46 ч., Christoph Hellwig wrote:
> On Wed, Nov 28, 2018 at 09:44:59AM +0200, Nikolay Borisov wrote:
>>
>>
>> On 28.11.18 г. 5:07 ч., Lu Fengqi wrote:
>>> The generic/513 tell that cloning into a file did not strip security
>>> privileges (suid, capabilities) like a regular write
On Wed, Nov 28, 2018 at 09:44:59AM +0200, Nikolay Borisov wrote:
>
>
> On 28.11.18 г. 5:07 ч., Lu Fengqi wrote:
> > The generic/513 tell that cloning into a file did not strip security
> > privileges (suid, capabilities) like a regular write would.
> >
> > Signed-off-by: Lu Fengqi
> > ---
> > T
On 28.11.18 г. 5:07 ч., Lu Fengqi wrote:
> The generic/513 tell that cloning into a file did not strip security
> privileges (suid, capabilities) like a regular write would.
>
> Signed-off-by: Lu Fengqi
> ---
> The xfs and ocfs2 call generic_remap_file_range_prep to drop file
> privileges, I'm
Well, excuse me for thinking it wouldn't since in md-raid it worked.
https://wiki.archlinux.org/index.php/RAID#RAID_level_comparison
Anyway, the error message is truly confusing for someone who doesn't
know about btrfs's implementation. I suppose in md-raid the near
layout is actually RAID 1 and f
On 28.11.18 г. 5:21 ч., Su Yue wrote:
> In function do_trimming(), block_group->lock should be unlocked first.
>
> Fixes: 7fe1e6415026 ("Btrfs: rewrite btrfs_trim_block_group()")
> Signed-off-by: Su Yue
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/free-space-cache.c | 2 +-
> 1 file chang
On 28.11.18 г. 5:23 ч., Lu Fengqi wrote:
> The generic_write_checks will check the combination of IOCB_NOWAIT and
> !IOCB_DIRECT.
True, however btrfs will return ENOSUPP whereas the generic code returns
EINVAL. I guess this is not a big deal and it's likely generic code is
correct, so:
Reviewe
On 28.11.18 г. 5:21 ч., Lu Fengqi wrote:
> The @found is always false when it comes to the if branch. Besides, the
> bool type is more suitable for @found.
Well if you are ranging the type of found variable it also makes sense
to change the return value of the function to bool as well.
>
> Si
On 28.11.18 г. 5:22 ч., Lu Fengqi wrote:
> When it is introduced at commit f094ac32aba3 ("Btrfs: fix NULL pointer
> after aborting a transaction"), it's useless.
>
> Signed-off-by: Lu Fengqi
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/transaction.c | 1 -
> 1 file changed, 1 deletion(-)
The biggest challenge for qgroup to skip reloc tree extents is to detect
correct owner of reloc tree blocks owner.
Unlike most data operations, the root of tree reloc tree can't be
easily detected.
For example, for relocation we call btrfs_copy_root to init reloc tree:
btrfs_copy_root(root=257,
On 2018/11/28 上午11:11, Su Yue wrote:
> This patchset can be fetched from repo:
> https://github.com/Damenly/btrfs-devel/commits/priority_aware_allocator.
> Since patchset 'btrfs: Refactor find_free_extent()' does a nice work
> to simplify find_free_extent(). This patchset dependents on the refac
The generic_write_checks will check the combination of IOCB_NOWAIT and
!IOCB_DIRECT.
Signed-off-by: Lu Fengqi
---
fs/btrfs/file.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 3835bb8c146d..190db9a685a2 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/
When it is introduced at commit f094ac32aba3 ("Btrfs: fix NULL pointer
after aborting a transaction"), it's useless.
Signed-off-by: Lu Fengqi
---
fs/btrfs/transaction.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f92c0a88c4ad..67e84939
The @found is always false when it comes to the if branch. Besides, the
bool type is more suitable for @found.
Signed-off-by: Lu Fengqi
---
fs/btrfs/extent_io.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 582b4b1c41
In function do_trimming(), block_group->lock should be unlocked first.
Fixes: 7fe1e6415026 ("Btrfs: rewrite btrfs_trim_block_group()")
Signed-off-by: Su Yue
---
fs/btrfs/free-space-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/
The generic/513 tell that cloning into a file did not strip security
privileges (suid, capabilities) like a regular write would.
Signed-off-by: Lu Fengqi
---
The xfs and ocfs2 call generic_remap_file_range_prep to drop file
privileges, I'm not sure whether btrfs should do the same thing.
Any sug
If use priority aware allocator, bg->priority_tree->groups_sem should
be written instead of space_info->groups_sem.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 60 +++---
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/extent-tr
Introduce btrfs_update_block_group_priority() to update
block_groups::priority. It will move block group from old tree
to new tree if need.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 76 ++
1 file changed, 76 insertions(+)
diff --git a/fs/btrfs/ex
Introduce create_priority_trees() to create priority trees in
space_info.
Introduce remove_priority_trees() to remove priority trees in
space_info.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 94 ++
1 file changed, 94 insertions(+)
diff --git a/fs/
In origin, find_free_extent() just searches block groups in space_info
one by one.
In priority aware allocator, we first search block groups in
higher priority tree than in lower priority tree.
This helper unify above two ways for further use.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c |
Add mount option "priority_alloc=%s", now %s only supports "usage" and
"off". The latter is used for remount.
"priority_alloc=usage" will active priority aware allocator.
This mount option changes the way of find_free_extent to search
block groups and may cost more time.
Signed-off-by: Su Yue
---
Add member priority_tree to find_free_extent_ctl to represents the
tree using.
Modify find_free_extent to use find_free_extent_search, so it can
work in default mount option and priorit aware allocator.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 114 -
In origin design, the order of space_info::block_groups is changed only
when add/remove block group(s).
In design of priority aware allocator, block groups may be moved from
one priority tree to another one. What the operation is usually that
1) lock block_group
down_write first_tree
down
Introduce compute_block_group_usage() and compute_block_group_usage().
And call the latter in btrfs_make_block_group() and
btrfs_read_block_groups().
compute_priority_level use ilog2(free) to compute priority level.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 60 +
Export btrfs_remove_block_group_priority() to header ctree.h.
Call btrfs_remove_block_group_priority() while deleting
transaction->deleted_bgs, btrfs_free_block_groups() and
btrfs_remove_block_group().
Signed-off-by: Su Yue
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/extent-tree.c | 3 +++
fs/btr
Now implementation of priority allocator only support usage option.
Add BTRFS_MOUNT_PRIORITY_USAGE for further commits.
Signed-off-by: Su Yue
---
fs/btrfs/ctree.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5c4651d8a524..4c56baf9f7cf 100644
--- a
Since if use priority alloc, we should down/up_write()
bg->priority_groups_sem.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index f530a4344368..6627bbe56ad5 100644
Add block group to priority tree in btrfs_read_block_groups()
and btrfs_make_block_groups().
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 2dec02782df1..fc40901b4772 100644
--- a/fs/b
For usage as priority, the varaiables in block groups we concered are
reserved, bytes_super and btrfs_block_group_used(&cache->item).
This patch calls btrfs_set_bg_updating() in locations where above three
varaiables changed to mark block groups needs to be updated, then
calls btrfs_update_block_g
Introduce compute_priority_level() to compute priority level according
priority, now just divides PRIORITY_USAGE_FACOTR.
Introduce add_block_group_priority() to add block groups to
priority tree.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 76 ++
1
Introduce btrfs_remove_block_group_priority() to remove block group
from priority tree.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 5bae757786dc..
Call create_priority_trees() in create_space_info().
Call remove_priority_trees() before free of space_info.
Signed-off-by: Su Yue
---
fs/btrfs/extent-tree.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
To implement priority aware allocator, this patch:
Introduces struct btrfs_priority_tree which contains block groups
in same level.
Adds member priority to struct btrfs_block_group_cache and pointer
points to the priority tree it's located.
Adds member priority_trees to struct btrfs_space_info to
This patchset can be fetched from repo:
https://github.com/Damenly/btrfs-devel/commits/priority_aware_allocator.
Since patchset 'btrfs: Refactor find_free_extent()' does a nice work
to simplify find_free_extent(). This patchset dependents on the refactor.
The base is the commit in kdave/misc-next:
On 2018/11/28 上午3:53, David Sterba wrote:
> The first auto-assigned value to enum is 0, we can use that and not
> initialize all members where the auto-increment does the same. This is
> used for values that are not part of on-disk format.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
On 2018/11/28 上午3:53, David Sterba wrote:
> This is motivated by a merging mistake that happened a few releases ago.
> Two patches updated BTRFS_FS_* flags independently to the same value,
> git did not see any direct merge conflict. The two values got mixed at
> runtime and caused crash.
>
> Up
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> ordered extent flags.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/ordered-data.h | 45 +++--
> 1 f
Hi,
> -Original Message-
> From: Martin Steigerwald [mailto:mar...@lichtvoll.de]
> Sent: Tuesday, November 27, 2018 6:48 PM
> To: Misono, Tomohiro
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH RESEND 0/8] btrfs-progs: sub: Relax the privileges
> of "subvolume list/show"
>
> Mis
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> tree lock types.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/locking.h | 10 ++
> 1 file changed, 6 insertions(+), 4 deletions
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> extent map flags.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/extent_map.h | 21 ++---
> 1 file changed, 14 insertions
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> extent buffer flags;
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/extent_io.h | 28
> 1 file changed, 16 i
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> root tree flags.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/ctree.h | 33 +
> 1 file changed, 17 inse
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> internal filesystem states.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/ctree.h | 63
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> block reserve types.
>
> Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
However more comment will always be a good thing.
Thanks,
Qu
> ---
> fs/btrfs/ctree.h | 19 +
On 2018/11/28 上午3:53, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> global filesystem states.
>
> Signed-off-by: David Sterba
Good comment.
Reviewed-by: Qu Wenruo
Thanks,
Qu
> ---
> fs/btrfs/ctree.h | 25 +++--
> 1 file
On 2018/11/28 上午5:16, Mikko Merikivi wrote:
> I seem unable to convert an existing btrfs device array to RAID 10.
> Since it's pretty much RAID 0 and 1 combined, and 5 and 6 are
> unstable, it's what I would like to use.
>
> After I did tried this with 4.19.2-arch1-1-ARCH and btrfs-progs v4.19,
On Tue, Nov 27, 2018 at 08:53:59PM +0100, David Sterba wrote:
> The first auto-assigned value to enum is 0, we can use that and not
> initialize all members where the auto-increment does the same. This is
> used for values that are not part of on-disk format.
Reviewed-by: Omar Sandoval
> Signed-
On Tue, Nov 27, 2018 at 08:53:57PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> ordered extent flags.
Reviewed-by: Omar Sandoval
> Signed-off-by: David Sterba
> ---
> fs/btrfs/ordered-data.h | 45 +++--
On Tue, Nov 27, 2018 at 08:53:55PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> tree lock types.
>
> Signed-off-by: David Sterba
> ---
> fs/btrfs/locking.h | 10 ++
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git
On Tue, Nov 27, 2018 at 08:53:52PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> extent map flags.
Reviewed-by: Omar Sandoval
> Signed-off-by: David Sterba
> ---
> fs/btrfs/extent_map.h | 21 ++---
> 1 file changed, 14 ins
On Tue, Nov 27, 2018 at 08:53:50PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> extent buffer flags;
This one has a "swtich" typo in the subject. Otherwise,
Reviewed-by: Omar Sandoval
> Signed-off-by: David Sterba
> ---
> fs/btrfs/exten
On Tue, Nov 27, 2018 at 08:53:48PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> root tree flags.
Reviewed-by: Omar Sandoval
> Signed-off-by: David Sterba
> ---
> fs/btrfs/ctree.h | 33 +
> 1 file changed,
On Tue, Nov 27, 2018 at 08:53:45PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> internal filesystem states.
Hah, looks like we never had a bit 0 ;)
Reviewed-by: Omar Sandoval
> Signed-off-by: David Sterba
> ---
> fs/btrfs/ctree.h | 63 +
On Tue, Nov 27, 2018 at 08:53:43PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> block reserve types.
Reviewed-by: Omar Sandoval
> Signed-off-by: David Sterba
> ---
> fs/btrfs/ctree.h | 19 ---
> 1 file changed, 12 inserti
On Tue, Nov 27, 2018 at 08:53:41PM +0100, David Sterba wrote:
> We can use simple enum for values that are not part of on-disk format:
> global filesystem states.
Reviewed-by: Omar Sandoval
Some typos/wording suggestions below.
> Signed-off-by: David Sterba
> ---
> fs/btrfs/ctree.h | 25 +
I seem unable to convert an existing btrfs device array to RAID 10.
Since it's pretty much RAID 0 and 1 combined, and 5 and 6 are
unstable, it's what I would like to use.
After I did tried this with 4.19.2-arch1-1-ARCH and btrfs-progs v4.19,
I updated my system and tried btrfs balance again with t
On Tue, Nov 27, 2018 at 2:32 PM Nikolay Borisov wrote:
>
> On 27.11.18 г. 21:08 ч., Noah Massey wrote:
> > On Tue, Nov 27, 2018 at 11:43 AM Nikolay Borisov wrote:
> >>
> >> On 27.11.18 г. 18:00 ч., Johannes Thumshirn wrote:
> >>> Document why map_private_extent_buffer() cannot return '1' (i.e. th
On Tue, Nov 27, 2018 at 07:59:42PM +, Chris Mason wrote:
> On 27 Nov 2018, at 14:54, Josef Bacik wrote:
>
> > On Tue, Nov 27, 2018 at 10:26:15AM +0200, Nikolay Borisov wrote:
> >>
> >>
> >> On 21.11.18 г. 21:09 ч., Josef Bacik wrote:
> >>> The cleaner thread usually takes care of delayed iputs
On Tue, Nov 27, 2018 at 10:29:57AM +0200, Nikolay Borisov wrote:
>
>
> On 21.11.18 г. 21:09 ч., Josef Bacik wrote:
> > The throttle path doesn't take cleaner_delayed_iput_mutex, which means
>
> Which one is the throttle path? btrfs_end_transaction_throttle is only
> called during snapshot drop a
On 27 Nov 2018, at 14:54, Josef Bacik wrote:
> On Tue, Nov 27, 2018 at 10:26:15AM +0200, Nikolay Borisov wrote:
>>
>>
>> On 21.11.18 г. 21:09 ч., Josef Bacik wrote:
>>> The cleaner thread usually takes care of delayed iputs, with the
>>> exception of the btrfs_end_transaction_throttle path. The c
On Tue, Nov 27, 2018 at 07:43:39PM +, Filipe Manana wrote:
> On Tue, Nov 27, 2018 at 7:22 PM Josef Bacik wrote:
> >
> > On Fri, Nov 23, 2018 at 04:59:32PM +, Filipe Manana wrote:
> > > On Thu, Nov 22, 2018 at 12:35 AM Josef Bacik wrote:
> > > >
> > > > I noticed in a giant dbench run that
On Tue, Nov 27, 2018 at 10:26:15AM +0200, Nikolay Borisov wrote:
>
>
> On 21.11.18 г. 21:09 ч., Josef Bacik wrote:
> > The cleaner thread usually takes care of delayed iputs, with the
> > exception of the btrfs_end_transaction_throttle path. The cleaner
> > thread only gets woken up every 30 sec
The first auto-assigned value to enum is 0, we can use that and not
initialize all members where the auto-increment does the same. This is
used for values that are not part of on-disk format.
Signed-off-by: David Sterba
---
fs/btrfs/btrfs_inode.h | 2 +-
fs/btrfs/ctree.h | 28
We can use simple enum for values that are not part of on-disk format:
root tree flags.
Signed-off-by: David Sterba
---
fs/btrfs/ctree.h | 33 +
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 7176b95b40e7.
We can use simple enum for values that are not part of on-disk format:
internal filesystem states.
Signed-off-by: David Sterba
---
fs/btrfs/ctree.h | 63
1 file changed, 31 insertions(+), 32 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/c
We can use simple enum for values that are not part of on-disk format:
extent buffer flags;
Signed-off-by: David Sterba
---
fs/btrfs/extent_io.h | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index a1
We can use simple enum for values that are not part of on-disk format:
ordered extent flags.
Signed-off-by: David Sterba
---
fs/btrfs/ordered-data.h | 45 +++--
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/
We can use simple enum for values that are not part of on-disk format:
tree lock types.
Signed-off-by: David Sterba
---
fs/btrfs/locking.h | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h
index 29135def468e..684d0ef4faa4 10064
We can use simple enum for values that are not part of on-disk format:
extent map flags.
Signed-off-by: David Sterba
---
fs/btrfs/extent_map.h | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h
index 31977ffd61
We can use simple enum for values that are not part of on-disk format:
global filesystem states.
Signed-off-by: David Sterba
---
fs/btrfs/ctree.h | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index a98507fa9192.
We can use simple enum for values that are not part of on-disk format:
block reserve types.
Signed-off-by: David Sterba
---
fs/btrfs/ctree.h | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index f82ec5e41b0c..40c405d74a
This is motivated by a merging mistake that happened a few releases ago.
Two patches updated BTRFS_FS_* flags independently to the same value,
git did not see any direct merge conflict. The two values got mixed at
runtime and caused crash.
Update all #define sequential values, the above merging pr
On Mon, Nov 26, 2018 at 02:25:52PM +0200, Nikolay Borisov wrote:
>
>
> On 21.11.18 г. 21:03 ч., Josef Bacik wrote:
> > With the introduction of the per-inode block_rsv it became possible to
> > have really really large reservation requests made because of data
> > fragmentation. Since the ticket
On Tue, Nov 27, 2018 at 7:22 PM Josef Bacik wrote:
>
> On Fri, Nov 23, 2018 at 04:59:32PM +, Filipe Manana wrote:
> > On Thu, Nov 22, 2018 at 12:35 AM Josef Bacik wrote:
> > >
> > > I noticed in a giant dbench run that we spent a lot of time on lock
> > > contention while running transaction
On 27.11.18 г. 21:08 ч., Noah Massey wrote:
> On Tue, Nov 27, 2018 at 11:43 AM Nikolay Borisov wrote:
>>
>> On 27.11.18 г. 18:00 ч., Johannes Thumshirn wrote:
>>> Document why map_private_extent_buffer() cannot return '1' (i.e. the map
>>> spans two pages) for the csum_tree_block() case.
>>>
>>
On Fri, Nov 23, 2018 at 04:59:32PM +, Filipe Manana wrote:
> On Thu, Nov 22, 2018 at 12:35 AM Josef Bacik wrote:
> >
> > I noticed in a giant dbench run that we spent a lot of time on lock
> > contention while running transaction commit. This is because dbench
> > results in a lot of fsync()'
On Mon, Nov 26, 2018 at 11:14:12AM +0200, Nikolay Borisov wrote:
>
>
> On 21.11.18 г. 20:59 ч., Josef Bacik wrote:
> > From: Josef Bacik
> >
> > Traditionally we've had voodoo in btrfs to account for the space that
> > delayed refs may take up by having a global_block_rsv. This works most
> >
On Tue, Nov 27, 2018 at 11:43 AM Nikolay Borisov wrote:
>
> On 27.11.18 г. 18:00 ч., Johannes Thumshirn wrote:
> > Document why map_private_extent_buffer() cannot return '1' (i.e. the map
> > spans two pages) for the csum_tree_block() case.
> >
> > The current algorithm for detecting a page bounda
This function really checks whether adding more data to the bio will
straddle a stripe/chunk. So first let's give it a more appropraite
name - btrfs_bio_fits_in_stripe. Secondly, the offset parameter was
never used to just remove it. Thirdly, pages are submitted to either
btree or data inodes so it
On 27.11.18 г. 18:00 ч., Johannes Thumshirn wrote:
> Document why map_private_extent_buffer() cannot return '1' (i.e. the map
> spans two pages) for the csum_tree_block() case.
>
> The current algorithm for detecting a page boundary crossing in
> map_private_extent_buffer() will return a '1' *I
On 27.11.18 г. 18:00 ч., Johannes Thumshirn wrote:
> In map_private_extent_buffer() use offset_in_page() to initialize
> 'start_offset' instead of open-coding it.
>
> Signed-off-by: Johannes Thumshirn
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/extent_io.c | 2 +-
> 1 file changed, 1 ins
On 27.11.18 г. 18:00 ч., Johannes Thumshirn wrote:
> In map_private_extent_buffer() the 'offset' variable is initialized to a
> page aligned version of the 'start' parameter.
>
> But later on it is overwritten with either the offset from the extent
> buffer's start or 0.
>
> So get rid of the
While trying to understand the checksum code I came across some oddities
regarding map_private_extent_buffer() and it's interaction with
csum_tree_block().
These patches address them but are either purely cosmetic or only add a
comment documenting behaviour.
Johannes Thumshirn (3):
btrfs: don't
In map_private_extent_buffer() use offset_in_page() to initialize
'start_offset' instead of open-coding it.
Signed-off-by: Johannes Thumshirn
---
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 7aafdec49dc
Document why map_private_extent_buffer() cannot return '1' (i.e. the map
spans two pages) for the csum_tree_block() case.
The current algorithm for detecting a page boundary crossing in
map_private_extent_buffer() will return a '1' *IFF* the product of the
extent buffer's offset in the page + the
In map_private_extent_buffer() the 'offset' variable is initialized to a
page aligned version of the 'start' parameter.
But later on it is overwritten with either the offset from the extent
buffer's start or 0.
So get rid of the initial initialization.
Signed-off-by: Johannes Thumshirn
---
fs/
On Mon, Nov 26, 2018 at 11:14:12AM +0200, Nikolay Borisov wrote:
> > - if (global_rsv->space_info->full) {
> > - num_dirty_bgs_bytes <<= 1;
> > - num_bytes <<= 1;
> > - }
> > + struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv;
> > + struct btrfs_block_rsv
On Thu, Nov 22, 2018 at 12:09:34PM +0200, Nikolay Borisov wrote:
>
>
> On 21.11.18 г. 20:59 ч., Josef Bacik wrote:
> > From: Josef Bacik
> >
> > The cleanup_extent_op function actually would run the extent_op if it
> > needed running, which made the name sort of a misnomer. Change it to
> > ru
On 27.11.18 г. 16:14 ч., Andrea Gelmini wrote:
> Wise words from Qu:
> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg82557.html
> ---
> Documentation/btrfs-scrub.asciidoc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/btrfs-scrub.asciidoc
On 2018/11/27 下午10:11, Andrea Gelmini wrote:
> On Tue, Nov 27, 2018 at 09:13:02AM +0800, Qu Wenruo wrote:
>>
>>
>> On 2018/11/26 下午11:01, Andrea Gelmini wrote:
>>> One question: I can completely trust the ok return status of scrub? I
>>> know is made for this, but shit happens...
>>
>> No, scr
Wise words from Qu:
https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg82557.html
---
Documentation/btrfs-scrub.asciidoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/btrfs-scrub.asciidoc
b/Documentation/btrfs-scrub.asciidoc
index 4c49269..1fc085c 10
On 27.11.18 г. 15:56 ч., Andrea Gelmini wrote:
> Signed-off-by: Andrea Gelmini
Reviewed-by: Nikolay Borisov
> ---
> Documentation/DocConventions | 4 ++--
> Documentation/ReleaseChecklist| 4 ++--
> Documentation/btrfs-man5.asciidoc | 8
> Documentation/btrfs-p
On Tue, Nov 27, 2018 at 09:13:02AM +0800, Qu Wenruo wrote:
>
>
> On 2018/11/26 下午11:01, Andrea Gelmini wrote:
> > One question: I can completely trust the ok return status of scrub? I
> > know is made for this, but shit happens...
>
> No, scrub only checks csum of data and tree blocks, it doe
Signed-off-by: Andrea Gelmini
---
Documentation/DocConventions | 4 ++--
Documentation/ReleaseChecklist| 4 ++--
Documentation/btrfs-man5.asciidoc | 8
Documentation/btrfs-property.asciidoc | 2 +-
Documentation/btrfs-qgroup.asciidoc | 4 ++--
Documentation/mkfs.bt
On Tue, Nov 27, 2018 at 03:41:55PM +0200, Nikolay Borisov wrote:
> On 27.11.18 г. 15:37 ч., Andrea Gelmini wrote:
>
> Wrong position of space, should be mailing list
Thanks a lot Nikolay for the review.
I'm going to send new version.
Thanks again,
Andrea
On 27.11.18 г. 15:37 ч., Andrea Gelmini wrote:
> Signed-off-by: Andrea Gelmini
> ---
> Documentation/DocConventions | 4 ++--
> Documentation/ReleaseChecklist| 4 ++--
> Documentation/btrfs-man5.asciidoc | 8
> Documentation/btrfs-property.asciidoc | 2 +-
> Docum
On 11/26/2018 05:47 PM, Nikolay Borisov wrote:
On 26.11.18 г. 11:07 ч., Anand Jain wrote:
The fs_info::device_list_mutex and fs_info::scrub_lock creates a
nested locks in btrfs_scrub_dev(). During the lock acquire the
hierarchy is fs_info::device_list_mutex and then fs_info::scrub_lock,
so
Signed-off-by: Andrea Gelmini
---
Documentation/DocConventions | 4 ++--
Documentation/ReleaseChecklist| 4 ++--
Documentation/btrfs-man5.asciidoc | 8
Documentation/btrfs-property.asciidoc | 2 +-
Documentation/btrfs-qgroup.asciidoc | 4 ++--
Documentation/mkfs.bt
On Tue, Nov 27, 2018 at 02:55:33AM +, Nick Terrell wrote:
> > On Nov 19, 2018, at 12:34 PM, Daniel Kiper wrote:
> > On Mon, Nov 19, 2018 at 11:20:06AM -0800, Nick Terrell wrote:
> >> Hi all,
> >>
> >> This patch set imports the upstream zstd library, adds zstd support to the
> >> btrfs module,
Misono Tomohiro - 27.11.18, 06:24:
> Importantly, in order to make output consistent for both root and
> non-privileged user, this changes the behavior of "subvolume list":
> - (default) Only list in subvolume under the specified path.
>Path needs to be a subvolume.
Does that work recursively
On 27.11.18 г. 10:50 ч., Qu Wenruo wrote:
>
>
> On 2018/11/27 下午4:46, Nikolay Borisov wrote:
>>
>>
>> On 27.11.18 г. 10:38 ч., Qu Wenruo wrote:
>>> Current fixup_devices() will only remove DEV_ITEMs and reset DEV_ITEM
>>> size.
>>> Later we need to do more fixup works, so change the name to
>>
1 - 100 of 115 matches
Mail list logo