1. 20 3月, 2008 7 次提交
    • J
      NFS: clean up short packet handling for NFSv4 readdir · 7bda2cdf
      Jeff Layton 提交于
      Currently, the NFS readdir decoders have a workaround for buggy servers
      that send an empty readdir response with the EOF bit unset. If the
      server sends a malformed response in some cases, this workaround kicks
      in and just returns an empty response rather than returning a proper
      error to the caller.
      
      This patch does 3 things:
      
      1) have malformed responses with no entries return error (-EIO)
      
      2) preserve existing workaround for servers that send empty
         responses with the EOF marker unset.
      
      3) Add some comments to clarify the logic in decode_readdir().
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7bda2cdf
    • J
      NFS: clean up short packet handling for NFSv3 readdir · 643f8111
      Jeff Layton 提交于
      Currently, the NFS readdir decoders have a workaround for buggy servers
      that send an empty readdir response with the EOF bit unset. If the
      server sends a malformed response in some cases, this workaround kicks
      in and just returns an empty response rather than returning a proper
      error to the caller.
      
      This patch does 3 things:
      
      1) have malformed responses with no entries return error (-EIO)
      
      2) preserve existing workaround for servers that send empty
         responses with the EOF marker unset.
      
      3) Add some comments to clarify the logic in nfs3_xdr_readdirres().
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      643f8111
    • J
      NFS: clean up short packet handling for NFSv2 readdir · caa02bd5
      Jeff Layton 提交于
      Currently, the NFS readdir decoders have a workaround for buggy servers
      that send an empty readdir response with the EOF bit unset. If the
      server sends a malformed response in some cases, this workaround kicks
      in and just returns an empty response rather than returning a proper
      error to the caller.
      
      This patch does 3 things:
      
      1) have malformed responses with no entries return error (-EIO)
      
      2) preserve existing workaround for servers that send empty
         responses with the EOF marker unset.
      
      3) Add some comments to clarify the logic in nfs_xdr_readdirres().
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      caa02bd5
    • F
    • F
      nfs: nfs_redirty_request · 6d884e8f
      Fred 提交于
      Both flush functions have the same error handling routine.  Pull
      it out as a function.
      Signed-off-by: NFred Isaman <iisaman@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6d884e8f
    • T
      Merge branch 'hotfixes' into devel · c7c350e9
      Trond Myklebust 提交于
      c7c350e9
    • F
      nfs: don't ignore return value from nfs_pageio_add_request · f8512ad0
      Fred Isaman 提交于
      Ignoring the return value from nfs_pageio_add_request can cause deadlocks.
      
      In read path:
        call nfs_pageio_add_request from readpage_async_filler
        assume at this point that there are requests already in desc, that
          can't be merged with the current request.
        so nfs_pageio_doio is fired up to clear out desc.
        assume something goes wrong in setting up the io, so desc->pg_error is set.
        This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original
          request.
        BUT, since return code is ignored, readpage_async_filler assumes it has
          been added, and does nothing further, leaving page locked.
        do_generic_mapping_read will eventually call lock_page, resulting in deadlock
      
      In write path:
        page is marked dirty by generic_perform_write
        nfs_writepages is called
        call nfs_pageio_add_request from nfs_page_async_flush
        assume at this point that there are requests already in desc, that
          can't be merged with the current request.
        so nfs_pageio_doio is fired up to clear out desc.
        assume something goes wrong in setting up the io, so desc->pg_error is set.
        This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original
          request, yet marking the request as locked (PG_BUSY) and in writeback,
          clearing dirty marks.
        The next time a write is done to the page, deadlock will result as
          nfs_write_end calls nfs_update_request
      Signed-off-by: NFred Isaman <iisaman@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f8512ad0
  2. 19 3月, 2008 15 次提交
  3. 18 3月, 2008 18 次提交