[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42620: hard link improvement for gzip (wishlist item)
From: |
Harald Dunkel |
Subject: |
bug#42620: hard link improvement for gzip (wishlist item) |
Date: |
Fri, 31 Jul 2020 08:26:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
Looking at a file with n references by hard links:
n=1 is the trivial case. No changes needed.
All involved directories are read-only: Another trivial case
to be ignored here.
For n>1:
I would suggest that the file is compressed and the directory
entries are adjusted accordingly, if the directories can be
written.
If some directories are read-only, then you end up with 2 files,
the new compressed file and the old original still referenced
in the read-only directories.
The workaround for compressing a file with several references
in the file system is *very* ugly, even if you know all paths
pointing to it. And the need for compressing such a file comes
up especially for large files, i.e. those files that are
efficient to compress, but not easy to copy. Rotated log files
with a size of a few GBytes, for example.
Its just a suggestion, of course. Keep on your good work
Harri