Skip to content
Commit 4b74f6ea authored by Boaz Harrosh's avatar Boaz Harrosh
Browse files

exofs: Fix __r4w_get_page when offset is beyond i_size



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.

Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
parent 66153f6e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment