Timofey Titovets posted on Thu, 14 Dec 2017 02:05:35 +0300 as excerpted: > Also, same problem exist for autodefrag case i.e.: > write 4KiB at start of compressed file autodefrag code add that file to > autodefrag queue, call btrfs_defrag_file, set range from start to u64-1. > That will trigger to full file rewrite, as all extents are smaller then > 256KiB. > > (if i understood all correctly). If so, it's rather ironic, because that's how I believed autodefrag to work, whole-file, for quite some time. Then I learned otherwise, but I always enable both autodefrag and compress=lzo on all my btrfs, so it looks like at least for my use-case, I was correct with the whole-file assumption after all. (Well, at least for files that are actually compressed, I don't run compress-force=lzo, just compress=lzo, so a reasonable number of files aren't actually compressed anyway, and they'd do the partial-file rewrite I had learned to be normal.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- 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
