324 np->nvp_expirecnts, np->nvp_npaths);
325 if (rval != 0) {
326 nvf_error("%s: nvlist add error %d (sdev)\n",
327 nvf_cache_name(fd), rval);
328 goto err;
329 }
330
331 rval = nvlist_add_nvlist(nvl, DP_DEVNAME_ID, sub_nvl);
332 if (rval != 0) {
333 nvf_error("%s: nvlist add error %d (sublist)\n",
334 nvf_cache_name(fd), rval);
335 goto err;
336 }
337 nvlist_free(sub_nvl);
338 }
339
340 *ret_nvl = nvl;
341 return (DDI_SUCCESS);
342
343 err:
344 if (sub_nvl)
345 nvlist_free(sub_nvl);
346 nvlist_free(nvl);
347 *ret_nvl = NULL;
348 return (DDI_FAILURE);
349 }
350
351 /*
352 * Run through the data read from the backing cache store
353 * to establish the initial state of the neg. cache.
354 */
355 static void
356 sdev_ncache_process_store(void)
357 {
358 sdev_nc_list_t *ncl = sdev_ncache;
359 nvp_devname_t *np;
360 sdev_nc_node_t *lp;
361 char *path;
362 int i, n;
363 list_t *listp;
364
|
324 np->nvp_expirecnts, np->nvp_npaths);
325 if (rval != 0) {
326 nvf_error("%s: nvlist add error %d (sdev)\n",
327 nvf_cache_name(fd), rval);
328 goto err;
329 }
330
331 rval = nvlist_add_nvlist(nvl, DP_DEVNAME_ID, sub_nvl);
332 if (rval != 0) {
333 nvf_error("%s: nvlist add error %d (sublist)\n",
334 nvf_cache_name(fd), rval);
335 goto err;
336 }
337 nvlist_free(sub_nvl);
338 }
339
340 *ret_nvl = nvl;
341 return (DDI_SUCCESS);
342
343 err:
344 nvlist_free(sub_nvl);
345 nvlist_free(nvl);
346 *ret_nvl = NULL;
347 return (DDI_FAILURE);
348 }
349
350 /*
351 * Run through the data read from the backing cache store
352 * to establish the initial state of the neg. cache.
353 */
354 static void
355 sdev_ncache_process_store(void)
356 {
357 sdev_nc_list_t *ncl = sdev_ncache;
358 nvp_devname_t *np;
359 sdev_nc_node_t *lp;
360 char *path;
361 int i, n;
362 list_t *listp;
363
|