commit | 08f498bb57615e594259a1fd870aca082908a452 | [log] [tgz] |
---|---|---|
author | Aaron Lu <aaron.lu@intel.com> | Thu Mar 03 19:13:06 2022 +0800 |
committer | Wu Fengguang <wfg@mail.ustc.edu.cn> | Thu Mar 03 19:13:06 2022 +0800 |
tree | 9134730310a6d84ed9de52d9246d5e2e4e044763 | |
parent | 357b2e411fe5c03c81817aea9b321e1027f587fe [diff] |
case-truncate: use cat for sparsefile to consume memory The intent of "cp sparsefile /dev/null" is to fill page cache with sparsefile's content, but since cp will recognize the src file being sparse and skip doing any read of it but just writing zeros to /dev/null, it kind of failed the purpose. Fix this by using 'cat sparsefile > /dev/null'. Signed-off-by: Aaron Lu <aaron.lu@intel.com>