Revert "Add nilfs2 file system support"
authorDavid Zeuthen <davidz@redhat.com>
Fri, 26 Aug 2011 17:09:41 +0000 (13:09 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 26 Aug 2011 17:09:41 +0000 (13:09 -0400)
This reverts commit 8b0fcd17235127af9f4ce33f518022f359d55e4a.

src/daemon.c
src/helpers/job-mkfs.c
tests/run

index a5f34ee..87420e1 100644 (file)
@@ -373,22 +373,6 @@ static const Filesystem known_file_systems[] =
       FALSE, /* supports_online_resize_shrink */
     },
     {
-      "nilfs2", /* id */
-      "NILFS2", /* name */
-      TRUE, /* supports_unix_owners */
-      TRUE, /* can_mount */
-      TRUE, /* can_create */
-      80, /* max_label_len */
-      FALSE, /* supports_label_rename */
-      FALSE, /* supports_online_label_rename*/
-      FALSE, /* supports_fsck */
-      FALSE, /* supports_online_fsck */
-      FALSE, /* supports_resize_enlarge */
-      FALSE, /* supports_online_resize_enlarge */
-      FALSE, /* supports_resize_shrink */
-      FALSE, /* supports_online_resize_shrink */
-    },
-    {
       "swap", /* id */
       "Swap Space", /* name */
       FALSE, /* supports_unix_owners */
index 62cdfff..8e4dce2 100644 (file)
@@ -337,51 +337,6 @@ main (int argc,
       command_line = g_string_free (s, FALSE);
 
     }
-  else if (strcmp (fstype, "nilfs2") == 0)
-    {
-
-      s = g_string_new ("mkfs.nilfs2");
-      for (n = 0; options[n] != NULL; n++)
-        {
-          if (g_str_has_prefix (options[n], "label="))
-            {
-              label = strdup (options[n] + sizeof("label=") - 1);
-              if (!validate_and_escape_label (&label, 80))
-                {
-                  g_string_free (s, TRUE);
-                  goto out;
-                }
-              g_string_append_printf (s, " -L \"%s\"", label);
-              g_free (label);
-              label = NULL;
-            }
-          else if (g_str_has_prefix (options[n], "take_ownership_uid="))
-            {
-              take_ownership_uid = strtol (options[n] + sizeof("take_ownership_uid=") - 1, &endp, 10);
-              if (endp == NULL || *endp != '\0')
-                {
-                  g_printerr ("option %s is malformed\n", options[n]);
-                  goto out;
-                }
-            }
-          else if (g_str_has_prefix (options[n], "take_ownership_gid="))
-            {
-              take_ownership_gid = strtol (options[n] + sizeof("take_ownership_gid=") - 1, &endp, 10);
-              if (endp == NULL || *endp != '\0')
-                {
-                  g_printerr ("option %s is malformed\n", options[n]);
-                  goto out;
-                }
-            }
-          else
-            {
-              g_printerr ("option %s not supported\n", options[n]);
-              goto out;
-            }
-        }
-      g_string_append_printf (s, " %s", device);
-      command_line = g_string_free (s, FALSE);
-    }
   else if (strcmp (fstype, "swap") == 0)
     {
 
index 780fd2c..420d39e 100755 (executable)
--- a/tests/run
+++ b/tests/run
@@ -46,7 +46,7 @@ import optparse
 import re
 
 NUM_VDEV = 3 # number of virtual test devices that we need
-VDEV_SIZE = 160000000 # size of virtual test devices
+VDEV_SIZE = 60000000 # size of virtual test devices
 test_md_dev = '/dev/md125'
 
 # Those file systems are known to have a broken handling of permissions, in
@@ -465,10 +465,6 @@ class FS(UDisksTestCase):
         '''fs: swap'''
         self._do_fs_check('swap')
 
-    def test_nilfs2(self):
-        '''fs: nilfs2'''
-        self._do_fs_check('nilfs2')
-
     def _do_fs_check(self, type):
         '''Run checks for a particular file system.'''
 
@@ -571,8 +567,8 @@ class FS(UDisksTestCase):
                 self.assertEqual(fs[3], type != 'swap') # can_mount
                 self.assert_(fs[4]) # can_create
                 supports_label_rename = fs[6]
-                # minix does not support labels; EXFAIL: swap and nilfs2 don't have a program for it
-                self.assertEqual(supports_label_rename, type not in ('nilfs2', 'minix', 'swap'))
+                # minix does not support labels; EXFAIL: swap doesn't have a program for it
+                self.assertEqual(supports_label_rename, type not in ('minix', 'swap'))
                 break
         else:
             self.fail('KnownFilesystems does not contain ' + type)
@@ -625,28 +621,19 @@ class FS(UDisksTestCase):
             self.assertEqual((st.st_uid, st.st_gid), (0, 0))
 
             # open files when mounted
-            num_open_file = 0
-            if type == 'nilfs2':
-                # garbage collector opens /.nilfs file
-                num_open_file = 1
-
-            result = iface.FilesystemListOpenFiles()
-            self.assertEqual(len(result), num_open_file)
+            self.assertEqual(iface.FilesystemListOpenFiles(), [])
 
             f = open(os.path.join(mount_path, 'test.txt'), 'w')
-            num_open_file += 1
             result = iface.FilesystemListOpenFiles()
-            self.assertEqual(len(result), num_open_file)
+            self.assertEqual(len(result), 1)
             self.assertEqual(result[0][0], os.getpid())
             self.assertEqual(result[0][1], os.geteuid())
             self.assert_(sys.argv[0] in result[0][2])
             f.close()
-            num_open_file -= 1
-
-            result = iface.FilesystemListOpenFiles()
-            self.assertEqual(len(result), num_open_file)
+            self.assertEqual(iface.FilesystemListOpenFiles(), [])
 
             self._do_file_perms_checks(type, mount_path)
+
             # unmount
             self.retry_busy(self.partition_iface().FilesystemUnmount, [])
             self.failIf(os.path.exists(mount_path), 'mount point was not removed')