Re: Snapper snapshot comparison algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mohit, Nafisa,
you should start reading from "changed_cb" function, which is the one
that notifies the send code about a particular change that needs to be
addressed.

The lowest-level instruction generation happens in functions like
"send_rename", "send_link", "send_unlink", "send_truncate" etc.

The best way to understand what is in between, is to stuff the code
with printk's and see what is happening (do a small change to the
file, observe the prints). This is how I learned:)

For starter, for example, create some file, do send, then grow the
file and see how the send code detects and reacts to this change. The
trickiest part is handling the changes in file name/hardlinks. So try
to rename the file and see what the code does.

You may also read through discussions with Alexander Block on the
list, on the link that I posted and others.

Alex.


On Thu, Dec 6, 2012 at 11:16 AM, Mohit Bhadade <mohitbhadade@xxxxxxxxx> wrote:
> Hello,
> Could oomeone please tell me how the instruction generation based on
> differences in snapshots takes place in the send receive code. ? I am going
> through the code but cant understand the hierarchy of structures declared in
> it. Some one please direct me to the function where the instructions are
> generated.
>
> Thanks
>
>
> On Sat, Dec 1, 2012 at 2:00 PM, Alex Lyakas <alex.btrfs@xxxxxxxxxxxxxxxxx>
> wrote:
>>
>> Hi nafisa,
>> in order to understand how btrfs send code compares two btrfs file
>> trees, you may read this:
>> http://www.spinics.net/lists/linux-btrfs/msg17731.html (where I am
>> trying to understand it) and further down the thread. It's a very nice
>> algorithm, actually.
>>
>> Thanks,
>> Alex.
>>
>>
>>
>> On Sat, Dec 1, 2012 at 9:54 AM, nafisa mandliwala
>> <nafisa.mandliwala@xxxxxxxxx> wrote:
>> > I needed help with understanding the snapshot comparison algorithm
>> > that snapper uses and its shortcomings. From reading the code, what I
>> > understood is that it does a block by block compare. I'm not very sure
>> > if that's the best way to go about it. Also, since the send receive
>> > code is still in development stages, is there a scope to add more
>> > functionality to it?
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
>> > in
>> > the body of a message to majordomo@xxxxxxxxxxxxxxx
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux