Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2009 12:48:27 +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: r186897 - head/sys/ufs/ffs
Message-ID:  <200901081248.n08CmR7N022725@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jan  8 12:48:27 2009
New Revision: 186897
URL: http://svn.freebsd.org/changeset/base/186897

Log:
  If unmount of the ffs mp failed, reinitialize the extended attributes
  for the mp, and restart them if autostart is enabled.
  
  Reported and tested by:	pho
  Reviewed by:	rwatson
  MFC after:	3 weeks

Modified:
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vfsops.c	Thu Jan  8 12:47:30 2009	(r186896)
+++ head/sys/ufs/ffs/ffs_vfsops.c	Thu Jan  8 12:48:27 2009	(r186897)
@@ -1030,6 +1030,9 @@ ffs_unmount(mp, mntflags, td)
 	struct ufsmount *ump = VFSTOUFS(mp);
 	struct fs *fs;
 	int error, flags, susp;
+#ifdef UFS_EXTATTR
+	int e_restart;
+#endif
 
 	flags = 0;
 	fs = ump->um_fs;
@@ -1043,8 +1046,10 @@ ffs_unmount(mp, mntflags, td)
 		if (error != EOPNOTSUPP)
 			printf("ffs_unmount: ufs_extattr_stop returned %d\n",
 			    error);
+		e_restart = 0;
 	} else {
 		ufs_extattr_uepm_destroy(&ump->um_extattr);
+		e_restart = 1;
 	}
 #endif
 	if (susp) {
@@ -1121,6 +1126,15 @@ fail:
 		vfs_write_resume(mp);
 		vn_start_write(NULL, &mp, V_WAIT);
 	}
+#ifdef UFS_EXTATTR
+	if (e_restart) {
+		ufs_extattr_uepm_init(&ump->um_extattr);
+#ifdef UFS_EXTATTR_AUTOSTART
+		(void) ufs_extattr_autostart(mp, td);
+#endif
+	}
+#endif
+
 	return (error);
 }
 



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