1. 20 6月, 2015 3 次提交
  2. 05 6月, 2015 7 次提交
    • C
      rpcrdma: Merge svcrdma and xprtrdma modules into one · ffe1f0df
      Chuck Lever 提交于
      Bi-directional RPC support means code in svcrdma.ko invokes a bit of
      code in xprtrdma.ko, and vice versa. To avoid loader/linker loops,
      merge the server and client side modules together into a single
      module.
      
      When backchannel capabilities are added, the combined module will
      register all needed transport capabilities so that Upper Layer
      consumers automatically have everything needed to create a
      bi-directional transport connection.
      
      Module aliases are added for backwards compatibility with user
      space, which still may expect svcrdma.ko or xprtrdma.ko to be
      present.
      
      This commit reverts commit 2e8c12e1 ("xprtrdma: add separate
      Kconfig options for NFSoRDMA client and server support") and
      provides a single CONFIG option for enabling the new module.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ffe1f0df
    • C
      svcrdma: Add a separate "max data segs macro for svcrdma · 0380a3f3
      Chuck Lever 提交于
      The server and client maximum are architecturally independent.
      Allow changing one without affecting the other.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      0380a3f3
    • C
      svcrdma: Replace GFP_KERNEL in a loop with GFP_NOFAIL · b7e0b9a9
      Chuck Lever 提交于
      At the 2015 LSF/MM, it was requested that memory allocation
      call sites that request GFP_KERNEL allocations in a loop should be
      annotated with __GFP_NOFAIL.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      b7e0b9a9
    • C
      svcrdma: Keep rpcrdma_msg fields in network byte-order · 30b7e246
      Chuck Lever 提交于
      Fields in struct rpcrdma_msg are __be32. Don't byte-swap these
      fields when decoding RPC calls and then swap them back for the
      reply. For the most part, they can be left alone.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      30b7e246
    • C
      svcrdma: Fix byte-swapping in svc_rdma_sendto.c · 70747c25
      Chuck Lever 提交于
      In send_write_chunks(), we have:
      
      	for (xdr_off = rqstp->rq_res.head[0].iov_len, chunk_no = 0;
      	     xfer_len && chunk_no < arg_ary->wc_nchunks;
      	     chunk_no++) {
      		 . . .
      	}
      
      Note that arg_ary->wc_nchunk is in network byte-order. For the
      comparison to work correctly, both have to be in native byte-order.
      
      In send_reply_chunks, we have:
      
      	write_len = min(xfer_len, htonl(ch->rs_length));
      
      xfer_len is in native byte-order, and ch->rs_length is in
      network byte-order. be32_to_cpu() is the correct byte swap
      for ch->rs_length.
      
      As an additional clean up, replace ntohl() with be32_to_cpu() in
      a few other places.
      
      This appears to address a problem with large rsize hangs while
      using PHYSICAL memory registration. I suspect that is the only
      registration mode that uses more than one chunk element.
      
      BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=248Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      70747c25
    • K
      nfsd: Update callback sequnce id only CB_SEQUENCE success · 276f03e3
      Kinglong Mee 提交于
      When testing pnfs layout, nfsd got error NFS4ERR_SEQ_MISORDERED.
      It is caused by nfs return NFS4ERR_DELAY before validate_seqid(),
      don't update the sequnce id, but nfsd updates the sequnce id !!!
      
      According to RFC5661 20.9.3,
      " If CB_SEQUENCE returns an error, then the state of the slot
      (sequence ID, cached reply) MUST NOT change. "
      Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      276f03e3
    • K
      nfsd: Reset cb_status in nfsd4_cb_prepare() at retrying · 4399396e
      Kinglong Mee 提交于
      nfsd enters a infinite loop and prints message every 10 seconds:
      
      May 31 18:33:52 test-server kernel: Error sending entire callback!
      May 31 18:34:01 test-server kernel: Error sending entire callback!
      
      This is caused by a cb_layoutreturn getting error -10008
      (NFS4ERR_DELAY), the client crashing, and then nfsd entering the
      infinite loop:
      
        bc_sendto --> call_timeout --> nfsd4_cb_done --> nfsd4_cb_layout_done
        with error -10008 --> rpc_delay(task, HZ/100) --> bc_sendto ...
      
      Reproduced using xfstests 074 with nfs client's kdump on,
      CONFIG_DEFAULT_HUNG_TASK_TIMEOUT set, and client's blkmapd down:
      
      1. nfs client's write operation will get the layout of file,
         and then send getdeviceinfo,
      2. but layout segment is not recorded by client because blkmapd is down,
      3. client writes data by sending WRITE to server,
      4. nfs server recalls the layout of the file before WRITE,
      5. network error causes the client reset the session and return NFS4ERR_DELAY,
      6. so client's WRITE operation is waiting the reply.
         If the task hangs 120s, the client will crash.
      7. so that, the next bc_sendto will fail with TIMEOUT,
         and cb_status is NFS4ERR_DELAY.
      Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      4399396e
  3. 04 6月, 2015 2 次提交
  4. 01 6月, 2015 1 次提交
  5. 29 5月, 2015 4 次提交
  6. 07 5月, 2015 1 次提交
  7. 05 5月, 2015 9 次提交
  8. 04 5月, 2015 8 次提交
  9. 03 5月, 2015 3 次提交
    • J
      ext4: fix growing of tiny filesystems · 2c869b26
      Jan Kara 提交于
      The estimate of necessary transaction credits in ext4_flex_group_add()
      is too pessimistic. It reserves credit for sb, resize inode, and resize
      inode dindirect block for each group added in a flex group although they
      are always the same block and thus it is enough to account them only
      once. Also the number of modified GDT block is overestimated since we
      fit EXT4_DESC_PER_BLOCK(sb) descriptors in one block.
      
      Make the estimation more precise. That reduces number of requested
      credits enough that we can grow 20 MB filesystem (which has 1 MB
      journal, 79 reserved GDT blocks, and flex group size 16 by default).
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      2c869b26
    • D
      ext4: move check under lock scope to close a race. · 280227a7
      Davide Italiano 提交于
      fallocate() checks that the file is extent-based and returns
      EOPNOTSUPP in case is not. Other tasks can convert from and to
      indirect and extent so it's safe to check only after grabbing
      the inode mutex.
      Signed-off-by: NDavide Italiano <dccitaliano@gmail.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      280227a7
    • L
      ext4: fix data corruption caused by unwritten and delayed extents · d2dc317d
      Lukas Czerner 提交于
      Currently it is possible to lose whole file system block worth of data
      when we hit the specific interaction with unwritten and delayed extents
      in status extent tree.
      
      The problem is that when we insert delayed extent into extent status
      tree the only way to get rid of it is when we write out delayed buffer.
      However there is a limitation in the extent status tree implementation
      so that when inserting unwritten extent should there be even a single
      delayed block the whole unwritten extent would be marked as delayed.
      
      At this point, there is no way to get rid of the delayed extents,
      because there are no delayed buffers to write out. So when a we write
      into said unwritten extent we will convert it to written, but it still
      remains delayed.
      
      When we try to write into that block later ext4_da_map_blocks() will set
      the buffer new and delayed and map it to invalid block which causes
      the rest of the block to be zeroed loosing already written data.
      
      For now we can fix this by simply not allowing to set delayed status on
      written extent in the extent status tree. Also add WARN_ON() to make
      sure that we notice if this happens in the future.
      
      This problem can be easily reproduced by running the following xfs_io.
      
      xfs_io -f -c "pwrite -S 0xaa 4096 2048" \
                -c "falloc 0 131072" \
                -c "pwrite -S 0xbb 65536 2048" \
                -c "fsync" /mnt/test/fff
      
      echo 3 > /proc/sys/vm/drop_caches
      xfs_io -c "pwrite -S 0xdd 67584 2048" /mnt/test/fff
      
      This can be theoretically also reproduced by at random by running fsx,
      but it's not very reliable, though on machines with bigger page size
      (like ppc) this can be seen more often (especially xfstest generic/127)
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      d2dc317d
  10. 02 5月, 2015 2 次提交