svn commit: r319949 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Andriy Gapon
avg at FreeBSD.org
Wed Jun 14 16:42:40 UTC 2017
Author: avg
Date: Wed Jun 14 16:42:38 2017
New Revision: 319949
URL: https://svnweb.freebsd.org/changeset/base/319949
Log:
MFV r319948: 5428 provide fts(), reallocarray(), and strtonum()
illumos/illumos-gate at 4585130b259133a26efae68275dbe56b08366deb
https://github.com/illumos/illumos-gate/commit/4585130b259133a26efae68275dbe56b08366deb
https://www.illumos.org/issues/5428
Most of the upstream change is not applicable to FreeBSD.
Only the renaming of strtonum to zfs_strtonum is relevant to us.
And we already had it partially done.
Reviewed by: Robert Mustacchi <rm at joyent.com>
Approved by: Joshua M. Clulow <josh at sysmgr.org>
Author: Yuri Pankov <yuri.pankov at nexenta.com>
MFC after: 1 week
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
head/sys/cddl/contrib/opensolaris/ (props changed)
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c Wed Jun 14 16:36:01 2017 (r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c Wed Jun 14 16:42:38 2017 (r319949)
@@ -85,7 +85,7 @@ dsl_deadlist_load_tree(dsl_deadlist_t *dl)
zap_cursor_retrieve(&zc, &za) == 0;
zap_cursor_advance(&zc)) {
dsl_deadlist_entry_t *dle = kmem_alloc(sizeof (*dle), KM_SLEEP);
- dle->dle_mintxg = strtonum(za.za_name, NULL);
+ dle->dle_mintxg = zfs_strtonum(za.za_name, NULL);
VERIFY3U(0, ==, bpobj_open(&dle->dle_bpobj, dl->dl_os,
za.za_first_integer));
avl_add(&dl->dl_tree, dle);
@@ -490,7 +490,7 @@ dsl_deadlist_merge(dsl_deadlist_t *dl, uint64_t obj, d
for (zap_cursor_init(&zc, dl->dl_os, obj);
zap_cursor_retrieve(&zc, &za) == 0;
zap_cursor_advance(&zc)) {
- uint64_t mintxg = strtonum(za.za_name, NULL);
+ uint64_t mintxg = zfs_strtonum(za.za_name, NULL);
dsl_deadlist_insert_bpobj(dl, za.za_first_integer, mintxg, tx);
VERIFY3U(0, ==, zap_remove_int(dl->dl_os, obj, mintxg, tx));
}
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Jun 14 16:36:01 2017 (r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Jun 14 16:42:38 2017 (r319949)
@@ -1389,7 +1389,7 @@ dsl_scan_visit(dsl_scan_t *scn, dmu_tx_t *tx)
dsl_dataset_t *ds;
uint64_t dsobj;
- dsobj = strtonum(za.za_name, NULL);
+ dsobj = zfs_strtonum(za.za_name, NULL);
VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
scn->scn_phys.scn_queue_obj, dsobj, tx));
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Wed Jun 14 16:36:01 2017 (r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Wed Jun 14 16:42:38 2017 (r319949)
@@ -340,7 +340,7 @@ static int
dsl_dataset_hold_obj_string(dsl_pool_t *dp, const char *dsobj, void *tag,
dsl_dataset_t **dsp)
{
- return (dsl_dataset_hold_obj(dp, strtonum(dsobj, NULL), tag, dsp));
+ return (dsl_dataset_hold_obj(dp, zfs_strtonum(dsobj, NULL), tag, dsp));
}
static int
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c Wed Jun 14 16:36:01 2017 (r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c Wed Jun 14 16:42:38 2017 (r319949)
@@ -73,13 +73,13 @@ bookmark_to_name(zbookmark_phys_t *zb, char *buf, size
static void
name_to_bookmark(char *buf, zbookmark_phys_t *zb)
{
- zb->zb_objset = strtonum(buf, &buf);
+ zb->zb_objset = zfs_strtonum(buf, &buf);
ASSERT(*buf == ':');
- zb->zb_object = strtonum(buf + 1, &buf);
+ zb->zb_object = zfs_strtonum(buf + 1, &buf);
ASSERT(*buf == ':');
- zb->zb_level = (int)strtonum(buf + 1, &buf);
+ zb->zb_level = (int)zfs_strtonum(buf + 1, &buf);
ASSERT(*buf == ':');
- zb->zb_blkid = strtonum(buf + 1, &buf);
+ zb->zb_blkid = zfs_strtonum(buf + 1, &buf);
ASSERT(*buf == '\0');
}
#endif
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed Jun 14 16:36:01 2017 (r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed Jun 14 16:42:38 2017 (r319949)
@@ -848,7 +848,6 @@ extern void zfs_blkptr_verify(spa_t *spa, const blkptr
extern int spa_mode(spa_t *spa);
extern uint64_t zfs_strtonum(const char *str, char **nptr);
-#define strtonum(str, nptr) zfs_strtonum((str), (nptr))
extern char *spa_his_ievent_table[];
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jun 14 16:36:01 2017 (r319948)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jun 14 16:42:38 2017 (r319949)
@@ -630,7 +630,7 @@ fuidstr_to_sid(zfsvfs_t *zfsvfs, const char *fuidstr,
uint64_t fuid;
const char *domain;
- fuid = strtonum(fuidstr, NULL);
+ fuid = zfs_strtonum(fuidstr, NULL);
domain = zfs_fuid_find_by_idx(zfsvfs, FUID_INDEX(fuid));
if (domain)
More information about the svn-src-head
mailing list