On Fri, Feb 03, 2017 at 04:20:21PM +0800, Qu Wenruo wrote:
> In the following situation, scrub will calculate wrong parity to
> overwrite correct one:
>
> RAID5 full stripe:
>
> Before
> | Dev 1 | Dev 2 | Dev 3 |
> | Data stripe 1 | Data stripe 2 | Parity Stripe |
> --
Since btrfs_reserved_ranges array is just used to store btrfs reserved
ranges, no one will nor should modify them at run time, make them static
and const will be better.
This also eliminates the use of immediate number 3.
Signed-off-by: Qu Wenruo
---
convert/main.c | 16
c
In latest linux api headers, __bitwise is already defined in
/usr/include/linux/types.h.
So kerncompat.h will re-define __bitwise, and cause gcc warning.
Fix it by checking if __bitwise is already define.
Signed-off-by: Qu Wenruo
---
The patch is based on devel branch with the following head:
c
At 03/15/2017 10:38 PM, David Sterba wrote:
On Mon, Mar 13, 2017 at 02:32:04PM -0600, ednadol...@gmail.com wrote:
From: Edmund Nadolski
Define the SEQ_NONE macro to replace (u64)-1 in places where said
value triggers a special-case ref search behavior.
index 9c41fba..20915a6 100644
--- a/
At 03/15/2017 11:17 PM, David Sterba wrote:
The members have been effectively unused since "Btrfs: rework qgroup
accounting" (fcebe4562dec83b3), there's no substitute for
assert_qgroups_uptodate so it's removed as well.
Signed-off-by: David Sterba
Reviewed-by: Qu Wenruo
Thanks for the cle
Btrfs balance with inband dedupe enable/disable will expose a lot of
hidden dedupe bug:
1) Enable/disable race bug
2) Btrfs dedupe tree balance corrupted delayed_ref
3) Btrfs disable and balance will cause balance BUG_ON
Reported-by: Satoru Takeuchi
Signed-off-by: Qu Wenruo
---
tests/btrfs/201
This test case will test if file system works well when handling large
write while available space are all fragmented.
This can expose a bug in a btrfs unmerged patch, which wrongly modified
the delayed allocation code, to exit before allocating all space, and
cause hang when unmounting.
The wron
Btrfs balance will reloate date extent, but its hash is removed too late
at run_delayed_ref() time, which will cause extent ref increased
during balance, cause either find_data_references() gives WARN_ON()
or even run_delayed_refs() fails and cause transaction abort.
Add such concurrency test for
Introduce reconfigure subcommand to co-operate with new kernel ioctl
modification.
Signed-off-by: Qu Wenruo
---
Documentation/btrfs-dedupe-inband.asciidoc | 7 +++
cmds-dedupe-ib.c | 73 +++---
2 files changed, 64 insertions(+), 16 deletions(-)
Patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs.git dedupe_20170306
Inband dedupe(in-memory backend only) ioctl support for btrfs-progs.
User/reviewer/tester can still use previous btrfs-progs patchset to test,
this update is just cleanuping unsupported functions, l
Add basic ioctl header and command group framework for later use.
Alone with basic man page doc.
Signed-off-by: Qu Wenruo
---
Documentation/Makefile.in | 1 +
Documentation/btrfs-dedupe-inband.asciidoc | 40 +
Documentation/btrfs.asciidoc |
Add enable subcommand for dedupe commmand group.
Signed-off-by: Qu Wenruo
---
Documentation/btrfs-dedupe-inband.asciidoc | 114 ++-
btrfs-completion | 6 +-
cmds-dedupe-ib.c | 225 +
ioctl.h
Add status subcommand for dedupe command group.
Signed-off-by: Qu Wenruo
---
Documentation/btrfs-dedupe-inband.asciidoc | 3 ++
btrfs-completion | 2 +-
cmds-dedupe-ib.c | 81 ++
3 files changed, 85 insertions(+),
Btrfs in-band de-duplication test cases for in-memory backend, which covers
the bugs exposed during the development.
Qu Wenruo (3):
fstests: btrfs: Add basic test for btrfs in-band de-duplication
fstests: btrfs: Add testcase for btrfs dedupe and metadata balance
race test
fstests: btrfs:
Add disable subcommand for dedupe command group.
Signed-off-by: Qu Wenruo
---
Documentation/btrfs-dedupe-inband.asciidoc | 5
btrfs-completion | 2 +-
cmds-dedupe-ib.c | 42 ++
3 files changed, 48 insertions(+
Add basic test for btrfs in-band de-duplication(inmemory backend), including:
1) Enable
3) Dedup rate
4) File correctness
5) Disable
Signed-off-by: Qu Wenruo
---
common/defrag | 13 ++
tests/btrfs/200 | 116
tests/btrfs/200.out
On Mon, Feb 20, 2017 at 07:31:33PM +0100, David Sterba wrote:
> Make extent_io_ops::readpage_io_failed_hook callback mandatory and
> define a dummy function for btrfs_extent_io_ops. As the failed IO
> callback is not performance critical, the branch vs extra trade off does
> not hurt.
>
> Signed-o
Am Wed, 15 Mar 2017 23:26:32 +0100
schrieb Kai Krakow :
> Well, bugs can hit you with every filesystem. Nothing as complex as a
Meh... I fooled myself. Find the mistake... ;-)
SPOILER:
"Nothing" should be "something".
--
Regards,
Kai
Replies to list-only preferred.
--
To unsubscribe from th
Am Wed, 15 Mar 2017 23:41:41 +0100
schrieb Kai Krakow :
> Am Wed, 15 Mar 2017 23:26:32 +0100
> schrieb Kai Krakow :
>
> > Well, bugs can hit you with every filesystem. Nothing as complex as
> > a
>
> Meh... I fooled myself. Find the mistake... ;-)
>
> SPOILER:
>
> "Nothing" should be "someth
Am Wed, 15 Mar 2017 07:55:51 + (UTC)
schrieb Duncan <1i5t5.dun...@cox.net>:
> Hérikz Nawarro posted on Mon, 13 Mar 2017 08:29:32 -0300 as excerpted:
>
> > Today is safe to use btrfs for home storage? No raid, just secure
> > storage for some files and create snapshots from it.
>
>
> I'll
From: Goldwyn Rodrigues
This flag informs kernel to bail out if an AIO request will block
for reasons such as file allocations, or a writeback triggered,
or would block while allocating requests while performing
direct I/O.
Unfortunately, aio_flags is not checked for validity. If we
add the flag
From: Goldwyn Rodrigues
A failure to lock i_rwsem would mean there is I/O being performed
by another thread. So, let's bail.
Reviewed-by: Christoph Hellwig
Signed-off-by: Goldwyn Rodrigues
---
mm/filemap.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mm/filemap.c
From: Goldwyn Rodrigues
Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.
This introduces a new function filemap_range_has_page() which
returns true if the file's mapping has a page within the range
mentioned.
Return -EINVAL for buffered AIO: there are multiple
From: Goldwyn Rodrigues
Return EAGAIN if any of the following checks fail
+ i_rwsem is not lockable
+ NODATACOW or PREALLOC is not set
+ Cannot nocow at the desired location
+ Writing beyond end of file which is not allocated
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 25 +
From: Goldwyn Rodrigues
If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.
IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to finish.
Signed-off-by: Goldwy
From: Goldwyn Rodrigues
A new flag BIO_NOWAIT is introduced to identify bio's
orignating from iocb with IOCB_NOWAIT. This flag indicates
to return immediately if a request cannot be made instead
of retrying.
Signed-off-by: Goldwyn Rodrigues
---
block/blk-core.c | 12 ++--
bloc
From: Goldwyn Rodrigues
Return EAGAIN if any of the following checks fail for direct I/O:
+ i_rwsem is lockable
+ Writing beyond end of file (will trigger allocation)
+ Blocks are not allocated at the write location
Signed-off-by: Goldwyn Rodrigues
---
fs/ext4/file.c | 48 ++
From: Goldwyn Rodrigues
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Signed-off-by: Goldwyn Rodrigues
---
fs/iomap.c| 2 ++
include/linux/iomap.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/fs/iomap.c b/fs/iomap.c
index 141c3cd.
Formerly known as non-blocking AIO.
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
- Block allocation for files
- Data writebacks for direct I/O
- Sleeping because of waiting to acquire i_rwsem
- Congested block device
On Wed, Mar 15, 2017 at 02:07:53PM +0100, David Sterba wrote:
> On Tue, Mar 14, 2017 at 01:33:54PM -0700, Liu Bo wrote:
> > This is attempting to make __btrfs_map_block less scary :)
> >
> > The major changes are
> >
> > 1) split operations for discard out of __btrfs_map_block and we don't copy
>
Hello,
Here is a nother lockdep splat I got:
[ 1131.517411] ==
[ 1131.518059] [ INFO: possible circular locking dependency detected ]
[ 1131.518059] 4.11.0-rc1-nbor #147 Tainted: GW
[ 1131.518059]
We can read fs_info from dev.
Signed-off-by: David Sterba
---
fs/btrfs/reada.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 5edf7328f67d..c1fc79cd4b2a 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -235,10 +235,10 @@
We can preallocate the node so insertion does not have to do that under
the lock. The GFP flags for the per-device radix tree are initialized to
GFP_NOFS & ~__GFP_DIRECT_RECLAIM
but we can use GFP_KERNEL, same as an allocation above anyway, but also
because readahead is optional and not on any cri
The name is misleading and the local variable serves no purpose.
Signed-off-by: David Sterba
---
fs/btrfs/reada.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 91df381a60ce..64425c3fe4f5 100644
--- a/fs/btrfs/reada.c
+++ b/fs/
We can read fs_info from eb.
Signed-off-by: David Sterba
---
fs/btrfs/ctree.h | 3 +--
fs/btrfs/disk-io.c | 4 ++--
fs/btrfs/reada.c | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 29b7fc28c607..173fac68323a 100644
--- a/fs/b
We can preallocate the node so insertion does not have to do that under
the lock. The GFP flags for the global radix tree are initialized to
GFP_NOFS & ~__GFP_DIRECT_RECLAIM
but we can use GFP_KERNEL, because readahead is optional and not on any
critical writeout path.
Signed-off-by: David Sterba
I spotted some GFP_NOFS uses in readahead and converted them to GFP_KERNEL with
a few cleanups along the way.
David Sterba (7):
btrfs: preallocate radix tree node for readahead
btrfs: use simpler readahead zone lookups
btrfs: preallocate radix tree node for global readahead tree
btrfs: rem
No point using radix_tree_gang_lookup if we're looking up just one slot.
Signed-off-by: David Sterba
---
fs/btrfs/reada.c | 52 ++--
1 file changed, 22 insertions(+), 30 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index fdae8ca79
We can read fs_info from dev.
Signed-off-by: David Sterba
---
fs/btrfs/reada.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index c1fc79cd4b2a..91df381a60ce 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -649,9 +649,9 @@
The members have been effectively unused since "Btrfs: rework qgroup
accounting" (fcebe4562dec83b3), there's no substitute for
assert_qgroups_uptodate so it's removed as well.
Signed-off-by: David Sterba
---
fs/btrfs/extent-tree.c | 1 -
fs/btrfs/qgroup.c| 12
fs/
On Mon, Mar 13, 2017 at 02:32:03PM -0600, ednadol...@gmail.com wrote:
> @@ -809,14 +814,12 @@ static int __add_missing_keys(struct btrfs_fs_info
> *fs_info,
> /*
> * merge backrefs and adjust counts accordingly
> *
> - * mode = 1: merge identical keys, if key is set
> *FIXME: if we add
On Mon, Mar 13, 2017 at 02:32:04PM -0600, ednadol...@gmail.com wrote:
> From: Edmund Nadolski
>
> Define the SEQ_NONE macro to replace (u64)-1 in places where said
> value triggers a special-case ref search behavior.
> index 9c41fba..20915a6 100644
> --- a/fs/btrfs/backref.h
> +++ b/fs/btrfs/bac
Hi to everyone here!
Firstly thank you all for this amasing project!
I want to claim "virtual TAG file system" feature to be implemented in BTRFS.
What is it?
It is a feature to simplify use and search data (files) with common tags.
Some tags may be defined as a file attribute, like year of cr
On Tue, Mar 14, 2017 at 01:33:54PM -0700, Liu Bo wrote:
> This is attempting to make __btrfs_map_block less scary :)
>
> The major changes are
>
> 1) split operations for discard out of __btrfs_map_block and we don't copy
> discard operations for the target device of dev replace since they're not
Hi to everyone here!
Firstly thank you all for this amasing project!
I want to claim "virtual TAG file system" feature to be implemented in BTRFS.
What is it?
It is a feature to simplify use and search data (files) with common tags.
Some tags may be defined as a file attribute, like year of cr
Hérikz Nawarro posted on Mon, 13 Mar 2017 08:29:32 -0300 as excerpted:
> Today is safe to use btrfs for home storage? No raid, just secure
> storage for some files and create snapshots from it.
I'll echo the others... but with emphasis on a few caveats the others
mentioned but didn't give the e
46 matches
Mail list logo