diff options
author | Fred Isaman <iisaman@netapp.com> | 2011-02-03 18:28:50 +0000 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-11 15:38:39 -0500 |
commit | 38511722446993d926861696194c39ef135d85a4 (patch) | |
tree | 56ca01a34aea70cfc3473996bd3712cda3022166 /fs/isofs/rock.h | |
parent | 53d4737580535e073963b91ce87d4216e434fab5 (diff) | |
download | op-kernel-dev-38511722446993d926861696194c39ef135d85a4.zip op-kernel-dev-38511722446993d926861696194c39ef135d85a4.tar.gz |
pnfs: avoid incorrect use of layout stateid
The code could violate the following from RFC5661, section 12.5.3:
"Once a client has no more layouts on a file, the layout stateid is no
longer valid and MUST NOT be used."
This can occur when a layout already has a lseg, starts another
non-everlapping LAYOUTGET, and a CB_LAYOUTRECALL for the existing lseg
is processed before we hit pnfs_layout_process().
Solve by setting, each time the client has no more lsegs for a file, a
flag which blocks further use of the layout and triggers its removal.
This also fixes a second bug which occurs in the same instance as
above. If we actually use pnfs_layout_process, we add the new lseg to
the layout, but the layout has been removed from the nfs_client list
by the intervening CB_LAYOUTRECALL and will not be added back. Thus
the newly acquired lseg will not be properly returned in the event of
a subsequent CB_LAYOUTRECALL.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/isofs/rock.h')
0 files changed, 0 insertions, 0 deletions