Index: fsset.py
===================================================================
RCS file: /usr/local/CVS/anaconda/fsset.py,v
retrieving revision 1.340
diff -u -p -r1.340 fsset.py
--- fsset.py	18 Oct 2007 20:27:32 -0000	1.340
+++ fsset.py	18 Oct 2007 22:28:14 -0000
@@ -177,6 +177,9 @@ class FileSystemType:
         self.extraFormatArgs = []
         self.maxLabelChars = 16
         self.packages = []
+        self.supportsProfiles = False
+        self.profileSpecifier = None
+        self.profile = None
 
     def isKernelFS(self):
         """Returns True if this is an in-kernel pseudo-filesystem."""
@@ -240,6 +243,22 @@ class FileSystemType:
     def isLinuxNativeFS(self):
         return self.linuxnativefs
 
+    def setProfile(self, profile=None):
+        if not self.supportsProfiles:
+            raise RuntimeError, "%s does not support profiles" % (self,)
+        self.profile = profile
+
+    def getProfileArgs(self):
+        if not self.supportsProfiles:
+            raise RuntimeError, "%s does not support profiles" % (self,)
+        args = None 
+        if self.profile:
+            args = []
+            if self.profileSpecifier:
+                args.extend(self.profileSpecifier)
+            args.extend(self.profile)
+        return args
+
     def readProcFilesystems(self):
         f = open("/proc/filesystems", 'r')
         if not f:
@@ -482,6 +501,8 @@ class extFileSystem(FileSystemType):
         self.linuxnativefs = 1
         self.maxSizeMB = 8 * 1024 * 1024
         self.packages = [ "e2fsprogs" ]
+        self.supportsProfiles = True
+        self.profileSpecifier = "-T"
 
     def labelDevice(self, entry, chroot):
         devicePath = entry.device.setupDevice(chroot)
@@ -501,6 +522,9 @@ class extFileSystem(FileSystemType):
         devArgs = self.getDeviceArgs(entry.device)
         args = [ "mke2fs", devicePath, "-i", str(entry.bytesPerInode) ]
 
+        profileArgs = self.getProfileArgs()
+        if profileArgs:
+            args.extend(profileArgs)
         args.extend(devArgs)
         args.extend(self.extraFormatArgs)
 
@@ -1792,7 +1816,7 @@ class FileSystemSetEntry:
                   fsystem=None, options=None,
                   origfsystem=None, migrate=0,
                   order=-1, fsck=-1, format=0,
-                  bytesPerInode=4096):
+                  bytesPerInode=4096, profile=None):
         if not fsystem:
             fsystem = fileSystemTypeGet("ext2")
         self.device = device
@@ -1822,6 +1846,7 @@ class FileSystemSetEntry:
                                  "flag on" % fsystem.getName())
         self.format = format
         self.bytesPerInode = bytesPerInode
+        self.profile = profile
 
     def mount(self, chroot='/', devPrefix='/tmp', readOnly = 0):
         device = self.device.setupDevice(chroot, devPrefix=devPrefix)
Index: kickstart.py
===================================================================
RCS file: /usr/local/CVS/anaconda/kickstart.py,v
retrieving revision 1.391
diff -u -p -r1.391 kickstart.py
--- kickstart.py	17 Oct 2007 19:47:39 -0000	1.391
+++ kickstart.py	18 Oct 2007 22:28:14 -0000
@@ -280,7 +280,8 @@ class LogVol(commands.logvol.FC4_LogVol)
                                       grow = lvd.grow,
                                       maxSizeMB = lvd.maxSizeMB,
                                       preexist = lvd.preexist,
-                                      bytesPerInode = lvd.bytesPerInode)
+                                      bytesPerInode = lvd.bytesPerInode,
+                                      fsprofile = lvd.fsprofile)
 
         if lvd.fsopts != "":
             request.fsopts = lvd.fsopts
@@ -461,7 +462,8 @@ class Partition(commands.partition.FC4_P
                                              mountpoint = pd.mountpoint,
                                              format = pd.format,
                                              fslabel = pd.label,
-                                             bytesPerInode = pd.bytesPerInode)
+                                             bytesPerInode = pd.bytesPerInode,
+                                             fsprofile = pd.fsprofile)
         
         if pd.size is not None:
             request.size = pd.size
@@ -552,7 +554,8 @@ class Raid(commands.raid.F7_Raid):
                                                raidspares = rd.spares,
                                                format = rd.format,
                                                raidminor = rd.device,
-                                               preexist = rd.preexist)
+                                               preexist = rd.preexist,
+                                               fsprofile = rd.fsprofile)
 
         if uniqueID is not None:
             request.uniqueID = uniqueID
Index: partRequests.py
===================================================================
RCS file: /usr/local/CVS/anaconda/partRequests.py,v
retrieving revision 1.74
diff -u -p -r1.74 partRequests.py
--- partRequests.py	3 Aug 2007 19:32:24 -0000	1.74
+++ partRequests.py	18 Oct 2007 22:28:14 -0000
@@ -116,7 +116,8 @@ class RequestSpec:
     """Generic Request specification."""
     def __init__(self, fstype, size = None, mountpoint = None, format = None,
                  preexist = 0, fslabel = None,
-                 migrate = None, origfstype = None, bytesPerInode = 4096):
+                 migrate = None, origfstype = None, bytesPerInode = 4096,
+                 fsprofile = None):
         """Create a generic RequestSpec.
 
         This should probably never be externally used.
@@ -131,6 +132,7 @@ class RequestSpec:
         self.origfstype = origfstype
         self.fslabel = fslabel
         self.fsopts = None
+        self.fsprofile = fsprofile
 
         if bytesPerInode == None:
             self.bytesPerInode = 4096
@@ -164,12 +166,13 @@ class RequestSpec:
         str = ("Generic Request -- mountpoint: %(mount)s  uniqueID: %(id)s\n"
                "  type: %(fstype)s  format: %(format)s\n"
                "  device: %(dev)s  migrate: %(migrate)s  fslabel: %(fslabel)s\n"
-               "  bytesPerInode:  %(bytesPerInode)s  options: '%(fsopts)s'" % 
+               "  bytesPerInode:  %(bytesPerInode)s  options: '%(fsopts)s'"
+               "  fsprofile: %(fsprofile)s" % 
                {"mount": self.mountpoint, "id": self.uniqueID,
                 "fstype": fsname, "format": self.format,
                 "dev": self.device, "migrate": self.migrate,
                 "fslabel": self.fslabel, "bytesPerInode": self.bytesPerInode,
-                "fsopts": self.fsopts})
+                "fsopts": self.fsopts, "fsprofile": self.fsprofile})
         return str
 
     def getActualSize(self, partitions, diskset):
@@ -201,7 +204,8 @@ class RequestSpec:
         entry = fsset.FileSystemSetEntry(device, mountpoint, self.fstype,
                                          origfsystem=self.origfstype,
                                          bytesPerInode=self.bytesPerInode,
-                                         options=self.fsopts)
+                                         options=self.fsopts,
+                                         fsprofile=self.fsprofile)
         if self.format:
             entry.setFormat(self.format)
 
@@ -382,7 +386,7 @@ class PartitionSpec(RequestSpec):
                  preexist = 0, migrate = None, grow = 0, maxSizeMB = None,
                  start = None, end = None, drive = None, primary = None,
                  format = None, multidrive = None, bytesPerInode = 4096,
-                 fslabel = None):
+                 fslabel = None, fsprofile=None):
         """Create a new PartitionSpec object.
 
         fstype is the fsset filesystem type.
@@ -401,6 +405,7 @@ class PartitionSpec(RequestSpec):
             across _all_ of the drives in drive
         bytesPerInode is the size of the inodes on the filesystem.
         fslabel is the label to give to the filesystem.
+        fsprofile is the usage profile for the filesystem.
         """
 
         # if it's preexisting, the original fstype should be set
@@ -413,7 +418,7 @@ class PartitionSpec(RequestSpec):
                              mountpoint = mountpoint, format = format,
                              preexist = preexist, migrate = None,
                              origfstype = origfs, bytesPerInode = bytesPerInode,
-                             fslabel = fslabel)
+                             fslabel = fslabel, fsprofile = fsprofile)
         self.type = REQUEST_NEW
 
         self.grow = grow
@@ -453,7 +458,8 @@ class PartitionSpec(RequestSpec):
                "  size: %(size)s  grow: %(grow)s  maxsize: %(max)s\n"
                "  start: %(start)s  end: %(end)s  migrate: %(migrate)s  "
                "  fslabel: %(fslabel)s  origfstype: %(origfs)s\n"
-               "  bytesPerInode: %(bytesPerInode)s  options: '%(fsopts)s'" % 
+               "  bytesPerInode: %(bytesPerInode)s  options: '%(fsopts)s'\n"
+               "  fsprofile: %(fsprofile)s" % 
                {"n": pre, "mount": self.mountpoint, "id": self.uniqueID,
                 "fstype": fsname, "format": self.format, "dev": self.device,
                 "drive": self.drive, "primary": self.primary,
@@ -461,7 +467,7 @@ class PartitionSpec(RequestSpec):
                 "start": self.start, "end": self.end,
                 "migrate": self.migrate, "fslabel": self.fslabel,
                 "origfs": oldfs, "bytesPerInode": self.bytesPerInode,
-                "fsopts": self.fsopts})
+                "fsopts": self.fsopts, "fsprofile": self.fsprofile})
         return str
 
 
@@ -565,7 +571,8 @@ class RaidRequestSpec(RequestSpec):
     def __init__(self, fstype, format = None, mountpoint = None,
                  raidlevel = None, raidmembers = None,
                  raidspares = None, raidminor = None, fslabel = None,
-                 preexist = 0, chunksize = None, bytesPerInode=4096):
+                 preexist = 0, chunksize = None, bytesPerInode=4096,
+                 fsprofile = None):
         """Create a new RaidRequestSpec object.
 
         fstype is the fsset filesystem type.
@@ -578,6 +585,7 @@ class RaidRequestSpec(RequestSpec):
         raidminor is the minor of the device which should be used.
         bytesPerInode is the size of the inodes on the filesystem.
         fslabel is the label of the filesystem.
+        fsprofile is the usage profile for the filesystem.
         """
 
         # if it's preexisting, the original fstype should be set
@@ -589,7 +597,7 @@ class RaidRequestSpec(RequestSpec):
         RequestSpec.__init__(self, fstype = fstype, format = format,
                              mountpoint = mountpoint, preexist = preexist,
                              origfstype = origfs, bytesPerInode=bytesPerInode,
-                             fslabel=fslabel)
+                             fslabel=fslabel, fsprofile=fsprofile)
         self.type = REQUEST_RAID
         
 
@@ -612,12 +620,14 @@ class RaidRequestSpec(RequestSpec):
         str = ("RAID Request -- mountpoint: %(mount)s  uniqueID: %(id)s\n"
                "  type: %(fstype)s  format: %(format)s\n"
                "  raidlevel: %(level)s  raidspares: %(spares)s\n"
-               "  raidmembers: %(members)s  bytesPerInode: %(bytesPerInode)s" % 
+               "  raidmembers: %(members)s  bytesPerInode: %(bytesPerInode)s\n"
+               "  fsprofile: %(fsprofile)s" % 
                {"mount": self.mountpoint, "id": self.uniqueID,
                 "fstype": fsname, "format": self.format,
                 "level": self.raidlevel, "spares": self.raidspares,
-                "members": self.raidmembers,
-                "bytesPerInode": self.bytesPerInode})
+                "members": self.raidmembers, "fsprofile": self.fsprofile,
+                "bytesPerInode": self.bytesPerInode,
+                })
         return str
     
     def getDevice(self, partitions):
@@ -817,7 +827,7 @@ class LogicalVolumeRequestSpec(RequestSp
     def __init__(self, fstype, format = None, mountpoint = None,
                  size = None, volgroup = None, lvname = None,
                  preexist = 0, percent = None, grow=0, maxSizeMB=0,
-		 bytesPerInode = 4096, fslabel = None):
+		 bytesPerInode = 4096, fslabel = None, fsprofile = None):
         """Create a new VolumeGroupRequestSpec object.
 
         fstype is the fsset filesystem type.
@@ -832,6 +842,7 @@ class LogicalVolumeRequestSpec(RequestSp
 	maxSizeMB is max size to grow to.
 	bytesPerInode is the size of the inodes on the partition.
         fslabel is the label of the filesystem on the logical volume.
+        fsprofile is the usage profile for the filesystem.
         """
 
         # if it's preexisting, the original fstype should be set
@@ -848,7 +859,8 @@ class LogicalVolumeRequestSpec(RequestSp
 	RequestSpec.__init__(self, fstype = fstype, format = format,
 			     mountpoint = mountpoint, size = size,
 			     preexist = preexist, origfstype = origfs,
-			     bytesPerInode = bytesPerInode, fslabel = fslabel)
+			     bytesPerInode = bytesPerInode, fslabel = fslabel,
+                             fsprofile = fsprofile)
 	    
         self.type = REQUEST_LV
 
@@ -880,12 +892,13 @@ class LogicalVolumeRequestSpec(RequestSp
         str = ("LV Request -- mountpoint: %(mount)s  uniqueID: %(id)s\n"
                "  type: %(fstype)s  format: %(format)s\n"
                "  size: %(size)s  lvname: %(lvname)s  volgroup: %(vgid)s\n"
-               "  bytesPerInode: %(bytesPerInode)s  options: '%(fsopts)s'" %
+               "  bytesPerInode: %(bytesPerInode)s  options: '%(fsopts)s'\n"
+               "  fsprofile: %(fsprofile)s" %
                {"mount": self.mountpoint, "id": self.uniqueID,
                 "fstype": fsname, "format": self.format,
                 "lvname": self.logicalVolumeName, "vgid": self.volumeGroup,
 		"size": size, "bytesPerInode": self.bytesPerInode,
-                "fsopts": self.fsopts})
+                "fsopts": self.fsopts, "fsprofile": self.fsprofile})
         return str
     
     def getDevice(self, partitions):
