Whamcloud - gitweb
LU-16897 tgt: note 'hole' pages
In order to do sparse reads, we must know which pages
correspond to holes, so we note this when the page is read
from disk.
Note something unusual: We store the hole information in
the lnb, which is a per-IO struct. This means the hole
information is not present when a page is reused in cache.
So when a region with a hole is first read from disk, the
hole annotation is available for the transfer code, but if
the page cache is in use, this information is not available
on subsequent reads from the same pages.
This can't be avoided because the server does not have any
per-page private information for page cache pages (and ZFS
would not support this).
This isn't too costly for two reasons:
1. We default page cache to off on flash systems
2. Most data is only read once rather than many times in
quick succession
NB: It's not clear how we can efficiently get hole
information from ZFS so this is only for ldiskfs for now.
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I54b1b0abeb6889163f36b315292d8b6e760d6f78
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53297
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>