Duncan posted on Mon, 18 May 2015 06:41:09 +0000 as excerpted: >> Currently, df seems to show good data, while du doesn't. > > There has been some work put into what df returns to make it so, while > similar work to du has not yet been released, and in fact only quite > recently (within the last month) has been proposed on the list. I should have mentioned... what was proposed on-list was actually a btrfs- specific btrfs filesystem du command, paralleling the existing btrfs filesystem df command... Unlike the system df command, which AFAIK basically simply prints the output given to it by the kernel, the system du command does much more of its own work, stating the files and doing the math itself. And in that regard, its output is (or should be) accurate. What the proposed btrfs specific btrfs filesystem du command would do differently compared to the system command, as is the case with pretty much all informational btrfs subcommands, is print btrfs specific information that the system command doesn't. In that regard, it would be... btrfs specific... and thus belongs under the btrfs master command, not as part of the normal system command. Meanwhile, I just looked it up, and posting date was April 23. Subject: [Patch][RFC] btrfs-progs: add 'du' command Original poster/author: Mark Fasheh <mfasheh@xxxxxxx> Link: http://permalink.gmane.org/gmane.comp.file-systems.btrfs/44657 As posted, the patch calculates device (aka disk) usage of the given file set using fiemap. Printed are device usage, unique/unshared size, and (for the file set, not individual files) set shared size (the explanation for which is a bit complex, see the thread). Compression information was immediately suggested in a reply, but wasn't considered necessary for a first implementation. If you're seriously interested, consider reading the thread and replying there if you have additional suggestions/comments. -- 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
