1. 08 2月, 2020 18 次提交
  2. 07 2月, 2020 3 次提交
    • A
      fold struct fs_parameter_enum into struct constant_table · 5eede625
      Al Viro 提交于
      no real difference now
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5eede625
    • A
      fs_parse: get rid of ->enums · 2710c957
      Al Viro 提交于
      Don't do a single array; attach them to fsparam_enum() entry
      instead.  And don't bother trying to embed the names into those -
      it actually loses memory, with no real speedup worth mentioning.
      
      Simplifies validation as well.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2710c957
    • A
      Pass consistent param->type to fs_parse() · 0f89589a
      Al Viro 提交于
      As it is, vfs_parse_fs_string() makes "foo" and "foo=" indistinguishable;
      both get fs_value_is_string for ->type and NULL for ->string.  To make
      it even more unpleasant, that combination is impossible to produce with
      fsconfig().
      
      Much saner rules would be
              "foo"           => fs_value_is_flag, NULL
      	"foo="          => fs_value_is_string, ""
      	"foo=bar"       => fs_value_is_string, "bar"
      All cases are distinguishable, all results are expressable by fsconfig(),
      ->has_value checks are much simpler that way (to the point of the field
      being useless) and quite a few regressions go away (gfs2 has no business
      accepting -o nodebug=, for example).
      
      Partially based upon patches from Miklos.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0f89589a
  3. 05 2月, 2020 3 次提交
    • R
      NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals · 7dc2993a
      Robert Milkowski 提交于
      Currently, each time nfs4_do_fsinfo() is called it will do an implicit
      NFS4 lease renewal, which is not compliant with the NFS4 specification.
      This can result in a lease being expired by an NFS server.
      
      Commit 83ca7f5a ("NFS: Avoid PUTROOTFH when managing leases")
      introduced implicit client lease renewal in nfs4_do_fsinfo(),
      which can result in the NFSv4.0 lease to expire on a server side,
      and servers returning NFS4ERR_EXPIRED or NFS4ERR_STALE_CLIENTID.
      
      This can easily be reproduced by frequently unmounting a sub-mount,
      then stat'ing it to get it mounted again, which will delay or even
      completely prevent client from sending RENEW operations if no other
      NFS operations are issued. Eventually nfs server will expire client's
      lease and return an error on file access or next RENEW.
      
      This can also happen when a sub-mount is automatically unmounted
      due to inactivity (after nfs_mountpoint_expiry_timeout), then it is
      mounted again via stat(). This can result in a short window during
      which client's lease will expire on a server but not on a client.
      This specific case was observed on production systems.
      
      This patch removes the implicit lease renewal from nfs4_do_fsinfo().
      
      Fixes: 83ca7f5a ("NFS: Avoid PUTROOTFH when managing leases")
      Signed-off-by: NRobert Milkowski <rmilkowski@gmail.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      7dc2993a
    • R
      NFSv4: try lease recovery on NFS4ERR_EXPIRED · 924491f2
      Robert Milkowski 提交于
      Currently, if an nfs server returns NFS4ERR_EXPIRED to open(),
      we return EIO to applications without even trying to recover.
      
      Fixes: 272289a3 ("NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid")
      Signed-off-by: NRobert Milkowski <rmilkowski@gmail.com>
      Reviewed-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      924491f2
    • W
      NFS: Fix memory leaks · 123c23c6
      Wenwen Wang 提交于
      In _nfs42_proc_copy(), 'res->commit_res.verf' is allocated through
      kzalloc() if 'args->sync' is true. In the following code, if
      'res->synchronous' is false, handle_async_copy() will be invoked. If an
      error occurs during the invocation, the following code will not be executed
      and the error will be returned . However, the allocated
      'res->commit_res.verf' is not deallocated, leading to a memory leak. This
      is also true if the invocation of process_copy_commit() returns an error.
      
      To fix the above leaks, redirect the execution to the 'out' label if an
      error is encountered.
      Signed-off-by: NWenwen Wang <wenwen@cs.uga.edu>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      123c23c6
  4. 04 2月, 2020 15 次提交
  5. 03 2月, 2020 1 次提交