Commit Graph

1 Commits

Author SHA1 Message Date
Tao Liu 0db060c4e2 Show write byte size in report messages
Backport from upstream:

commit 0ef2ca6c9fa2f61f217a4bf5d7fd70f24e12b2eb
Author: Kazuhito Hagio <k-hagio-ab@nec.com>
Date:   Thu Feb 4 16:29:06 2021 +0900

    [PATCH] Show write byte size in report messages

    Show write byte size in report messages.  This value can be different
    from the size of the actual file because of some holes on dumpfile
    data structure.

      $ makedumpfile --show-stats -l -d 1 vmcore dump.ld1
      ...
      Total pages     : 0x0000000000080000
      Write bytes     : 377686445
      ...
      # ls -l dump.ld1
      -rw------- 1 root root 377691573 Feb  4 16:28 dump.ld1

    Note that this value should not be used with /proc/kcore to determine
    how much disk space is needed for crash dump, because the real memory
    usage when a crash occurs can vary widely.

    Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2021-04-28 16:13:23 +08:00