Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
locked and will be unlocked.
  1. Get hold of all pages corresponding to this/these compression block(s).
  2. Read the (first) compression block.
  3. Decompress it into the corresponding pages.
  4. Throw the compressed data away and proceed to 3. for the next compression block or return success if no more compression blocks left.

Warning: 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.

FIXME: For PAGE_CACHE_SIZE > cb_size we are not doing the Right Thing(TM) at the end of the file I think. We need to detect this case and zero the out of bounds remainder of the page in question and mark it as handled. At the moment we would just return -EIO on such a page. This bug will only become apparent if pages are above 8kiB and the NTFS volume only uses 512 byte clusters so is probably not going to be seen by anyone. Still this should be fixed. (AIA)

FIXME: Again for PAGE_CACHE_SIZE > cb_size we are screwing up both in handling sparse and compressed cbs. (AIA)

FIXME: 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)

or 0 if

Used by functions that manipulate the LRU lists, to sort a page onto the right LRU list.

We would like to get this info without a page flag, but the state needs to survive until the page is last deleted from the LRU, which could be as far down as __page_cache_release.

__replace_page - replace page in vma by new page. based on replace_page in mm/ksm.c

: vma that holds the pte pointing to page : address the old

for example if its invalidation fails due to the page being dirty or under writeback.