]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Sep 2015 21:02:24 +0000 (14:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Sep 2015 21:02:24 +0000 (14:02 -0700)
Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Stable patches:
   - Fix atomicity of pNFS commit list updates
   - Fix NFSv4 handling of open(O_CREAT|O_EXCL|O_RDONLY)
   - nfs_set_pgio_error sometimes misses errors
   - Fix a thinko in xs_connect()
   - Fix borkage in _same_data_server_addrs_locked()
   - Fix a NULL pointer dereference of migration recovery ops for v4.2
     client
   - Don't let the ctime override attribute barriers.
   - Revert "NFSv4: Remove incorrect check in can_open_delegated()"
   - Ensure flexfiles pNFS driver updates the inode after write finishes
   - flexfiles must not pollute the attribute cache with attrbutes from
     the DS
   - Fix a protocol error in layoutreturn
   - Fix a protocol issue with NFSv4.1 CLOSE stateids

  Bugfixes + cleanups
   - pNFS blocks bugfixes from Christoph
   - Various cleanups from Anna
   - More fixes for delegation corner cases
   - Don't fsync twice for O_SYNC/IS_SYNC files
   - Fix pNFS and flexfiles layoutstats bugs
   - pnfs/flexfiles: avoid duplicate tracking of mirror data
   - pnfs: Fix layoutget/layoutreturn/return-on-close serialisation
     issues
   - pnfs/flexfiles: error handling retries a layoutget before fallback
     to MDS

  Features:
   - Full support for the OPEN NFS4_CREATE_EXCLUSIVE4_1 mode from
     Kinglong
   - More RDMA client transport improvements from Chuck
   - Removal of the deprecated ib_reg_phys_mr() and ib_rereg_phys_mr()
     verbs from the SUNRPC, Lustre and core infiniband tree.
   - Optimise away the close-to-open getattr if there is no cached data"

* tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (108 commits)
  NFSv4: Respect the server imposed limit on how many changes we may cache
  NFSv4: Express delegation limit in units of pages
  Revert "NFS: Make close(2) asynchronous when closing NFS O_DIRECT files"
  NFS: Optimise away the close-to-open getattr if there is no cached data
  NFSv4.1/flexfiles: Clean up ff_layout_write_done_cb/ff_layout_commit_done_cb
  NFSv4.1/flexfiles: Mark the layout for return in ff_layout_io_track_ds_error()
  nfs: Remove unneeded checking of the return value from scnprintf
  nfs: Fix truncated client owner id without proto type
  NFSv4.1/flexfiles: Mark layout for return if the mirrors are invalid
  NFSv4.1/flexfiles: RW layouts are valid only if all mirrors are valid
  NFSv4.1/flexfiles: Fix incorrect usage of pnfs_generic_mark_devid_invalid()
  NFSv4.1/flexfiles: Fix freeing of mirrors
  NFSv4.1/pNFS: Don't request a minimal read layout beyond the end of file
  NFSv4.1/pnfs: Handle LAYOUTGET return values correctly
  NFSv4.1/pnfs: Don't ask for a read layout for an empty file.
  NFSv4.1: Fix a protocol issue with CLOSE stateids
  NFSv4.1/flexfiles: Don't mark the entire deviceid as bad for file errors
  SUNRPC: Prevent SYN+SYNACK+RST storms
  SUNRPC: xs_reset_transport must mark the connection as disconnected
  NFSv4.1/pnfs: Ensure layoutreturn reserves space for the opaque payload
  ...

1  2 
Documentation/kernel-parameters.txt
fs/nfs/callback.c
net/sunrpc/xprtrdma/xprt_rdma.h

index f2529286cd66dbd8c68fdf7d90cf75de8c421b3b,30d78b561574216796eb5e7c0ce9a9a5d017882e..f0c950598582f7ddc2810b1cba406465318e2ea1
@@@ -910,8 -910,6 +910,8 @@@ bytes respectively. Such letter suffixe
                        Disable PIN 1 of APIC timer
                        Can be useful to work around chipset bugs.
  
 +      dis_ucode_ldr   [X86] Disable the microcode loader.
 +
        dma_debug=off   If the kernel is compiled with DMA_API_DEBUG support,
                        this option disables the debugging code at boot.
  
                             <bus_id>,<clkrate>
  
        i8042.debug     [HW] Toggle i8042 debug mode
 +      i8042.unmask_kbd_data
 +                      [HW] Enable printing of interrupt data from the KBD port
 +                           (disabled by default, and as a pre-condition
 +                           requires that i8042.debug=1 be enabled)
        i8042.direct    [HW] Put keyboard port into non-translated mode
        i8042.dumbkbd   [HW] Pretend that controller can only read data from
                             keyboard and cannot control its state
                        The default parameter value of '0' causes the kernel
                        not to attempt recovery of lost locks.
  
+       nfs4.layoutstats_timer =
+                       [NFSv4.2] Change the rate at which the kernel sends
+                       layoutstats to the pNFS metadata server.
+                       Setting this to value to 0 causes the kernel to use
+                       whatever value is the default set by the layout
+                       driver. A non-zero value sets the minimum interval
+                       in seconds between layoutstats transmissions.
        nfsd.nfs4_disable_idmapping=
                        [NFSv4] When set to the default of '1', the NFSv4
                        server will return only numeric uids and gids to
                        in a given burst of a callback-flood test.
  
        rcutorture.fqs_duration= [KNL]
 -                      Set duration of force_quiescent_state bursts.
 +                      Set duration of force_quiescent_state bursts
 +                      in microseconds.
  
        rcutorture.fqs_holdoff= [KNL]
 -                      Set holdoff time within force_quiescent_state bursts.
 +                      Set holdoff time within force_quiescent_state bursts
 +                      in microseconds.
  
        rcutorture.fqs_stutter= [KNL]
 -                      Set wait time between force_quiescent_state bursts.
 +                      Set wait time between force_quiescent_state bursts
 +                      in seconds.
 +
 +      rcutorture.gp_cond= [KNL]
 +                      Use conditional/asynchronous update-side
 +                      primitives, if available.
  
        rcutorture.gp_exp= [KNL]
 -                      Use expedited update-side primitives.
 +                      Use expedited update-side primitives, if available.
  
        rcutorture.gp_normal= [KNL]
 -                      Use normal (non-expedited) update-side primitives.
 -                      If both gp_exp and gp_normal are set, do both.
 -                      If neither gp_exp nor gp_normal are set, still
 -                      do both.
 +                      Use normal (non-expedited) asynchronous
 +                      update-side primitives, if available.
 +
 +      rcutorture.gp_sync= [KNL]
 +                      Use normal (non-expedited) synchronous
 +                      update-side primitives, if available.  If all
 +                      of rcutorture.gp_cond=, rcutorture.gp_exp=,
 +                      rcutorture.gp_normal=, and rcutorture.gp_sync=
 +                      are zero, rcutorture acts as if is interpreted
 +                      they are all non-zero.
  
        rcutorture.n_barrier_cbs= [KNL]
                        Set callbacks/threads for rcu_barrier() testing.
                        Set time (s) between CPU-hotplug operations, or
                        zero to disable CPU-hotplug testing.
  
 -      rcutorture.torture_runnable= [BOOT]
 -                      Start rcutorture running at boot time.
 -
        rcutorture.shuffle_interval= [KNL]
                        Set task-shuffle interval (s).  Shuffling tasks
                        allows some CPUs to go into dyntick-idle mode
                        Test RCU's dyntick-idle handling.  See also the
                        rcutorture.shuffle_interval parameter.
  
 +      rcutorture.torture_runnable= [BOOT]
 +                      Start rcutorture running at boot time.
 +
        rcutorture.torture_type= [KNL]
                        Specify the RCU implementation to test.
  
diff --combined fs/nfs/callback.c
index 2c4a0b565d28e6eba828668a01123d8dce9f05e1,6d27d7215a213f1b2ed6cc7799163836e7049091..75f7c0a7538a247822ab3abcd6e3dfb4697269f3
@@@ -162,10 -162,6 +162,6 @@@ nfs41_callback_up(struct svc_serv *serv
        spin_lock_init(&serv->sv_cb_lock);
        init_waitqueue_head(&serv->sv_cb_waitq);
        rqstp = svc_prepare_thread(serv, &serv->sv_pools[0], NUMA_NO_NODE);
-       if (IS_ERR(rqstp)) {
-               svc_xprt_put(serv->sv_bc_xprt);
-               serv->sv_bc_xprt = NULL;
-       }
        dprintk("--> %s return %d\n", __func__, PTR_ERR_OR_ZERO(rqstp));
        return rqstp;
  }
@@@ -308,10 -304,6 +304,10 @@@ err_bind
        return ret;
  }
  
 +static struct svc_serv_ops nfs_cb_sv_ops = {
 +      .svo_enqueue_xprt       = svc_xprt_do_enqueue,
 +};
 +
  static struct svc_serv *nfs_callback_create_svc(int minorversion)
  {
        struct nfs_callback_data *cb_info = &nfs_callback_info[minorversion];
                printk(KERN_WARNING "nfs_callback_create_svc: no kthread, %d users??\n",
                        cb_info->users);
  
 -      serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, NULL);
 +      serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, &nfs_cb_sv_ops);
        if (!serv) {
                printk(KERN_ERR "nfs_callback_create_svc: create service failed\n");
                return ERR_PTR(-ENOMEM);
index e718d0959af34207082211b5a3b0c69bc5d779eb,d252457ff21a71567844b9f92cfc3345ecccfc34..02512221b8bc885dde93b987c561b344f6e96722
@@@ -51,6 -51,7 +51,6 @@@
  #include <linux/sunrpc/clnt.h>                /* rpc_xprt */
  #include <linux/sunrpc/rpc_rdma.h>    /* RPC/RDMA protocol */
  #include <linux/sunrpc/xprtrdma.h>    /* xprt parameters */
 -#include <linux/sunrpc/svc.h>         /* RPCSVC_MAXPAYLOAD */
  
  #define RDMA_RESOLVE_TIMEOUT  (5000)  /* 5 seconds */
  #define RDMA_CONNECT_RETRY_MAX        (2)     /* retries if no listener backlog */
@@@ -64,9 -65,8 +64,8 @@@ struct rpcrdma_ia 
        struct ib_device        *ri_device;
        struct rdma_cm_id       *ri_id;
        struct ib_pd            *ri_pd;
-       struct ib_mr            *ri_bind_mem;
+       struct ib_mr            *ri_dma_mr;
        u32                     ri_dma_lkey;
-       int                     ri_have_dma_lkey;
        struct completion       ri_done;
        int                     ri_async_rc;
        unsigned int            ri_max_frmr_depth;
@@@ -88,7 -88,6 +87,6 @@@ struct rpcrdma_ep 
        int                     rep_connected;
        struct ib_qp_init_attr  rep_attr;
        wait_queue_head_t       rep_connect_wait;
-       struct rpcrdma_regbuf   *rep_padbuf;
        struct rdma_conn_param  rep_remote_cma;
        struct sockaddr_storage rep_remote_addr;
        struct delayed_work     rep_connect_worker;
  struct rpcrdma_regbuf {
        size_t                  rg_size;
        struct rpcrdma_req      *rg_owner;
-       struct ib_mr            *rg_mr;
        struct ib_sge           rg_iov;
        __be32                  rg_base[0] __attribute__ ((aligned(256)));
  };
@@@ -164,8 -162,7 +161,7 @@@ rdmab_to_msg(struct rpcrdma_regbuf *rb
   * struct rpcrdma_buffer. N is the max number of outstanding requests.
   */
  
- /* temporary static scatter/gather max */
- #define RPCRDMA_MAX_DATA_SEGS (64)    /* max scatter/gather */
+ #define RPCRDMA_MAX_DATA_SEGS ((1 * 1024 * 1024) / PAGE_SIZE)
  #define RPCRDMA_MAX_SEGS      (RPCRDMA_MAX_DATA_SEGS + 2) /* head+tail = 2 */
  
  struct rpcrdma_buffer;
@@@ -257,16 -254,18 +253,18 @@@ struct rpcrdma_mr_seg {         /* chunk descr
        char            *mr_offset;     /* kva if no page, else offset */
  };
  
+ #define RPCRDMA_MAX_IOVS      (2)
  struct rpcrdma_req {
-       unsigned int    rl_niovs;       /* 0, 2 or 4 */
-       unsigned int    rl_nchunks;     /* non-zero if chunks */
-       unsigned int    rl_connect_cookie;      /* retry detection */
-       struct rpcrdma_buffer *rl_buffer; /* home base for this structure */
+       unsigned int            rl_niovs;
+       unsigned int            rl_nchunks;
+       unsigned int            rl_connect_cookie;
+       struct rpcrdma_buffer   *rl_buffer;
        struct rpcrdma_rep      *rl_reply;/* holder for reply buffer */
-       struct ib_sge   rl_send_iov[4]; /* for active requests */
-       struct rpcrdma_regbuf *rl_rdmabuf;
-       struct rpcrdma_regbuf *rl_sendbuf;
-       struct rpcrdma_mr_seg rl_segments[RPCRDMA_MAX_SEGS];
+       struct ib_sge           rl_send_iov[RPCRDMA_MAX_IOVS];
+       struct rpcrdma_regbuf   *rl_rdmabuf;
+       struct rpcrdma_regbuf   *rl_sendbuf;
+       struct rpcrdma_mr_seg   rl_segments[RPCRDMA_MAX_SEGS];
  };
  
  static inline struct rpcrdma_req *
@@@ -341,6 -340,7 +339,7 @@@ struct rpcrdma_stats 
        unsigned long           hardway_register_count;
        unsigned long           failed_marshal_count;
        unsigned long           bad_reply_count;
+       unsigned long           nomsg_call_count;
  };
  
  /*