On Tue, May 11, 2021 at 8:58 AM Qiyu Yan <yanq...@fedoraproject.org> wrote:
>
> Dear folks,
>
> My problem is that new file created at /usr won't be compressed.
>
> I accenticly that none of my files under /usr is compressed[1], so I
> tried to run `sudo btrfs fi def -czstd -v -r /usr` to compress them,
> that seems to work. And `sudo compsize /usr` now gives
> Processed 431312 files, 224528 regular extents (230971 refs), 253758
> inline.
> Type       Perc     Disk Usage   Uncompressed Referenced
> TOTAL       56%      7.2G          12G          13G
> none       100%      3.5G         3.5G         3.5G
> zstd        39%      3.6G         9.2G         9.7G
>
> This seems pretty good, but when I am testing dding to dump a file to
> /usr to test compress for new file, problem happens:
>
> [root@yan-desktop /]# dd if=/dev/zero of=/usr/1 bs=10240 count=10000
> 记录了10000+0 的读入
> 记录了10000+0 的写出
> 102400000字节(102 MB,98 MiB)已复制,0.0426441 s,2.4 GB/s
> [root@yan-desktop /]# dd if=/dev/zero of=/etc/1 bs=10240 count=10000
> 记录了10000+0 的读入
> 记录了10000+0 的写出
> 102400000字节(102 MB,98 MiB)已复制,0.0585055 s,1.8 GB/s
> [root@yan-desktop /]# compsize /usr/1
> Processed 1 file, 1 regular extents (1 refs), 0 inline.
> Type       Perc     Disk Usage   Uncompressed Referenced
> TOTAL      100%       97M          97M          97M
> none       100%       97M          97M          97M
> [root@yan-desktop /]# compsize /etc/1
> Processed 1 file, 782 regular extents (782 refs), 0 inline.
> Type       Perc     Disk Usage   Uncompressed Referenced
> TOTAL        3%      3.0M          97M          97M
> zstd         3%      3.0M          97M          97M

I'm unable to reproduce this.

Can you do:

ls -li

to list the inode number of a file in /usr that should be compress but
isn't and then plug that inode number into

btrfs insp dump-t -t 257 /dev/xyz | grep -C 20 $INUM

This may expose file names for other files. Doesn't matter to me if
you include the whole output of the above comment or trim to just the
cluster of items referencing that inode number.


-- 
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to