diff options
author | Jeff Layton <jlayton@poochiereds.net> | 2016-04-21 20:52:00 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-05-09 09:05:40 -0400 |
commit | 3064b6861d00b7124558cdf79f9387f948361be3 (patch) | |
tree | 1f87f7c536b1d7520eedb35f03b85448ad3ab2ba /fs/char_dev.c | |
parent | 90a0be00e9d29d9baac27c0c63a5e71ca1334001 (diff) | |
download | linux-3064b6861d00b7124558cdf79f9387f948361be3.tar.bz2 |
nfs: have flexfiles mirror keep creds for both ro and rw layouts
A mirror can be shared between multiple layouts, even with different
iomodes. That makes stats gathering simpler, but it causes a problem
when we get different creds in READ vs. RW layouts.
The current code drops the newer credentials onto the floor when this
occurs. That's problematic when you fetch a READ layout first, and then
a RW. If the READ layout doesn't have the correct creds to do a write,
then writes will fail.
We could just overwrite the READ credentials with the RW ones, but that
would break the ability for the server to fence the layout for reads if
things go awry. We need to be able to revert to the earlier READ creds
if the RW layout is returned afterward.
The simplest fix is to just keep two sets of creds per mirror. One for
READ layouts and one for RW, and then use the appropriate set depending
on the iomode of the layout segment.
Also fix up some RCU nits that sparse found.
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/char_dev.c')
0 files changed, 0 insertions, 0 deletions