Commit df1dc6e
committed
Implement FileCompressionInformation for ZFS dataset compression
file_compression_information() now returns proper FILE_COMPRESSION_INFORMATION
for files on compressed datasets. It uses os_compress (the dataset-level
setting) rather than doi_compress (which is 0 for most files even when
compression is active via inheritance), and reports physical block usage
from doi_physical_blocks_512 as the CompressedFileSize.
GetCompressedFileSize() correctly returns the physical compressed size
via this handler. Explorer "Size on disk" continues to show the
cluster-rounded logical size (computed from allocation unit size, not
from FileCompressionInformation or AllocationSize).
allocationsize() is moved out of the inline in zfs_windows.h into
zfs_vnops_windows_lib.c so it can use zfs_blksz() with its fallback
logic, fixing the case where z_blksz is 0 at open time.
Signed-off-by: Jorgen Lundman <lundman@lundman.net>1 parent eef5a99 commit df1dc6e
2 files changed
Lines changed: 64 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 143 | + | |
160 | 144 | | |
161 | 145 | | |
162 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4853 | 4853 | | |
4854 | 4854 | | |
4855 | 4855 | | |
4856 | | - | |
4857 | | - | |
4858 | 4856 | | |
4859 | 4857 | | |
4860 | 4858 | | |
4861 | 4859 | | |
4862 | 4860 | | |
4863 | 4861 | | |
4864 | 4862 | | |
4865 | | - | |
4866 | | - | |
4867 | | - | |
4868 | | - | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
4872 | 4866 | | |
4873 | | - | |
4874 | | - | |
4875 | | - | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
4876 | 4870 | | |
4877 | | - | |
4878 | | - | |
4879 | | - | |
4880 | | - | |
4881 | | - | |
| 4871 | + | |
| 4872 | + | |
| 4873 | + | |
| 4874 | + | |
| 4875 | + | |
| 4876 | + | |
| 4877 | + | |
| 4878 | + | |
| 4879 | + | |
| 4880 | + | |
| 4881 | + | |
| 4882 | + | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
| 4889 | + | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| 4898 | + | |
| 4899 | + | |
| 4900 | + | |
| 4901 | + | |
| 4902 | + | |
| 4903 | + | |
4882 | 4904 | | |
4883 | 4905 | | |
4884 | | - | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
4885 | 4913 | | |
4886 | 4914 | | |
4887 | 4915 | | |
| |||
4902 | 4930 | | |
4903 | 4931 | | |
4904 | 4932 | | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
| 4945 | + | |
| 4946 | + | |
| 4947 | + | |
| 4948 | + | |
| 4949 | + | |
4905 | 4950 | | |
4906 | 4951 | | |
4907 | 4952 | | |
| |||
0 commit comments