Print this page
NEX-5801 Snapshots left over after failed backups
Reviewed by: Rick Mesta <rick.mesta@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Revert "NEX-5801 Snapshots left over after failed backups"
This reverts commit f182fb95f09036db71fbfc6f0a6b90469b761f21.
NEX-5801 Snapshots left over after failed backups
Reviewed by: Rick Mesta <rick.mesta@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
NEX-2911 NDMP logging should use syslog and is too chatty

*** 35,44 **** --- 35,47 ---- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + /* Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ + + #include <syslog.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <cstack.h>
*** 84,104 **** cstack_delete(cstack_t *stk) { cstack_t *tmp; if (stk == NULL) { - NDMP_LOG(LOG_DEBUG, "cstack_delete: invalid stack"); return; } while ((tmp = stk->next) != NULL) { stk->next = tmp->next; - NDMP_LOG(LOG_DEBUG, "cstack_delete(element): 0x%p", tmp); free(tmp); } - NDMP_LOG(LOG_DEBUG, "cstack_delete: 0x%p", stk); free(stk); } /* --- 87,104 ----
*** 115,125 **** cstack_push(cstack_t *stk, void *data, int len) { cstack_t *stk_node; if (stk == NULL) { - NDMP_LOG(LOG_DEBUG, "cstack_push: invalid stack"); return (-1); } if ((stk_node = ndmp_malloc(sizeof (cstack_t))) == NULL) return (-1); --- 115,124 ----
*** 127,137 **** stk_node->data = data; stk_node->len = len; stk_node->next = stk->next; stk->next = stk_node; - NDMP_LOG(LOG_DEBUG, "cstack_push(0x%p): 0x%p", stk, stk_node); return (0); } /* --- 126,135 ----
*** 146,161 **** cstack_pop(cstack_t *stk, void **data, int *len) { cstack_t *stk_node; if (stk == NULL) { - NDMP_LOG(LOG_DEBUG, "cstack_pop: invalid stack"); return (-1); } if ((stk_node = stk->next) == NULL) { - NDMP_LOG(LOG_DEBUG, "cstack_pop: underflow"); return (-1); } if (data) *data = stk_node->data; --- 144,157 ----
*** 162,172 **** if (len) *len = stk_node->len; stk->next = stk_node->next; - NDMP_LOG(LOG_DEBUG, "cstack_pop(0x%p): 0x%p", stk, stk_node); free(stk_node); return (0); } --- 158,167 ----
*** 179,194 **** */ int cstack_top(cstack_t *stk, void **data, int *len) { if (stk == NULL) { - NDMP_LOG(LOG_DEBUG, "cstack_pop: invalid stack"); return (-1); } if (stk->next == NULL) { - NDMP_LOG(LOG_DEBUG, "cstack_pop: underflow"); return (-1); } if (data) *data = stk->next->data; --- 174,187 ----
*** 542,552 **** return (NULL); (void) memcpy(&fdip->fd_dir_fh, fhp, sizeof (fs_fhandle_t)); if (!tlm_cat_path(fdip->fd_dir_name, dir, nm)) { free(fdip); ! NDMP_LOG(LOG_DEBUG, "TAPE BACKUP Find> path too long [%s][%s]", dir, nm); return (NULL); } return (fdip); } --- 535,545 ---- return (NULL); (void) memcpy(&fdip->fd_dir_fh, fhp, sizeof (fs_fhandle_t)); if (!tlm_cat_path(fdip->fd_dir_name, dir, nm)) { free(fdip); ! syslog(LOG_DEBUG, "TAPE BACKUP Find> path too long [%s][%s]", dir, nm); return (NULL); } return (fdip); }