The transaction handle was being used after being freed.
Cc: Chris Mason c...@fb.com
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 02dc64b
The transaction handle was being used after being freed.
Cc: Chris Mason c...@fb.com
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Removed file extent item argument to clone_update_extent_map() for
more clarity.
fs/btrfs/ioctl.c | 20 +---
1 file
, respectively.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6ea1546..02dc64b 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
f1 48 c7
c2 51 13 36 a0 48 89 fe 31 c0 48 c7 c7 d0 43 36 a0 48 89 e5 e8 6d b5 32 e1 0f
0b 0f 1f 44 00 00 55 b9 11 00 00 00 48 89 e5 41 55 49 89 f5
[25405.18] RIP [a03570ca] assfail.constprop.88+0x1e/0x20
[btrfs]
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2
:
Btrfs: fix crash when starting transaction
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/transaction.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 614eac3..47870ca 100644
--- a/fs
This implements fallocate's FALLOC_FL_COLLAPSE_RANGE operation for
BTRFS. This fallocate operation was introduced in the linux kernel
version 3.15.
Existing tests in xfstests already test this operation explicitly
and implicitly via fsstress.
Signed-off-by: Filipe David Borba Manana fdman
David Borba Manana fdman...@gmail.com
---
tests/generic/017 | 8
1 file changed, 8 insertions(+)
diff --git a/tests/generic/017 b/tests/generic/017
index 13b7254..6495be5 100755
--- a/tests/generic/017
+++ b/tests/generic/017
@@ -51,6 +51,14 @@ BLOCKS=10240
for (( BSIZE = 1024; BSIZE
About to receive 9571342213 bytes
Subvolume /mnt/sdc//snap_incr, 6557345221 / 9571342213 bytes received,
68.51%, 51.04MB/s
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2 stream is now only produced if the send ioctl caller passes in one of
the new flags
Instead of sending a write command with a data buffer filled with 0 value bytes,
use the fallocate command, introduced in the send stream version 2, to tell the
receiver to punch a file hole using the fallocate system call.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2
-allocation and hole punching.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Added new send ioctl flag BTRFS_SEND_FLAG_SUPPORT_FALLOCATE. A version 2
stream is now only produced is the ioctl caller specifies at least one of
the new send flags
.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2 stream is now only produced if the send ioctl caller passes in one of
the new flags (BTRFS_SEND_FLAG_CALCULATE_DATA_SIZE |
BTRFS_SEND_FLAG_SUPPORT_FALLOCATE)
to avoid breaking old clients.
V3: Removed
] [8104a32c] warn_slowpath_common+0x8c/0xc0
[ 2246.451325] [8104a416] warn_slowpath_fmt+0x46/0x50
[ 2246.451328] [81367dc5] ? strlcat+0x65/0x90
()
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V1..V4: There's no v1, v2, v3 and v4. Bumped directly
So that applications can find out what's the highest send stream
version supported/implemented by the running kernel:
$ cat /sys/fs/btrfs/send/stream_version
2
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
Reviewed-by: David Sterba dste...@suse.cz
---
V1..V4: There's no v1
f1 48 c7
c2 51 13 36 a0 48 89 fe 31 c0 48 c7 c7 d0 43 36 a0 48 89 e5 e8 6d b5 32 e1 0f
0b 0f 1f 44 00 00 55 b9 11 00 00 00 48 89 e5 41 55 49 89 f5
[25405.18] RIP [a03570ca] assfail.constprop.88+0x1e/0x20
[btrfs]
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs
The lock_wq wait queue is not used anywhere, therefore just remove it.
On a x86_64 system, this reduced sizeof(struct extent_buffer) from 320
bytes down to 296 bytes, which means a 4Kb page can now be used for
13 extent buffers instead of 12.
Signed-off-by: Filipe David Borba Manana fdman
] [810d91cc] load_module+0x1cdc/0x2630
(...)
Therefore initialize the extent buffer as an empty leaf (level 0).
Issue easy to reproduce when btrfs is built as a module via:
$ for ((i = 1; i = 100; i++)); do rmmod btrfs; modprobe btrfs; done
Signed-off-by: Filipe David Borba Manana
] [810d91cc] load_module+0x1cdc/0x2630
(...)
Therefore initialize the extent buffer as an empty leaf (level 0).
Issue easy to reproduce when btrfs is built as a module via:
$ for ((i = 1; i = 100; i++)); do rmmod btrfs; modprobe btrfs; done
Signed-off-by: Filipe David Borba Manana
to deal with holes when NO_HOLES feature is enabled
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Increased test coverage by testing the cases where a hole overlaps
the start and end of the cloning range.
V3: Test the case where the cloning range includes an hole at the end
to detect
that file data has been changed and must be persisted to the
log.
This issue is fixed by the following linux kernel btrfs patch:
Btrfs: make fsync work after cloning into a file
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Test small files too, consisting
] SyS_finit_module+0x8e/0x90
[ 3197.218168] [81698212] system_call_fastpath+0x16/0x1b
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/tests/btrfs-tests.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs
] SyS_finit_module+0x8e/0x90
[ 3197.218168] [81698212] system_call_fastpath+0x16/0x1b
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Added missing rcu read unlock if a retry is needed.
fs/btrfs/tests/btrfs-tests.c | 12 +++-
1 file changed, 7 insertions(+), 5
as the only element of a leaf (big fat item).
Therefore account for these 2 cases, so that our callers (like
btrfs_previous_item) don't miss an existing item with a key matching
the previous key we computed above.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ctree.c | 12
) was a NOOP, since it relies
on the existence of extent maps in the modified list of the inode's
extent map tree, which was empty. Therefore add new extent maps to
reflect the target clone range.
A test case for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2
) was a NOOP, since it relies
on the existence of extent maps in the modified list of the inode's
extent map tree, which was empty. Therefore add new extent maps to
reflect the target clone range.
A test case for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2
to detect
that file data has been changed and must be persisted to the
log.
This issue is fixed by the following linux kernel btrfs patch:
Btrfs: make fsync work after cloning into a file
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Test small files too, consisting
) was a NOOP, since it relies
on the existence of extent maps in the modified list of the inode's
extent map tree, which was empty. Therefore add new extent maps to
reflect the target clone range.
A test case for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2
shouldn't.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/inode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f265f41..477e64a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6776,6 +6776,7 @@ bool
get didn't succeed. This could
also make us return true when we shouldn't.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/inode.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 38d1e7b..cdbd20e 100644
call page_cache_release after exiting the loop,
which isn't correct because page doesn't point to a valid page, and
possibly return true from the function when we shouldn't.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/inode.c | 4 +++-
1 file changed, 3 insertions(+), 1
) was a NOOP, since it relies
on the existence of extent maps in the modified list of the inode's
extent map tree, which was empty. Therefore add new extent maps to
reflect the target clone range.
A test case for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs
to detect
that file data has been changed and must be persisted to the
log.
This issue is fixed by the following linux kernel btrfs patch:
Btrfs: make fsync work after cloning into a file
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs/056 | 134
-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 95194a9..6680ad9 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -712,6 +712,35 @@ static int
to deal with holes when NO_HOLES feature is enabled
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Increased test coverage by testing the cases where a hole overlaps
the start and end of the cloning range.
V3: Test the case where the cloning range includes an hole at the end
to deal with holes when NO_HOLES feature is enabled
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Increased test coverage by testing the cases where a hole overlaps
the start and end of the cloning range.
tests/btrfs/055 | 112
.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Deal with holes at the boundaries of the cloning range and that
either overlap the boundary completely or partially.
Test case for xfstests updated too to test these 2 cases.
fs/btrfs/ioctl.c | 54
.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Deal with holes at the boundaries of the cloning range and that
either overlap the boundary completely or partially.
Test case for xfstests updated too to test these 2 cases.
V3: Deal with the case where the cloning range
to deal with holes when NO_HOLES feature is enabled
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Increased test coverage by testing the cases where a hole overlaps
the start and end of the cloning range.
V3: Test the case where the cloning range includes an hole at the end
, the holes were created at the destination.
A test case for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Deal with holes at the boundaries of the cloning range and that
either overlap the boundary completely or partially.
Test case for xfstests
)
for inodes that have a large number of file extent items in the btree.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 23 ---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 603c036
in
the inode's io tree.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 38f2169..603c036 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2700,10
.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ecf56af..bf34b7a 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3009,6 +3009,7
)
for inodes that have a large number of file extent items in the btree.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Leave the loop as soon as we process the last extent, to avoid
one extra and unnecessary btree search.
V3: Removed unintentional and unrelated change from v2
for all ordered extents to complete anyway.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/file.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 8accf94..e0be468 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
would return without commiting or
ending the transaction.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Leave the call to btrfs_wait_ordered_range(), it's needed if
the fs is mounted with -o no_flushoncommit.
fs/btrfs/file.c | 4 +++-
1 file changed, 3 insertions(+), 1
This is a test to verify that the btrfs ioctl clone operation is
able to clone extents of a file to different positions of the file,
that is, the source and target files are the same. Existing tests
only cover the case where the source and target files are different.
Signed-off-by: Filipe David
btrfs patch:
Btrfs: send, use the right limits for xattr names and values
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Updated second invocation of btrfs send to be incremental.
This way we test both a full send (snapshot 1) and an incremental
send (differences
subvolume create /mnt/testdir
btrfs subvolume snapshot -r /mnt /mnt/mysnap2
btrfs send -p /mnt/mysnap1 /mnt/mysnap2 -f /tmp/send.data
A test case for xfstests follows.
Reported-by: Robert White rwh...@pobox.com
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs
for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/ioctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 362720a..482cad5 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2314,7
for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Add missing replacements of 'root' with 'dest'.
fs/btrfs/ioctl.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 362720a..38f2169
:
Btrfs: send, don't error in the presence of subvols/snapshots
Btrfs: set dead flag on the right root when destroying snapshot
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs/054 | 109
tests/btrfs/054.out
subvolume create /mnt/testdir
btrfs subvolume snapshot -r /mnt /mnt/mysnap2
btrfs send -p /mnt/mysnap1 /mnt/mysnap2 -f /tmp/send.data
A test case for xfstests follows.
Reported-by: Robert White rwh...@pobox.com
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Simpler
This is a test to verify that the btrfs ioctl clone operation is
able to clone extents of a file to different positions of the file,
that is, the source and target files are the same. Existing tests
only cover the case where the source and target files are different.
Signed-off-by: Filipe David
.
Example: btrfs-debug-tree -t 257 /dev/sdc
Will only dump the tree of the first snapshot or subvolume that was
created.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
btrfs-debug-tree.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/btrfs-debug
processing the send stream. Regardless of its
value, errors are always printed to stderr when they happen, just like
before this change.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
Documentation/btrfs-receive.txt | 3 +++
cmds-receive.c | 24
btrfs patch:
Btrfs: send, use the right limits for xattr names and values
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs/053 | 108
tests/btrfs/053.out | 1 +
tests/btrfs/group | 1 +
3 files changed
specific maximum name and value lengths, which depend
on the leaf size, therefore use these limits to be able to send xattrs with
sizes larger than PATH_MAX.
A test case for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/send.c | 30
So that the same check (btrfs cloner program presence) can be reused
by other tests.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
common/rc | 7 +++
tests/btrfs/035 | 4 +---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/common/rc b/common/rc
index
;
pthread_mutex_unlock(mutex);
return ret;
}
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Protect against ongoing writes by locking the target range in
the io tree and wait for any existing ordered extents for that
range to finish before starting the clone operation.
V3
This is a test to verify that the btrfs ioctl clone operation is
able to clone extents of a file to different positions of the file,
that is, the source and target files are the same. Existing tests
only cover the case where the source and target files are different.
Signed-off-by: Filipe David
/amaiAdvancedStreamingPlugin.txt
btrfs subvolume snapshot -r /mnt /mnt/mysnap1
btrfs send /mnt/mysnap1 -f /tmp/1.snap
A test for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
Cc: Marc Merlin m...@merlins.org
---
fs/btrfs/send.c | 7 +--
1 file changed, 5 insertions(+), 2
:
Btrfs: send, fix corrupted path strings for long paths
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs/051 | 85 +
tests/btrfs/051.out | 1 +
tests/btrfs/group | 1 +
3 files changed, 87 insertions(+)
create
/amaiAdvancedStreamingPlugin.txt
btrfs subvolume snapshot -r /mnt /mnt/mysnap1
btrfs send /mnt/mysnap1 -f /tmp/1.snap
A test for xfstests follows.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
Cc: Marc Merlin m...@merlins.org
---
V2: Fix change title, paths to path.
fs/btrfs/send.c | 7 +--
1
;
pthread_mutex_unlock(mutex);
return ret;
}
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Protect against ongoing writes by locking the target range in
the io tree and wait for any existing ordered extents for that
range to finish before starting the clone operation
] 0x
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
Note: this only affects Chris' integration branch.
fs/btrfs/extent-tree.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index eb0760f..0bad610 100644
--- a/fs/btrfs/extent
btrfs subvolume snapshot -r /mnt /mnt/mysnap
btrfs send /mnt/mysnap -f /tmp/mysnap.send
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 40f353f
behaviour such as producing a random/weird path string
or a crash.
This issue is fixed by the following linux kernel btrfs patch:
Btrfs: send, fix incorrect ref access when using extrefs
Cc: Josef Bacik jba...@fb.com
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs
the caller (extent_write_cache_pages) processes
all pages in the page vector even if an error happens only for some
of them, so that ordered extents end up released.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Grab error from `em` pointer if available, do the error check
\
-f sync=0 \
-f truncate=1 \
-f unlink=0 \
-f unresvsp=0 \
-f write=4
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/extent_io.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs
\
-f sync=0 \
-f truncate=1 \
-f unlink=0 \
-f unresvsp=0 \
-f write=4
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Grab error from `em` pointer if available, do the error check and
end_extent_writepage call
for the
csum item and exits with a status of 0.
Also added missing btrfs_prev_leaf() return value checks, as we were ignoring
errors and non-existence of left siblings completely.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
cmds-check.c | 38 +++---
1
keep
failing if they target the same file range.
Cc: sta...@vger.kernel.org
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Updated commit message to mention difference between 3.14 kernels and older
releases and cc'ed stable. Made the logic in __btrfs_drop_extents simpler
This implements the tmpfile callback of struct inode_operations, introduced
in the linux kernel 3.11, and implemented already by some filesystems. This
callback is invoked by the VFS when the flag O_TMPFILE is passed to the open
system call.
Signed-off-by: Filipe David Borba Manana fdman
://comments.gmane.org/gmane.comp.file-systems.btrfs/32938
Asking fill_holes() to create a 0 bytes wide file hole item also produced the
first warning in the trace above, as we passed a range to
btrfs_drop_extent_cache
that has an end smaller (by -1) than its start.
Signed-off-by: Filipe David Borba Manana
. Therefore fix it.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 23f6a9d..efaad37 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2192,13 +2192,14
If we had to retry on the profiles seqlock (due to a concurrent write), we
would set bits on the input flags that corresponded both to the current
profile and to previous values of the profile.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/extent-tree.c | 4 +++-
1
previously used the same key variable to peek at the previous
item in the leaf, which has a different objectid. So just set the right
objectid to avoid modifying/deleting a wrong item if we repeat the tree
search.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/extent-tree.c
.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2 stream is now only produced if the send ioctl caller passes in one of
the new flags (BTRFS_SEND_FLAG_CALCULATE_DATA_SIZE |
BTRFS_SEND_FLAG_SUPPORT_FALLOCATE)
to avoid breaking old clients.
V3: Removed
About to receive 9571342213 bytes
Subvolume /mnt/sdc//snap_incr, 6557345221 / 9571342213 bytes received,
68.51%, 51.04MB/s
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2 stream is now only produced if the send ioctl caller passes in one of
the new flags
Instead of sending a write command with a data buffer filled with 0 value bytes,
use the fallocate command, introduced in the send stream version 2, to tell the
receiver to punch a file hole using the fallocate system call.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2
: [584..591]: 24712..24719 8 blocks
12: [592..2543]: 26192..28143 1952 blocks
13: [2544..17575]: hole 15032 blocks
14: [17576..21487]: 28144..32055 3912 blocks
A test case for xfstests will follow.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Added new
] [8104a32c] warn_slowpath_common+0x8c/0xc0
[ 2246.451325] [8104a416] warn_slowpath_fmt+0x46/0x50
[ 2246.451328] [81367dc5] ? strlcat+0x65/0x90
()
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/sysfs.c | 10 +-
1 file changed, 9
So that applications can find out what's the highest send stream
version supported/implemented by the running kernel:
$ cat /sys/fs/btrfs/send_stream_version
2
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
fs/btrfs/send.h | 1 +
fs/btrfs/sysfs.c | 36
) set inode otime.
This is preparation work for subsequent changes that implement the new features.
This doesn't break compatibility with older kernels or clients. In order to get
a version 2 send stream, new flags must be passed to the send ioctl.
Signed-off-by: Filipe David Borba Manana fdman
At the moment progress is only reported by btrfs-receive, but it is possible
and simple
to do it for btrfs-send too, so that we can get progress report when not piping
btrfs-send
output to btrfs-receive (directly to a file).
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Added new
or punch a file hole).
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Use the new send ioctl flag BTRFS_SEND_FLAG_SUPPORT_FALLOCATE if the user
asks for it (-a command line option), which will make the kernel generate
a version 2 send stream, so that old clients aren't
-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Addressed Dave's comments, and updated btrfs send invocation, by specifying
the new command line option (-a) that enables use of fallocate - added
function _require_btrfs_send_fallocate_flag() to skip the test when an old
So that applications can find out what's the highest send stream
version supported/implemented by the running kernel:
$ cat /sys/fs/btrfs/send/stream_version
2
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Renamed /sys/fs/btrfs/send_stream_version to
/sys/fs/btrfs
: length: expected: flags:
0:0.. 0: 0.. 0: 1:
unknown,delalloc,eof
foobar: 1 extent found
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs/004 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
tests/btrfs/004 | 34 +++---
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/tests/btrfs/004 b/tests/btrfs/004
index 670e1c2..1d5b816 100755
--- a/tests/btrfs/004
+++ b/tests/btrfs/004
),
meaning old clients are unaffected.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2 stream is now only produced if the send ioctl caller passes in one of
the new flags (BTRFS_SEND_FLAG_CALCULATE_DATA_SIZE |
BTRFS_SEND_FLAG_SUPPORT_FALLOCATE)
to avoid breaking old
Instead of sending a write command with a data buffer filled with 0 value bytes,
use the fallocate command, introduced in the send stream version 2, to tell the
receiver to punch a file hole using the fallocate system call.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2
: [584..591]: 24712..24719 8 blocks
12: [592..2543]: 26192..28143 1952 blocks
13: [2544..17575]: hole 15032 blocks
14: [17576..21487]: 28144..32055 3912 blocks
A test case for xfstests will follow.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2
David Borba Manana fdman...@gmail.com
---
V2: Added new send ioctl flag BTRFS_SEND_FLAG_SUPPORT_FALLOCATE. A version 2
stream is now only produced is the ioctl caller specifies at least one of
the new send flags (BTRFS_SEND_FLAG_SUPPORT_FALLOCATE or
BTRFS_SEND_FLAG_CALCULATE_DATA_SIZE
-receive, but it is possible
and simple
to do it for btrfs-send too, so that we can get progress report when not piping
btrfs-send
output to btrfs-receive (directly to a file).
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Added new send ioctl flag
or punch a file hole).
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Use the new send ioctl flag BTRFS_SEND_FLAG_SUPPORT_FALLOCATE if the user
asks for it (-a command line option), which will make the kernel generate
a version 2 send stream, so that old clients aren't
Subvolume /mnt/sdc//snap_incr, 6557345221 / 9571342213 bytes received,
68.51%, 51.04MB/s
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2 stream is now only produced if the send ioctl caller passes in one of
the new flags (BTRFS_SEND_FLAG_CALCULATE_DATA_SIZE
When specifying -vv print information about received write and clone commands
too,
as we do this for other commands already and it's very useful for debugging and
troubleshooting.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Added new send ioctl flag
-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Addressed Dave's comments, and updated btrfs send invocation, by specifying
the new command line option (-a) that enables use of fallocate - added
function _require_btrfs_send_fallocate_flag() to skip the test when an old
This test case verifies the btrfs properties feature, a new feature
introduced in the linux kernel version 3.14.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Addressed Dave's comments, removed function to check for existence of
the btrfs-progs property command and use
Instead of sending a write command with a data buffer filled with 0 value bytes,
use the fallocate command, introduced in the send stream version 2, to tell the
receiver to punch a file hole using the fallocate system call.
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: A v2
1 - 100 of 385 matches
Mail list logo