1. 11 9月, 2009 1 次提交
  2. 09 9月, 2009 6 次提交
  3. 25 8月, 2009 1 次提交
  4. 24 8月, 2009 1 次提交
    • C
      NFS: Handle a zero-length auth flavor list · 5eecfde6
      Chuck Lever 提交于
      Some releases of Linux rpc.mountd (nfs-utils 1.1.4 and later) return an
      empty auth flavor list if no sec= was specified for the export.  This is
      notably broken server behavior.
      
      The new auth flavor list checking added in a recent commit rejects this
      case.  The OpenSolaris client does too.
      
      The broken mountd implementation is already widely deployed.  To avoid
      a behavioral regression, the kernel's mount client skips flavor checking
      (ie reverts to the pre-2.6.32 behavior) if mountd returns an empty
      flavor list.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5eecfde6
  5. 20 8月, 2009 3 次提交
  6. 15 8月, 2009 19 次提交
  7. 12 8月, 2009 1 次提交
  8. 10 8月, 2009 8 次提交
    • B
      nfs: remove superfluous BUG_ON()s · e576e05a
      Bartlomiej Zolnierkiewicz 提交于
      Subject: [PATCH] nfs: remove superfluous BUG_ON()s
      
      Remove duplicated BUG_ON()s from nfs[4]_create_server()
      (we make the same checks earlier in both functions).
      
      This takes care of the following entries from Dan's list:
      
      fs/nfs/client.c +1078 nfs_create_server(47) warning: variable derefenced before check 'server->nfs_client'
      fs/nfs/client.c +1079 nfs_create_server(48) warning: variable derefenced before check 'server->nfs_client->rpc_ops'
      fs/nfs/client.c +1363 nfs4_create_server(43) warning: variable derefenced before check 'server->nfs_client'
      fs/nfs/client.c +1364 nfs4_create_server(44) warning: variable derefenced before check 'server->nfs_
      Reported-by: NDan Carpenter <error27@gmail.com>
      Cc: corbet@lwn.net
      Cc: eteo@redhat.com
      Cc: Julia Lawall <julia@diku.dk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e576e05a
    • P
      NFS: read-modify-write page updating · 38c73044
      Peter Staubach 提交于
      Hi.
      
      I have a proposal for possibly resolving this issue.
      
      I believe that this situation occurs due to the way that the
      Linux NFS client handles writes which modify partial pages.
      
      The Linux NFS client handles partial page modifications by
      allocating a page from the page cache, copying the data from
      the user level into the page, and then keeping track of the
      offset and length of the modified portions of the page.  The
      page is not marked as up to date because there are portions
      of the page which do not contain valid file contents.
      
      When a read call comes in for a portion of the page, the
      contents of the page must be read in the from the server.
      However, since the page may already contain some modified
      data, that modified data must be written to the server
      before the file contents can be read back in the from server.
      And, since the writing and reading can not be done atomically,
      the data must be written and committed to stable storage on
      the server for safety purposes.  This means either a
      FILE_SYNC WRITE or a UNSTABLE WRITE followed by a COMMIT.
      This has been discussed at length previously.
      
      This algorithm could be described as modify-write-read.  It
      is most efficient when the application only updates pages
      and does not read them.
      
      My proposed solution is to add a heuristic to decide whether
      to do this modify-write-read algorithm or switch to a read-
      modify-write algorithm when initially allocating the page
      in the write system call path.  The heuristic uses the modes
      that the file was opened with, the offset in the page to
      read from, and the size of the region to read.
      
      If the file was opened for reading in addition to writing
      and the page would not be filled completely with data from
      the user level, then read in the old contents of the page
      and mark it as Uptodate before copying in the new data.  If
      the page would be completely filled with data from the user
      level, then there would be no reason to read in the old
      contents because they would just be copied over.
      
      This would optimize for applications which randomly access
      and update portions of files.  The linkage editor for the
      C compiler is an example of such a thing.
      
      I tested the attached patch by using rpmbuild to build the
      current Fedora rawhide kernel.  The kernel without the
      patch generated about 269,500 WRITE requests.  The modified
      kernel containing the patch generated about 261,000 WRITE
      requests.  Thus, about 8,500 fewer WRITE requests were
      generated.  I suspect that many of these additional
      WRITE requests were probably FILE_SYNC requests to WRITE
      a single page, but I didn't test this theory.
      
      The difference between this patch and the previous one was
      to remove the unneeded PageDirty() test.  I then retested to
      ensure that the resulting system continued to behave as
      desired.
      
      	Thanx...
      
      		ps
      Signed-off-by: NPeter Staubach <staubach@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      38c73044
    • T
      NFS: Add a ->migratepage() aop for NFS · 074cc1de
      Trond Myklebust 提交于
      Make NFS a bit more friendly to NUMA and memory hot removal...
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      074cc1de
    • T
    • T
      SUNRPC: Constify rpc_pipe_ops... · b693ba4a
      Trond Myklebust 提交于
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b693ba4a
    • C
      NFS: Replace nfs_set_port() with rpc_set_port() · ec6ee612
      Chuck Lever 提交于
      Clean up.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ec6ee612
    • C
      NFS: Replace nfs_parse_ip_address() with rpc_pton() · 53a0b9c4
      Chuck Lever 提交于
      Clean up: Use the common routine now provided in sunrpc.ko for parsing mount
      addresses.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      53a0b9c4
    • C
      SUNRPC: Provide functions for managing universal addresses · a02d6926
      Chuck Lever 提交于
      Introduce a set of functions in the kernel's RPC implementation for
      converting between a socket address and either a standard
      presentation address string or an RPC universal address.
      
      The universal address functions will be used to encode and decode
      RPCB_FOO and NFSv4 SETCLIENTID arguments.  The other functions are
      part of a previous promise to deliver shared functions that can be
      used by upper-layer protocols to display and manipulate IP
      addresses.
      
      The kernel's current address printf formatters were designed
      specifically for kernel to user-space APIs that require a particular
      string format for socket addresses, thus are somewhat limited for the
      purposes of sunrpc.ko.  The formatter for IPv6 addresses, %pI6, does
      not support short-handing or scope IDs.  Also, these printf formatters
      are unique per address family, so a separate formatter string is
      required for printing AF_INET and AF_INET6 addresses.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a02d6926