Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-30 Thread Alex Lyakas
Hi, I did not apply the patch but instead added a check for dir != tmp_dir only. The reason to not check for gen is that I have a rule in my mind: I only pass the generation number to functions where I want to know the *current* state. is_first_ref is for permanent state, the return value

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-30 Thread Alexander Block
On Mon, Jul 30, 2012 at 7:35 PM, Alex Lyakas alex.bolshoy.bt...@gmail.com wrote: Hi, I did not apply the patch but instead added a check for dir != tmp_dir only. The reason to not check for gen is that I have a rule in my mind: I only pass the generation number to functions where I want to

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-29 Thread Alex Lyakas
Alexander, yes, I will re-test and let you know. Expect to hear from me this week. Do you plan to merge this for-alex branch into some mainline branch, before you take off? Thanks, Alex. On Sat, Jul 28, 2012 at 12:56 PM, Alexander Block abloc...@googlemail.com wrote: On Fri, Jul 27, 2012 at

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-28 Thread Alexander Block
On Fri, Jul 27, 2012 at 4:37 PM, Alex Lyakas alex.bolshoy.bt...@gmail.com wrote: Hi Alexander, your solution is simple and elegant. I this this issue is solved now. Thanks! Two minor issues: 1) /* * We need some special handling for inodes that get processed before the parent *

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-27 Thread Alex Lyakas
Hi Alexander, your solution is simple and elegant. I this this issue is solved now. Thanks! Two minor issues: 1) /* * We need some special handling for inodes that get processed before the parent * directory got created. See process_all_refs for details. * This function does the check if we

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-26 Thread Alex Lyakas
Hi Alexander, I did some very initial testing, and there is still an issue. The logic of finish_outoforder_dir works as expected. But then problem is that later, when we process xattr/extents or finish the inode, the code still uses get_cur_path(), which brings an incorrect name. Consider the

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-26 Thread Alex Lyakas
Alexander, (pls let me know when this gets annoying:). Parent: /mnt/src/v2_snap0/ └── [257] file1 Send: /mnt/src/v2_snap1 └── [259] dir1 └── [258] dir2 └── [257] file1 I encountered two problems: 1) process_recorded_refs_if_needed() if needed does not call

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-26 Thread Alexander Block
I'm currently working on another solution for the initial problem. I will create a for-alex branch for you to test later. On Thu, Jul 26, 2012 at 4:04 PM, Alex Lyakas alex.bolshoy.bt...@gmail.com wrote: Alexander, (pls let me know when this gets annoying:). Parent: /mnt/src/v2_snap0/ └── [

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-26 Thread Alexander Block
I have pushed a for-alex branch to github with a new approach for the whole problem. Can you test this? On Thu, Jul 26, 2012 at 4:07 PM, Alexander Block abloc...@googlemail.com wrote: I'm currently working on another solution for the initial problem. I will create a for-alex branch for you to

Re: btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-24 Thread Alexander Block
On Wed, Jul 18, 2012 at 7:45 PM, Alex Lyakas alex.bolshoy.bt...@gmail.com wrote: Hi Alexander, I am testing different scenarios in order to better understand the non-trivial magic of get_cur_path()/will_overwrite_ref()/did_overwrite_ref()/did_overwrite_first_ref(). I hit the following issue,

btrfs send/receive: if new inode ino is less than its new directory ino, incorrect path is sent

2012-07-18 Thread Alex Lyakas
Hi Alexander, I am testing different scenarios in order to better understand the non-trivial magic of get_cur_path()/will_overwrite_ref()/did_overwrite_ref()/did_overwrite_first_ref(). I hit the following issue, when testing full-send: This is my source subvolume (inode numbers are written): tree