ffs_snapshot.c (175635) | ffs_snapshot.c (177368) |
---|---|
1/*- 2 * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. 3 * 4 * Further information about snapshots can be obtained from: 5 * 6 * Marshall Kirk McKusick http://www.mckusick.com/softdep/ 7 * 1614 Oxford Street mckusick@mckusick.com 8 * Berkeley, CA 94709-1608 +1-510-843-9542 --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_snapshot.c 8.11 (McKusick) 7/23/00 34 */ 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. 3 * 4 * Further information about snapshots can be obtained from: 5 * 6 * Marshall Kirk McKusick http://www.mckusick.com/softdep/ 7 * 1614 Oxford Street mckusick@mckusick.com 8 * Berkeley, CA 94709-1608 +1-510-843-9542 --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_snapshot.c 8.11 (McKusick) 7/23/00 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_snapshot.c 175635 2008-01-24 12:34:30Z attilio $"); | 37__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_snapshot.c 177368 2008-03-19 06:19:01Z jeff $"); |
38 39#include "opt_quota.h" 40 41#include <sys/param.h> 42#include <sys/kernel.h> 43#include <sys/systm.h> 44#include <sys/conf.h> 45#include <sys/bio.h> --- 342 unchanged lines hidden (view full) --- 388 * 389 * Recind nice scheduling while running with the filesystem suspended. 390 */ 391 if (td->td_proc->p_nice > 0) { 392 struct proc *p; 393 394 p = td->td_proc; 395 PROC_LOCK(p); | 38 39#include "opt_quota.h" 40 41#include <sys/param.h> 42#include <sys/kernel.h> 43#include <sys/systm.h> 44#include <sys/conf.h> 45#include <sys/bio.h> --- 342 unchanged lines hidden (view full) --- 388 * 389 * Recind nice scheduling while running with the filesystem suspended. 390 */ 391 if (td->td_proc->p_nice > 0) { 392 struct proc *p; 393 394 p = td->td_proc; 395 PROC_LOCK(p); |
396 PROC_SLOCK(p); | |
397 saved_nice = p->p_nice; 398 sched_nice(p, 0); | 396 saved_nice = p->p_nice; 397 sched_nice(p, 0); |
399 PROC_SUNLOCK(p); | |
400 PROC_UNLOCK(p); 401 } 402 /* 403 * Suspend operation on filesystem. 404 */ 405 for (;;) { 406 vn_finished_write(wrtmp); 407 if ((error = vfs_write_suspend(vp->v_mount)) != 0) { --- 403 unchanged lines hidden (view full) --- 811 bawrite(sbp); 812out: 813 NDFREE(&nd, NDF_ONLY_PNBUF); 814 if (saved_nice > 0) { 815 struct proc *p; 816 817 p = td->td_proc; 818 PROC_LOCK(p); | 398 PROC_UNLOCK(p); 399 } 400 /* 401 * Suspend operation on filesystem. 402 */ 403 for (;;) { 404 vn_finished_write(wrtmp); 405 if ((error = vfs_write_suspend(vp->v_mount)) != 0) { --- 403 unchanged lines hidden (view full) --- 809 bawrite(sbp); 810out: 811 NDFREE(&nd, NDF_ONLY_PNBUF); 812 if (saved_nice > 0) { 813 struct proc *p; 814 815 p = td->td_proc; 816 PROC_LOCK(p); |
819 PROC_SLOCK(p); | |
820 sched_nice(td->td_proc, saved_nice); | 817 sched_nice(td->td_proc, saved_nice); |
821 PROC_SUNLOCK(p); | |
822 PROC_UNLOCK(td->td_proc); 823 } 824 UFS_LOCK(ump); 825 if (fs->fs_active != 0) { 826 FREE(fs->fs_active, M_DEVBUF); 827 fs->fs_active = 0; 828 } 829 UFS_UNLOCK(ump); --- 1692 unchanged lines hidden --- | 818 PROC_UNLOCK(td->td_proc); 819 } 820 UFS_LOCK(ump); 821 if (fs->fs_active != 0) { 822 FREE(fs->fs_active, M_DEVBUF); 823 fs->fs_active = 0; 824 } 825 UFS_UNLOCK(ump); --- 1692 unchanged lines hidden --- |