Date: Sat, 4 Apr 2009 12:19:52 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190690 - head/sys/ufs/ffs Message-ID: <200904041219.n34CJq7P071063@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Apr 4 12:19:52 2009 New Revision: 190690 URL: http://svn.freebsd.org/changeset/base/190690 Log: When removing or renaming snaphost, do not delve into request_cleanup(). The later may need blocks from the underlying device that belongs to normal files, that should not be locked while snap lock is held. Reported and tested by: pho MFC after: 1 month Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sat Apr 4 11:43:32 2009 (r190689) +++ head/sys/ufs/ffs/ffs_softdep.c Sat Apr 4 12:19:52 2009 (r190690) @@ -3309,7 +3309,7 @@ newdirrem(bp, dp, ip, isrmdir, prevdirre * the number of freefile and freeblks structures. */ ACQUIRE_LOCK(&lk); - if (num_dirrem > max_softdeps / 2) + if (!(ip->i_flags & SF_SNAPSHOT) && num_dirrem > max_softdeps / 2) (void) request_cleanup(ITOV(dp)->v_mount, FLUSH_REMOVE); num_dirrem += 1; FREE_LOCK(&lk);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904041219.n34CJq7P071063>