directory order in btrfs

2010-03-27 Thread Dipl.-Ing. Michael Niederle
Hi, Chris! I'm writing the btrfs snapshot diff tool and I would like to know, whether the entries in a btrfs directory are ordered in some way. I want to find missing entries in a new snapshot's directory. Can I do a "linear compare" of the old and new directories or do I have to sort the entries

Missing entry for updated directory

2010-03-27 Thread Dipl.-Ing. Michael Niederle
I'm using BTRFS_DIR_INDEX_KEY as suggested by Chris to find all updated directories. But I'm missing one: The directory has 3 entries deleted and stat shows different mtimes and ctimes for the directory in the two snapshots. The highest generation number in the older snapshot is 82623. But the

Re: Missing entry for updated directory

2010-03-27 Thread Goffredo Baroncelli
On Saturday 27 March 2010, Dipl.-Ing. Michael Niederle wrote: > I'm using BTRFS_DIR_INDEX_KEY as suggested by Chris to find all updated > directories. > > But I'm missing one: > > The directory has 3 entries deleted and stat shows different > mtimes and ctimes for the directory in the two snapsho

Re: Missing entry for updated directory

2010-03-27 Thread Dipl.-Ing. Michael Niederle
Hi, Goffredo! I checked all btrfs-item types (changed sk->max_type to 255 and removed the filtering) connected with the updated directory's inode. But none of them had got a new generation number. I found the missing directory only using a more conventional tool that checked all files and direct

Re: Missing entry for updated directory

2010-03-27 Thread Goffredo Baroncelli
Hi Michael, it seems that the generation number of an inode is the generation number at creation time of the inode. I fear that even though is possible to detect an extent update, looking at the generation number, it is impossible to detect a inode update. Chris, could help us to understand b