int ntfs_read_compressed_block (struct page * page);
When we are called the page has already been verified to be locked and the attribute is known to be non-resident, not encrypted, but compressed.
1. Determine which compression block(s) page is in. 2. Get hold of all pages corresponding to this/these compression block(s). 3. Read the (first) compression block. 4. Decompress it into the corresponding pages. 5. Throw the compressed data away and proceed to 3. for the next compression block or return success if no more compression blocks left.
We have to be careful what we do about existing pages. They might have been written to so that we would lose data if we were to just overwrite them with the out-of-date uncompressed data.
At the moment we don't do any zeroing out in the case that initialized_size is less than data_size. This should be safe because of the nature of the compression algorithm used. Just in case we check and output an error message in read inode if the two sizes are not equal for a compressed file. (AIA)
At the moment we don't do any zeroing out in the case that initialized_size is less than data_size. This should be safe because of the nature of the compression algorithm used. Just in case we check and output an error message in read inode if the two sizes are not equal for a compressed file. (AIA)
At the moment we don't do any zeroing out in the case that initialized_size is less than data_size. This should be safe because of the nature of the compression algorithm used. Just in case we check and output an error message in read inode if the two sizes are not equal for a compressed file. (AIA)