Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2011 07:50:11 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/157728: commit references a PR
Message-ID:  <201108200750.p7K7oBKE069224@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/157728; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/157728: commit references a PR
Date: Sat, 20 Aug 2011 07:43:25 +0000 (UTC)

 Author: mm
 Date: Sat Aug 20 07:43:10 2011
 New Revision: 225022
 URL: http://svn.freebsd.org/changeset/base/225022
 
 Log:
   MFC r224814, r224855:
   
   MFC r224814 [1]:
   Fix race between dmu_objset_prefetch() invoked from
   zfs_ioc_dataset_list_next() and dsl_dir_destroy_check() indirectly
   invoked from dmu_recv_existing_end() via dsl_dataset_destroy() by not
   prefetching temporary clones, as these count as always inconsistent.
   In addition, do not prefetch hidden datasets at all as we are not
   going to process these later.
   
   Filed as Illumos Bug #1346
   
   MFC r224855:
   zfs_ioctl.c: improve code readability in zfs_ioc_dataset_list_next()
   
   zvol.c: fix calling of dmu_objset_prefetch() in zvol_create_minors()
   by passing full instead of relative dataset name and prefetching all
   visible datasets to be processed later instead of just the pool name
   
   PR:		kern/157728 [1]
   Tested by:	Borja Marcos <borjam@sarenet.es> [1], mm
   Reviewed by:	pjd
 
 Modified:
   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
 
 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
 ==============================================================================
 --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Sat Aug 20 06:08:31 2011	(r225021)
 +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Sat Aug 20 07:43:10 2011	(r225022)
 @@ -1963,8 +1963,10 @@ top:
  		uint64_t cookie = 0;
  		int len = sizeof (zc->zc_name) - (p - zc->zc_name);
  
 -		while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0)
 -			(void) dmu_objset_prefetch(zc->zc_name, NULL);
 +		while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) {
 +			if (!dataset_name_hidden(zc->zc_name))
 +				(void) dmu_objset_prefetch(zc->zc_name, NULL);
 +		}
  	}
  
  	do {
 
 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
 ==============================================================================
 --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Sat Aug 20 06:08:31 2011	(r225021)
 +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Sat Aug 20 07:43:10 2011	(r225022)
 @@ -2200,11 +2200,11 @@ zvol_create_minors(const char *name)
  	p = osname + strlen(osname);
  	len = MAXPATHLEN - (p - osname);
  
 -	if (strchr(name, '/') == NULL) {
 -		/* Prefetch only for pool name. */
 -		cookie = 0;
 -		while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0)
 -			(void) dmu_objset_prefetch(p, NULL);
 +	/* Prefetch the datasets. */
 +	cookie = 0;
 +	while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) {
 +		if (!dataset_name_hidden(osname))
 +			(void) dmu_objset_prefetch(osname, NULL);
  	}
  
  	cookie = 0;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108200750.p7K7oBKE069224>