Hi, > I often get zero-length files in btrfs snapshots (when the > original files were not zero-length). The shell script below > reproduces this problem on two Ubuntu machines, with Ubuntu > kernels 2.6.31-17.54 and 2.6.32-12.17. Is there some mistaken > assumption I'm making here in terms of how btrfsctl works? > [..] > > echo x1 > /mnt/x/d/foo.txt || exit 2 > btrfsctl -s /mnt/x/snap /mnt/x/d You're just missing a sync/fsync() between these two lines. We argued on IRC a while ago about whether this is a sensible default; cmason wants the no-sync version of snapshot creation to be available, but was amenable to the idea of changing the default to be sync before snapshot, since it was pointed out that no-one other than him had understood we were supposed to be running sync first. - Chris. -- Chris Ball <cjb@xxxxxxxxxx> One Laptop Per Child -- 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
