diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2013-04-10 23:53:00 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2013-04-10 23:53:02 +0000 |
commit | eea19e32536ac6153b616876645469dc5d765dbb (patch) | |
tree | 4b88b9c882a77c29f637ef3d551bde1f72b467ae | |
parent | 02dad0812335827f96a2e66a235a8ef71229860a (diff) | |
parent | 37cc68d40a0ab1290a015e66cad4cade598c921b (diff) | |
download | illumos-joyent-eea19e32536ac6153b616876645469dc5d765dbb.tar.gz |
[illumos-gate merge]
commit 37cc68d40a0ab1290a015e66cad4cade598c921b
3674 onbld Checks should not query opensolaris.org
commit de8d9cff565e928d0ace86f3ea0e2b15094d61df
3645 dmu_send_impl: possibilty of pool hold leak
3692 Panic on zfs receive of a recursive deduplicated stream
commit cab8de142f6f9cba01161c444d3f6bda08561e45
3668 add "%H" to mdb_printf() for human-readable sizes
-rw-r--r-- | usr/src/tools/onbld/Checks/DbLookups.py | 55 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu_send.c | 14 |
2 files changed, 11 insertions, 58 deletions
diff --git a/usr/src/tools/onbld/Checks/DbLookups.py b/usr/src/tools/onbld/Checks/DbLookups.py index 1e0734e251..15f889e8d2 100644 --- a/usr/src/tools/onbld/Checks/DbLookups.py +++ b/usr/src/tools/onbld/Checks/DbLookups.py @@ -62,9 +62,9 @@ class BugDB(object): print r["6505625"]["synopsis"] """ - VALID_DBS = ["bugster", "illumos"] + VALID_DBS = ["illumos"] - def __init__(self, priority = ("illumos", "bugster")): + def __init__(self, priority = ["illumos"]): """Create a BugDB object. Keyword argument: @@ -96,48 +96,6 @@ class BugDB(object): } - def __boobug(self, cr): - cr = str(cr) - url = "http://bugs.opensolaris.org/view_bug.do" - req = urllib2.Request(url, urllib.urlencode({"bug_id": cr})) - results = {} - try: - data = urllib2.urlopen(req).readlines() - except urllib2.HTTPError, e: - if e.code != 404: - print "ERROR: HTTP error at " + \ - req.get_full_url() + \ - " got error: " + str(e.code) - raise e - else: - raise NonExistentBug(cr) - except urllib2.URLError, e: - print "ERROR: could not connect to " + \ - req.get_full_url() + \ - ' got error: "' + e.reason[1] + '"' - raise e - htmlParser = htmllib.HTMLParser(None) - metaHtmlRe = re.compile(r'^<meta name="([^"]+)" content="([^"]*)">$') - for line in data: - m = metaHtmlRe.search(line) - if not m: - continue - val = urllib.unquote(m.group(2)) - htmlParser.save_bgn() - htmlParser.feed(val) - results[m.group(1)] = htmlParser.save_end() - htmlParser.close() - - if "synopsis" not in results: - raise NonExistentBug(cr) - - results["cr_number"] = cr - results["sub_category"] = results.pop("subcategory") - results["status"] = results.pop("state") - results["date_submitted"] = results.pop("submit_date") - - return results - def lookup(self, crs): """Return all info for requested change reports. @@ -153,14 +111,7 @@ class BugDB(object): if not isinstance(crs, list): crs = [str(crs)] for database in self.__priority: - if database == "bugster": - for cr in crs: - cr = str(cr) - try: - results[cr] = self.__boobug(cr) - except NonExistentBug: - continue - elif database == "illumos": + if database == "illumos": for cr in crs: try: results[str(cr)] = self.__illbug(cr) diff --git a/usr/src/uts/common/fs/zfs/dmu_send.c b/usr/src/uts/common/fs/zfs/dmu_send.c index 756447ddb1..cbbde2071b 100644 --- a/usr/src/uts/common/fs/zfs/dmu_send.c +++ b/usr/src/uts/common/fs/zfs/dmu_send.c @@ -479,14 +479,14 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *ds, list_insert_head(&ds->ds_sendstreams, dsp); mutex_exit(&ds->ds_sendstream_lock); + dsl_dataset_long_hold(ds, FTAG); + dsl_pool_rele(dp, tag); + if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) { err = dsp->dsa_err; goto out; } - dsl_dataset_long_hold(ds, FTAG); - dsl_pool_rele(dp, tag); - err = traverse_dataset(ds, fromtxg, TRAVERSE_PRE | TRAVERSE_PREFETCH, backup_cb, dsp); @@ -960,6 +960,7 @@ free_guid_map_onexit(void *arg) while ((gmep = avl_destroy_nodes(ca, &cookie)) != NULL) { dsl_dataset_long_rele(gmep->gme_ds, gmep); + dsl_dataset_rele(gmep->gme_ds, gmep); kmem_free(gmep, sizeof (guid_map_entry_t)); } avl_destroy(ca); @@ -1636,14 +1637,15 @@ add_ds_to_guidmap(const char *name, avl_tree_t *guid_map, uint64_t snapobj) err = dsl_pool_hold(name, FTAG, &dp); if (err != 0) return (err); - err = dsl_dataset_hold_obj(dp, snapobj, FTAG, &snapds); + gmep = kmem_alloc(sizeof (*gmep), KM_SLEEP); + err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds); if (err == 0) { - gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP); gmep->guid = snapds->ds_phys->ds_guid; gmep->gme_ds = snapds; avl_add(guid_map, gmep); dsl_dataset_long_hold(snapds, gmep); - dsl_dataset_rele(snapds, FTAG); + } else { + kmem_free(gmep, sizeof (*gmep)); } dsl_pool_rele(dp, FTAG); |