Fix a check of len versus PATH_MAX in function copy_symlink(), to
account for the terminating null byte.
Resolves-Coverity-CID: 1296749
Signed-off-by: Vincent Stehlé
---
cmds-restore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
On Wed, Oct 7, 2015 at 4:08 PM, Justin Maggard wrote:
> This test case tests if we are able to unmount a filesystem while
> a quota rescan is running. Up to now (4.3-rc4) this would result
> in a kernel NULL pointer dereference.
Please mention here the title of the patch
Hello everybody,
On Monday 05 of October 2015 22:26:46 Pavel Pisa wrote:
> Hello everybody,
...
> BTRFS has recognized appearance of its partition (even that hanged
> from sdb5 to sde5 when disk "hotplugged" again).
> But it seems that RAID1 components are not in sync and BTRFS
> continues to
On Thu, Oct 08, 2015 at 08:05:09AM +0530, Shriramana Sharma wrote:
> Hello. I see there are some backup tools taking advantage of BtrFS's
> incremental send/receive feature:
> https://btrfs.wiki.kernel.org/index.php/Incremental_Backup. [BTW Ames
> Cornish's ButterSink
On Thu, Sep 3, 2015 at 2:05 AM, Justin Maggard wrote:
> v2: Fix stupid error while making formatting changes...
>
> I was hitting a consistent NULL pointer dereference during shutdown that
> showed the trace running through end_workqueue_bio(). I traced it back to
> the
This patch eliminates the last item of prop_handlers array which is used
to check end of array and instead uses ARRAY_SIZE macro.
Though this is a very tiny optimization, using ARRAY_SIZE macro is a
good practice to iterate array.
Signed-off-by: Byongho Lee
---
On 2015-10-08 04:28, Pavel Pisa wrote:
Hello everybody,
On Monday 05 of October 2015 22:26:46 Pavel Pisa wrote:
Hello everybody,
...
BTRFS has recognized appearance of its partition (even that hanged
from sdb5 to sde5 when disk "hotplugged" again).
But it seems that RAID1 components are not
Reproduce:
(In integration-4.3 branch)
TEST_DEV=(/dev/vdg /dev/vdh)
TEST_DIR=/mnt/tmp
umount "$TEST_DEV" >/dev/null
mkfs.btrfs -f -d raid1 "${TEST_DEV[@]}"
mount -o nospace_cache "$TEST_DEV" "$TEST_DIR"
umount "$TEST_DEV"
mount -o nospace_cache "$TEST_DEV" "$TEST_DIR"
btrfs filesystem
Reproduce:
(In integration-4.3 branch)
TEST_DEV=(/dev/vdg /dev/vdh)
TEST_DIR=/mnt/tmp
umount "$TEST_DEV" >/dev/null
mkfs.btrfs -f -d raid1 "${TEST_DEV[@]}"
mount -o nospace_cache "$TEST_DEV" "$TEST_DIR"
btrfs balance start -dusage=0 $TEST_DIR
btrfs filesystem usage $TEST_DIR
dd
No need to use root->fs_info in btrfs_delete_unused_bgs(),
use fs_info directly instead.
Signed-off-by: Zhao Lei
---
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
On 2015-10-07 22:35, Shriramana Sharma wrote:
Hello. I see there are some backup tools taking advantage of BtrFS's
incremental send/receive feature:
https://btrfs.wiki.kernel.org/index.php/Incremental_Backup. [BTW Ames
Cornish's ButterSink (https://github.com/AmesCornish/buttersink) seems
to be
On Wed, 2015-10-07 at 05:13 +, Darrick J. Wong wrote:
> Modify the reflink tests to support xfs.
>
> Signed-off-by: Darrick J. Wong
> ---
> common/rc | 37 +
> tests/generic/800 |2 +-
> tests/generic/801 |2 +-
>
On Thu, Oct 08, 2015 at 08:49:34PM +0900, Byongho Lee wrote:
> This patch eliminates the last item of prop_handlers array which is used
> to check end of array and instead uses ARRAY_SIZE macro.
> Though this is a very tiny optimization, using ARRAY_SIZE macro is a
> good practice to iterate
On Thu, Oct 08, 2015 at 10:47:09AM +0200, Vincent Stehlé wrote:
> Fix a check of len versus PATH_MAX in function copy_symlink(), to
> account for the terminating null byte.
>
> Resolves-Coverity-CID: 1296749
> Signed-off-by: Vincent Stehlé
Applied, thanks.
--
To
When creating small Btrfs filesystem instances (i.e. filesystem size <= 1GiB),
mkfs.btrfs fails if both sectorsize and nodesize are specified on the command
line and sectorsize != nodesize, since mixed block groups involves both data
and metadata blocks sharing the same block group. This is an
Hello Austin,
thanks for reply.
On Thursday 08 of October 2015 13:47:33 Austin S Hemmelgarn wrote:
> On 2015-10-08 04:28, Pavel Pisa wrote:
> > Hello everybody,
...
> > It seems that SATA controller is not able to activate link which
> > has not been connected at BIOS POST time. This means that
Hello Hugo,
On Thursday 08 of October 2015 23:13:52 Hugo Mills wrote:
> On Thu, Oct 08, 2015 at 07:47:33AM -0400, Austin S Hemmelgarn wrote:
> > On 2015-10-08 04:28, Pavel Pisa wrote:
> > >I go to use "btrfs replace" because there has not been any reply to my
> > > inplace correction question.
On Fri, Oct 09, 2015 at 12:16:43AM +0200, Pavel Pisa wrote:
> Hello Hugo,
>
> On Thursday 08 of October 2015 23:13:52 Hugo Mills wrote:
> > On Thu, Oct 08, 2015 at 07:47:33AM -0400, Austin S Hemmelgarn wrote:
> > > On 2015-10-08 04:28, Pavel Pisa wrote:
> > > >I go to use "btrfs replace" because
On Thu, Oct 08, 2015 at 10:39:48AM +0100, Filipe Manana wrote:
> On Wed, Oct 7, 2015 at 4:08 PM, Justin Maggard wrote:
> > This test case tests if we are able to unmount a filesystem while
> > a quota rescan is running. Up to now (4.3-rc4) this would result
> > in a kernel
On Thu, Oct 08, 2015 at 07:47:33AM -0400, Austin S Hemmelgarn wrote:
> On 2015-10-08 04:28, Pavel Pisa wrote:
> >I go to use "btrfs replace" because there has not been any reply to my
> >inplace correction
> >question. But I expect that clarification if possible/how to resync RAID1
> >after one
Hugo Mills posted on Thu, 08 Oct 2015 06:37:45 + as excerpted:
> On Thu, Oct 08, 2015 at 08:05:09AM +0530, Shriramana Sharma wrote:
>> Hello. I see there are some backup tools taking advantage of BtrFS's
>> incremental send/receive feature:
>>
Now fallocate will do accurate qgroup reserve space check, unlike old
method, which will always reserve the whole length of the range.
With this patch, fallocate will:
1) Iterate the desired range and mark in data rsv map
Only range which is going to be allocated will be recorded in data
In clear_bit_hook, qgroup reserved data is already handled quite well,
either released by finish_ordered_io or invalidatepage.
So calling btrfs_qgroup_free_data() here is completely meaningless, and
since btrfs_qgroup_free_data() may sleep to allocate memory, it will
cause lockdep warning.
This
Current code will always truncate tailing page if its alloc_start is
smaller than inode size.
This behavior will cause a lot of unneeded COW page size extent.
This patch will avoid such problem.
Signed-off-by: Qu Wenruo
---
v2:
Newly introduced
---
fs/btrfs/file.c |
Now each qgroup reserve for data will has its ftrace event for better
debugging.
Signed-off-by: Qu Wenruo
---
v2:
Newly introduced
---
fs/btrfs/qgroup.c| 15 +-
fs/btrfs/qgroup.h| 8 +++
include/trace/events/btrfs.h | 113
btrfs_bio_counter_sub() seems to be missing a memory barrier which might
cause the waker to not notice the waiter and miss sending a wake_up as
in the following figure.
btrfs_bio_counter_sub btrfs_rm_dev_replace_blocked
For btrfs_invalidatepage() and its variant evict_inode_truncate_page(),
there will be pages don't reach disk.
In that case, their reserved space won't be release nor freed by
finish_ordered_io() nor delayed_ref handler.
So we must free their qgroup reserved space, or we will leaking reserved
Use new reserve/free for buffered write and inode cache.
For buffered write case, as nodatacow write won't increase quota account,
so unlike old behavior which does reserve before check nocow, now we
check nocow first and then only reserve data if we can't do nocow write.
Signed-off-by: Qu
Add new version of btrfs_delalloc_reserve_space() and
btrfs_delalloc_release_space() functions, which supports accurate qgroup
reserve.
Signed-off-by: Qu Wenruo
---
v2:
Add new function btrfs_delalloc_release_space() to handle error case.
---
fs/btrfs/ctree.h |
Qgroup reserved space needs to be released from inode dirty map and get
freed at different timing:
1) Release when the metadata is written into tree
After corresponding metadata is written into tree, any newer write will
be COWed(don't include NOCOW case yet).
So we must release its range from
Use new __btrfs_delalloc_reserve_space() and
__btrfs_delalloc_release_space() to reserve and release space for
delalloc.
Signed-off-by: Qu Wenruo
---
v2:
Also use __btrfs_delalloc_release_space() function.
---
fs/btrfs/file.c | 5 +++--
fs/btrfs/inode-map.c | 6
Add new structures and functions for new qgroup reserve implement dirty
phase.
Which will focus on avoiding over-reserve as in that case, which means
for already reserved dirty space range, we won't reserve space again.
This patch adds the needed structure declaration and comments.
For NOCOW and inline case, there will be no delayed_ref created for
them, so we should free their reserved data space at proper
time(finish_ordered_io for NOCOW and cow_file_inline for inline).
Signed-off-by: Qu Wenruo
---
fs/btrfs/extent-tree.c | 7 ++-
Introduce functions btrfs_qgroup_release/free_data() to release/free
reserved data range.
Release means, just remove the data range from data rsv map, but doesn't
free the reserved space.
This is for normal buffered write case, when data is written into disc
and its metadata is added into tree,
Add new function btrfs_add_delayed_qgroup_reserve() function to record
how much space is reserved for that extent.
As btrfs only accounts qgroup at run_delayed_refs() time, so newly
allocated extent should keep the reserved space until then.
So add needed function with related members to do it.
This new function will do all the hard work to reserve precious space
for a write.
The overall work flow will be the following.
File A already has some dirty pages:
0 4K 8K 12K 16K
|///| |///|
And then, someone want to write some data into range [4K, 16K).
Introduce new function release_data_range() to release reserved ranges.
It will iterate through all existing ranges and remove/shrink them.
Note this function will not free reserved space, as the range can be
released in the following conditions:
1) The dirty range gets written to disk.
In
New functions btrfs_qgroup_init/free_data_rsv_map() to init/free data
reserve map.
Data reserve map is used to mark which range already holds reserved
space, to avoid current reserved space leak.
Signed-off-by: Qu Wenruo
---
v2:
Add reserved space leaking check at
In previous rework of qgroup, we succeeded in fixing qgroup accounting
part, making the rfer/excl numbers accurate.
But that's just part of qgroup work, another part of qgroup still has
quite a lot problem, that's qgroup reserve space part which will lead to
EQUOT even we are far from the limit.
Cleanup the old facilities which use old btrfs_qgroup_reserve() function
call, replace them with the newer version, and remove the "__" prefix in
them.
Also, make btrfs_qgroup_reserve/free() functions private, as they are
now only used inside qgroup codes.
Now, the whole btrfs qgroup is swithed
Introduce new function reserve_data_range().
This function will find non-overlap range and to insert it into reserve
map using previously introduced functions.
This provides the basis for later per inode reserve map implement.
Signed-off-by: Qu Wenruo
---
v2:
Add
Introduce the new function to search the most left reserve range in a
reserve map.
It provides the basis for later reserve map implement.
Signed-off-by: Qu Wenruo
---
fs/btrfs/qgroup.c | 36
1 file changed, 36 insertions(+)
diff
New function insert_data_ranges() will insert non-overlap reserve ranges
into reserve map.
It provides the basis for later qgroup reserve map implement.
Signed-off-by: Qu Wenruo
---
v2:
Fix comment typo
---
fs/btrfs/qgroup.c | 124
Introduce new functions btrfs_qgroup_reserve/free_meta() to reserve/free
metadata reserved space.
Signed-off-by: Qu Wenruo
---
fs/btrfs/ctree.h | 3 +++
fs/btrfs/disk-io.c | 1 +
fs/btrfs/qgroup.c | 40
fs/btrfs/qgroup.h |
Add new functions __btrfs_check_data_free_space() and
__btrfs_free_reserved_data_space() to work with new accurate qgroup
reserved space framework.
The new function will replace old btrfs_check_data_free_space() and
btrfs_free_reserved_data_space() respectively, but until all the change
is done,
As we have the new metadata reservation functions, use them to replace
the old btrfs_qgroup_reserve() call for metadata.
Signed-off-by: Qu Wenruo
---
fs/btrfs/extent-tree.c | 14 ++
fs/btrfs/transaction.c | 34 ++
Josef Bacik wrote on 2015/10/08 21:36 -0700:
On 10/08/2015 07:11 PM, Qu Wenruo wrote:
In previous rework of qgroup, we succeeded in fixing qgroup accounting
part, making the rfer/excl numbers accurate.
But that's just part of qgroup work, another part of qgroup still has
quite a lot problem,
On 10/08/2015 07:11 PM, Qu Wenruo wrote:
In previous rework of qgroup, we succeeded in fixing qgroup accounting
part, making the rfer/excl numbers accurate.
But that's just part of qgroup work, another part of qgroup still has
quite a lot problem, that's qgroup reserve space part which will
Josef Bacik wrote:
> On 10/08/2015 05:35 PM, Kosuke Tatsukawa wrote:
>> btrfs_bio_counter_sub() seems to be missing a memory barrier which might
>> cause the waker to not notice the waiter and miss sending a wake_up as
>> in the following figure.
>>
>> btrfs_bio_counter_sub
49 matches
Mail list logo