- 14 6月, 2013 3 次提交
-
-
由 Josef Bacik 提交于
This fixes bugzilla 57491. If we take a snapshot of a fs with a unlink ongoing and then try to send that root we will run into problems. When comparing with a parent root we will search the parents and the send roots commit_root, which if we've just created the snapshot will include the file that needs to be evicted by the orphan cleanup. So when we find a changed extent we will try and copy that info into the send stream, but when we lookup the inode we use the normal root, which no longer has the inode because the orphan cleanup deleted it. The best solution I have for this is to check our otransid with the generation of the commit root and if they match just commit the transaction again, that way we get the changes from the orphan cleanup. With this patch the reproducer I made for this bugzilla no longer returns ESTALE when trying to do the send. Thanks, Cc: stable@vger.kernel.org Reported-by: NChris Wilson <jakdaw@gmail.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
由 Stefan Behrens 提交于
No need to check for NULL in send.c and disk-io.c. Signed-off-by: NStefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
由 Tsutomu Itoh 提交于
sctx is removed from the argument of the function that doesn't use sctx. Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
- 07 5月, 2013 4 次提交
-
-
由 Eric Sandeen 提交于
Big patch, but all it does is add statics to functions which are in fact static, then remove the associated dead-code fallout. removed functions: btrfs_iref_to_path() __btrfs_lookup_delayed_deletion_item() __btrfs_search_delayed_insertion_item() __btrfs_search_delayed_deletion_item() find_eb_for_page() btrfs_find_block_group() range_straddles_pages() extent_range_uptodate() btrfs_file_extent_length() btrfs_scrub_cancel_devid() btrfs_start_transaction_lflush() btrfs_print_tree() is left because it is used for debugging. btrfs_start_transaction_lflush() and btrfs_reada_detach() are left for symmetry. ulist.c functions are left, another patch will take care of those. Signed-off-by: NEric Sandeen <sandeen@redhat.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
由 Tsutomu Itoh 提交于
fget() returns NULL if error. So, we should check NULL or not. Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
由 Tsutomu Itoh 提交于
Variable 'p' is not used any more. So, remove it. Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
由 Stefan Behrens 提交于
Two new flags are added to allow omitting the stream header and the end command for btrfs send streams. This is used in cases where you send multiple snapshots back-to-back in one stream. This used to be encoded like this (with 2 snapshots in this example): <stream header> + <sequence of commands> + <end cmd> + <stream header> + <sequence of commands> + <end cmd> + EOF The new format (if the two new flags are used) is this one: <stream header> + <sequence of commands> + <sequence of commands> + <end cmd> Note that the currently existing receivers treat <end cmd> only as an indication that a new <stream header> is following. This means, you can just skip the sequence <end cmd> <stream header> without loosing compatibility. As long as an EOF is following, the currently existing receivers handle the new format (if the two new flags are used) exactly as the old one. So what is the benefit of this change? The goal is to be able to use a single stream (one TCP connection) to multiplex a request/response handshake plus Btrfs send streams, all in the same stream. In this case you cannot evaluate an EOF condition as an end of the Btrfs send stream. You need something else, and the <end cmd> is just perfect for this purpose. The summary is: The format change is driven by the need to send several Btrfs send streams over a single TCP connections, with the ability for a repeated request/response handshake in the middle. And this format change does not break any existing tool, it is completely compatible. You could compare the old behaviour of the Btrfs send stream to the one of ftp where you need a seperate request/response channel and newly opened data transfer channels for each file, while the new behaviour is more like http using a single stream for everything. Signed-off-by: NStefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
- 28 3月, 2013 1 次提交
-
-
由 Jan Schmidt 提交于
When you take a snapshot, punch a hole where there has been data, then take another snapshot and try to send an incremental stream, btrfs send would give you EIO. That is because is_extent_unchanged had no support for holes being punched. With this patch, instead of returning EIO we just return 0 (== the extent is not unchanged) and we're good. Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net> Cc: Alexander Block <ablock84@gmail.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
- 23 2月, 2013 1 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 21 2月, 2013 2 次提交
-
-
由 Mark Fasheh 提交于
This patch adds the flag, BTRFS_SEND_FLAG_NO_FILE_DATA to the btrfs send ioctl code. When this flag is set, the btrfs send code will never write file data into the stream (thus also avoiding expensive reads of that data in the first place). BTRFS_SEND_C_UPDATE_EXTENT commands will be sent (instead of BTRFS_SEND_C_WRITE) with an offset, length pair indicating the extent in question. This patch does not affect the operation of BTRFS_SEND_C_CLONE commands - they will continue to be sent when a search finds an appropriate extent to clone from. Signed-off-by: NMark Fasheh <mfasheh@suse.de> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
由 Eric Sandeen 提交于
All we do is set it to NULL and test it :) Signed-off-by: NEric Sandeen <sandeen@redhat.com> Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
-
- 15 1月, 2013 1 次提交
-
-
由 Tsutomu Itoh 提交于
We should free name_cache_entry before returning from the error handling code. Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com>
-
- 17 12月, 2012 1 次提交
-
-
由 Anand Jain 提交于
Originally root_times_lock was introduced as part of send/receive code however newly developed patch to label the subvol reused the same lock, so renaming it for a meaningful name. Signed-off-by: NAnand Jain <anand.jain@oracle.com> Signed-off-by: NChris Mason <chris.mason@fusionio.com>
-
- 26 10月, 2012 3 次提交
-
-
由 Alex Lyakas 提交于
This patch also requires a change in the user-space part of "receive". We need to use "lchown" instead of "chown". We will do this in the following patch. Signed-off-by: NAlex Lyakas <alex.btrfs@zadarastorage.com> if (S_ISREG(sctx->cur_inode_mode)) {
-
由 Arne Jansen 提交于
When sending a device file, the stream was missing the mode. Also the rdev was encoded wrongly. Signed-off-by: NArne Jansen <sensille@gmx.net>
-
由 Jan Schmidt 提交于
This adds support for the new extended inode refs to btrfs send. Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net>
-
- 04 10月, 2012 1 次提交
-
-
由 Anand Jain 提交于
Developing service cmds needs it. Signed-off-by: NAnand Jain <anand.jain@oracle.com>
-
- 02 10月, 2012 23 次提交
-
-
由 Liu Bo 提交于
In logical resolve, we parse extent_from_logical()'s 'ret' as a kind of flag. It is possible to lose our errors because (-EXXXX & BTRFS_EXTENT_FLAG_TREE_BLOCK) is true. I'm not sure if it is on purpose, it just looks too hacky if it is. I'd rather use a real flag and a 'ret' to catch errors. Acked-by: NJan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: NLiu Bo <liub.liubo@gmail.com>
-
由 Jan Schmidt 提交于
Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: NChris Mason <chris.mason@fusionio.com>
-
由 Chris Mason 提交于
The btrfs send code was assuming the offset of the file item into the extent translated to bytes on disk. If we're compressed, this isn't true, and so it was off into extents owned by other files. It was also improperly handling inline extents. This solves a crash where we may have gone past the end of the file extent item by not testing early enough for an inline extent. It also solves problems where we have a whole between the end of the inline item and the start of the full extent. Signed-off-by: NChris Mason <chris.mason@fusionio.com>
-
由 Alexander Block 提交于
We can't do the deleted/reused logic for top/root inodes as it would create a stream that tries to delete and recreate the root dir. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
We have to ignore inode/space cache objects in send/receive. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
We need to pass the root that we determined earlier to iterate_inode_ref. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
Used the wrong compare operator here. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
The previous check was working fine, but this check should be easier to read. Also, we could theoritically have some exotic bugs with the previous checks. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
Both were leaked in case of error. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
A leftover from older code and unused now. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
Doing some code cleanups as suggested by Arne. Changes do not change any logic. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
As the subject already said, add/fix comments. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
Updating send_progress in process_recorded_refs was not correct. It got updated too early in the cur_inode_new_gen case. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Reported-by: NArne Jansen <sensille@gmx.net> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
We can't easily use the index of the radix tree for inums as the radix tree uses 32bit indexes on 32bit kernels. For 32bit kernels, we now use the lower 32bit of the inum as index and an additional list to store multiple entries per radix tree entry. Reported-by: NArne Jansen <sensille@gmx.net> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
When everything is done, name_cache_free is called which however forgot to call kfree on the cache entries. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
If we break, we may miss the clone from send_root which we prefer over all other clones. Commit is a result of Arne's review. Reported-by: NArne Jansen <sensille@gmx.net> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
Don't have a seperate return path for the mentioned case. Now we do the same "take lowest inode/offset" logic for all found clones. Commit is a result of Arne's review. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
Make sure to never get in trouble due to the backref_ctx which was on the stack before. Commit is a result of Arne's review. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
The new name should be easier to understand/read. Commit is a result of Arne's review. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
use_list is a leftover and unused. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
We only added the parent for the new position of a moved dir. We also need to add the old parent of the moved dir. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
fs_path_remove is not used at the moment due to a previous patch. Remove it for now (with #if 0) to avoid compile warnings. Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-
由 Alexander Block 提交于
We missed that check which resultet in all refs with the same name being reported as first_ref. Reported-by: NAlex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: NAlexander Block <ablock84@googlemail.com>
-