]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pnfs-obj: Remove redundant EOF from objlayout_io_state
authorBoaz Harrosh <bharrosh@panasas.com>
Sun, 2 Oct 2011 14:06:09 +0000 (16:06 +0200)
committerBoaz Harrosh <bharrosh@panasas.com>
Tue, 4 Oct 2011 10:17:15 +0000 (12:17 +0200)
commit9bb8a8e3fdb0f0ca4f35d9941eef779620c513a2
treefe41f3c39f768fd57464222146cc899291f9697d
parentf6ee1e20eacb4f9bf2325dbcca695e0c0edfb5b5
pnfs-obj: Remove redundant EOF from objlayout_io_state

The EOF calculation was done on .read_pagelist(), cached
in objlayout_io_state->eof, and set in objlayout_read_done()
into nfs_read_data->res.eof.

So set it directly into nfs_read_data->res.eof and avoid
the extra member.

This is a slight behaviour change because before eof was
*not* set on an error update at objlayout_read_done(). But
is that a problem? Is Generic layer so sensitive that it
will miss the error IO if eof was set? From my testing
I did not see such a problem.

Benny please review.

Which brings me to a more abstract problem. Why does the
LAYOUT driver needs to do this eof calculation? .i.e we
are inspecting generic i_size_read() and if spanned by
offset + count which is received from generic layer we set
eof. It looks like all this can/should be done in generic
layer and not at LD. Where does NFS and files-LD do it?
It looks like it can be promoted.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
fs/nfs/objlayout/objlayout.c
fs/nfs/objlayout/objlayout.h