Print this page
11083 support NFS server in zone
Portions contributed by: Dan Kruchinin <dan.kruchinin@nexenta.com>
Portions contributed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Portions contributed by: Mike Zeller <mike@mikezeller.net>
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
Portions contributed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: C Fraire <cfraire@me.com>
Change-Id: I22f289d357503f9b48a0bc2482cc4328a6d43d16

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_callback.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_callback.c
↓ open down ↓ 552 lines elided ↑ open up ↑
 553  553          struct compound_state cs;
 554  554          nfs_cb_argop4 *argop;
 555  555          nfs_cb_resop4 *resop, *new_res;
 556  556          uint_t op;
 557  557  
 558  558          bzero(&cs, sizeof (cs));
 559  559          cs.statusp = &resp->status;
 560  560          cs.cont = TRUE;
 561  561  
 562  562          /*
 563      -         * Form a reply tag by copying over the reqeuest tag.
      563 +         * Form a reply tag by copying over the request tag.
 564  564           */
 565  565          resp->tag.utf8string_len = args->tag.utf8string_len;
 566      -        resp->tag.utf8string_val = kmem_alloc(resp->tag.utf8string_len,
 567      -            KM_SLEEP);
 568      -        bcopy(args->tag.utf8string_val, resp->tag.utf8string_val,
 569      -            args->tag.utf8string_len);
      566 +        if (args->tag.utf8string_len != 0) {
      567 +                resp->tag.utf8string_val =
      568 +                    kmem_alloc(resp->tag.utf8string_len, KM_SLEEP);
      569 +                bcopy(args->tag.utf8string_val, resp->tag.utf8string_val,
      570 +                    args->tag.utf8string_len);
      571 +        } else {
      572 +                resp->tag.utf8string_val = NULL;
      573 +        }
 570  574  
 571  575          /*
 572  576           * XXX for now, minorversion should be zero
 573  577           */
 574  578          if (args->minorversion != CB4_MINORVERSION) {
 575  579                  resp->array_len = 0;
 576  580                  resp->array = NULL;
 577  581                  resp->status = NFS4ERR_MINOR_VERS_MISMATCH;
 578  582                  return;
 579  583          }
↓ open down ↓ 1946 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX