As Jing Zhao pointed out in HDFS-8986, we can save a computeContentSummary4Snapshot call in INodeDirectory#computeContentSummary.
Add option to -du to calculate directory space usage excluding snapshots
+1 pending Jenkins.
This message was automatically generated.
Committed this to trunk, branch-2 and branch-2.8.
Thanks Jing for the great comment and prompt review!
SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10463 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10463/)
HDFS-10875. Optimize du -x to cache intermediate result. Contributed by (xiao: rev e52d6e7a46ceef74dd8d8a3d49c49420e3271365)