• Boaz Harrosh's avatar
    pnfs-obj: Fix __r4w_get_page when offset is beyond i_size · c999ff68
    Boaz Harrosh authored
    It is very common for the end of the file to be unaligned on
    stripe size. But since we know it's beyond file's end then
    the XOR should be preformed with all zeros.
    
    Old code used to just read zeros out of the OSD devices, which is a great
    waist. But what scares me more about this situation is that, we now have
    pages attached to the file's mapping that are beyond i_size. I don't
    like the kind of bugs this calls for.
    
    Fix both birds, by returning a global zero_page, if offset is beyond
    i_size.
    
    TODO:
    	Change the API to ->__r4w_get_page() so a NULL can be
    	returned without being considered as error, since XOR API
    	treats NULL entries as zero_pages.
    
    [Bug since 3.2. Should apply the same way to all Kernels since]
    CC: Stable Tree <stable@kernel.org>
    Signed-off-by: 's avatarBoaz Harrosh <bharrosh@panasas.com>
    c999ff68
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...