Print this page
NEX-6088 ZFS scrub/resilver take excessively long due to issuing lots of random IO
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
NEX-5366 Race between unique_insert() and unique_remove() causes ZFS fsid change
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Dan Vatca <dan.vatca@gmail.com>
NEX-4582 update wrc test cases for allow to use write back cache per tree of datasets
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Remaining fixes for the illumos merge

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zap.c
          +++ new/usr/src/uts/common/fs/zfs/zap.c
↓ open down ↓ 747 lines elided ↑ open up ↑
 748  748          case 1:
 749  749          case 2:
 750  750          case 4:
 751  751          case 8:
 752  752                  break;
 753  753          default:
 754  754                  return (SET_ERROR(EINVAL));
 755  755          }
 756  756  
 757  757          if (integer_size * num_integers > ZAP_MAXVALUELEN)
 758      -                return (E2BIG);
      758 +                return (SET_ERROR(E2BIG));
 759  759  
 760  760          return (0);
 761  761  }
 762  762  
 763  763  static int
 764  764  fzap_check(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers)
 765  765  {
 766  766          int err;
 767  767  
 768  768          if ((err = fzap_checkname(zn)) != 0)
↓ open down ↓ 259 lines elided ↑ open up ↑
1028 1028                      8, 1, &za.za_first_integer, tx);
1029 1029                  if (err)
1030 1030                          break;
1031 1031          }
1032 1032          zap_cursor_fini(&zc);
1033 1033          return (err);
1034 1034  }
1035 1035  
1036 1036  int
1037 1037  zap_join_key(objset_t *os, uint64_t fromobj, uint64_t intoobj,
1038      -    uint64_t value, dmu_tx_t *tx)
     1038 +    uint64_t value, dmu_tx_t *tx, boolean_t exists_ok)
1039 1039  {
1040 1040          zap_cursor_t zc;
1041 1041          zap_attribute_t za;
1042 1042          int err;
1043 1043  
1044 1044          err = 0;
1045 1045          for (zap_cursor_init(&zc, os, fromobj);
1046 1046              zap_cursor_retrieve(&zc, &za) == 0;
1047 1047              (void) zap_cursor_advance(&zc)) {
1048 1048                  if (za.za_integer_length != 8 || za.za_num_integers != 1) {
1049 1049                          err = SET_ERROR(EINVAL);
1050 1050                          break;
1051 1051                  }
1052 1052                  err = zap_add(os, intoobj, za.za_name,
1053 1053                      8, 1, &value, tx);
1054      -                if (err)
1055      -                        break;
     1054 +                if (err != 0) {
     1055 +                        if (err == EEXIST && exists_ok)
     1056 +                                err = 0;
     1057 +                        else
     1058 +                                break;
     1059 +                }
1056 1060          }
1057 1061          zap_cursor_fini(&zc);
1058 1062          return (err);
1059 1063  }
1060 1064  
1061 1065  int
1062 1066  zap_join_increment(objset_t *os, uint64_t fromobj, uint64_t intoobj,
1063 1067      dmu_tx_t *tx)
1064 1068  {
1065 1069          zap_cursor_t zc;
↓ open down ↓ 268 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX